.file "p5.c" .globl x4 .data .align 4 .type x4,@object .size x4,12 x4: .long 3 .long 4 .long 0 .globl x3 .align 4 .type x3,@object .size x3,12 x3: .long 7 .long 2 .long x4 .globl x2 .align 4 .type x2,@object .size x2,12 x2: .long 1 .long 1 .long x3 .globl x1 .align 4 .type x1,@object .size x1,12 x1: .long 5 .long 6 .long x2 .section .rodata .LC0: .string "You are a wizard\n" .LC1: .string "You are wrong\n" .text .globl checkguess .type checkguess,@function checkguess: pushl %ebp movl %esp, %ebp subl $8, %esp movl $x1, -4(%ebp) movl $0, -8(%ebp) .L2: cmpl $0, -4(%ebp) jne .L4 jmp .L3 .L4: movl -4(%ebp), %eax movl (%eax), %edx leal -8(%ebp), %eax addl %edx, (%eax) movl -4(%ebp), %eax movl 8(%eax), %eax movl %eax, -4(%ebp) jmp .L2 .L3: movl 8(%ebp), %eax cmpl -8(%ebp), %eax jne .L5 subl $12, %esp pushl $.LC0 call printf addl $16, %esp jmp .L1 .L5: subl $12, %esp pushl $.LC1 call printf addl $16, %esp .L1: leave ret .Lfe1: .size checkguess,.Lfe1-checkguess .section .rodata .align 32 .LC2: .string "You need to enter a number on the command line\n" .text .globl main .type main,@function main: pushl %ebp movl %esp, %ebp subl $8, %esp andl $-16, %esp movl $0, %eax subl %eax, %esp cmpl $1, 8(%ebp) jg .L8 subl $12, %esp pushl $.LC2 call printf addl $16, %esp movl $1, -8(%ebp) jmp .L7 .L8: subl $12, %esp movl 12(%ebp), %eax addl $4, %eax pushl (%eax) call atoi addl $16, %esp movl %eax, -4(%ebp) subl $12, %esp pushl -4(%ebp) call checkguess addl $16, %esp movl $0, -8(%ebp) .L7: movl -8(%ebp), %eax leave ret .Lfe2: .size main,.Lfe2-main .ident "GCC: (GNU) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)"