.file "func3.c" .version "01.01" gcc2_compiled.: .section .rodata // Read only section for strings .LC0: .string "%s" .LC1: .string "I am a string" .text .align 4 .globl func3 .type func3,@function func3: pushl %ebp // Stack Stuff movl %esp,%ebp subl $112,%esp pushl %esi // Saving registers for local use pushl %ebx movl 8(%ebp),%eax // get a movl 12(%ebp),%edx // get b cmpl $4,%eax // test value of a - 4 ja .L9 // if (a > 4), default case jmp *.L10(,%eax,4) // jump to (.L10 + 4a) .p2align 4,,7 .section .rodata // Read-Only section for jump table .align 4 .align 4 .L10: // the jump table .long .L3 // case 0 .long .L5 // case 1 .long .L6 // case 2 .long .L7 // case 3 .long .L8 // case 4 .text .p2align 4,,7 .L5: movl %edx,%eax jmp .L3 .p2align 4,,7 .L6: addl %edx,%eax jmp .L3 .p2align 4,,7 .L7: subl %edx,%eax jmp .L3 .p2align 4,,7 .L8: imull %edx,%eax jmp .L3 .p2align 4,,7 .L9: addl $-8,%esp leal -100(%ebp),%ebx pushl %ebx pushl $.LC0 call scanf addl $-8,%esp pushl $.LC1 // referring to string in .rodata pushl %ebx call strcat xorl %eax,%eax // result = 0 .L3: movl -120(%ebp),%ebx movl %ebp,%esp popl %ebp ret .Lfe1: .size func3,.Lfe1-func3 .ident "GCC: (GNU) 2.95.3 20010315 (release)"