.file "hard.c" gcc2_compiled.: .section .rodata .LC0: .string "You are wrong\n" .LC1: .string "You are a Wizard\n" .text .align 4 .globl checkguess .type checkguess,@function checkguess: pushl %ebp movl %esp,%ebp subl $24,%esp call rand movl %eax,%eax movl %eax,-4(%ebp) movl -4(%ebp),%eax movl %eax,-8(%ebp) cmpl $0,8(%ebp) jle .L8 cmpl $0,12(%ebp) jle .L8 jmp .L7 .p2align 4,,7 .L8: addl $-12,%esp pushl $.LC0 call printf addl $16,%esp jmp .L6 .p2align 4,,7 .L7: cmpl $100,-4(%ebp) jle .L9 movl 8(%ebp),%eax xorl %eax,-4(%ebp) jmp .L10 .p2align 4,,7 .L9: movl 12(%ebp),%eax xorl %eax,-4(%ebp) .L10: cmpl $100,12(%ebp) jle .L11 movl -8(%ebp),%eax xorl %eax,-4(%ebp) jmp .L12 .p2align 4,,7 .L11: movl -8(%ebp),%eax xorl %eax,-4(%ebp) .L12: movl 12(%ebp),%eax movl %eax,%edx leal (%edx,%edx),%eax movl %eax,%edx addl 8(%ebp),%edx movl 12(%ebp),%eax addl $-23,%eax subl %eax,%edx movl %edx,%eax subl 8(%ebp),%eax movl %eax,%edx subl 12(%ebp),%edx cmpl %edx,-4(%ebp) jne .L13 addl $-12,%esp pushl $.LC1 call printf addl $16,%esp jmp .L14 .p2align 4,,7 .L13: addl $-12,%esp pushl $.LC0 call printf addl $16,%esp .L14: .L6: leave ret .Lfe1: .size checkguess,.Lfe1-checkguess .section .rodata .align 32 .LC2: .string "You need to enter two numbers on the command line\n" .text .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $24,%esp cmpl $2,8(%ebp) jg .L16 addl $-12,%esp pushl $.LC2 call printf addl $16,%esp movl $1,%eax jmp .L15 .p2align 4,,7 .L16: addl $-12,%esp movl 12(%ebp),%eax addl $4,%eax movl (%eax),%edx pushl %edx call atoi addl $16,%esp movl %eax,%eax movl %eax,-4(%ebp) addl $-12,%esp movl 12(%ebp),%eax addl $8,%eax movl (%eax),%edx pushl %edx call atoi addl $16,%esp movl %eax,%eax movl %eax,-8(%ebp) addl $-8,%esp movl -8(%ebp),%eax pushl %eax movl -4(%ebp),%eax pushl %eax call checkguess addl $16,%esp xorl %eax,%eax jmp .L15 .p2align 4,,7 .L15: leave ret .Lfe2: .size main,.Lfe2-main .ident "GCC: (GNU) 2.95.3 20010315 (release)"