Question: 0 0 0 0 0 0 0 0 0 0 4 0 0 f 5 a : 4 0 0 f 5 a: 4 8

0000000000400f5a :
400f5a: 4883 ec 18 sub $0x18,%rsp
400f5e: 488d 4c 2408 lea 0x8(%rsp),%rcx
400f63: 488d 54240c lea 0xc(%rsp),%rdx
400f68: be 45274000 mov $0x402745,%esi
400f6d: b800000000 mov $0x0,%eax
400f72: e8 b9 fc ff ff callq 400c30<__isoc99_sscanf@plt>
400f77: 83 f801 cmp $0x1,%eax
400f7a: 7e 12 jle 400f8e
400f7c: 837c 240c 07 cmpl $0x7,0xc(%rsp)
400f81: 7743 ja 400fc6
400f83: 8b 44240c mov 0xc(%rsp),%eax
400f87: ff 24 c5 a0244000 jmpq *0x4024a0(,%rax,8)
400f8e: e88e 050000 callq 401521
400f93: eb e7 jmp 400f7c
400f95: b872000000 mov $0x72,%eax
400f9a: eb 3b jmp 400fd7
400f9c: b8 c3030000 mov $0x3c3,%eax
400fa1: eb 34 jmp 400fd7
400fa3: b85c 000000 mov $0x5c,%eax
400fa8: eb 2d jmp 400fd7
400faa: b869000000 mov $0x69,%eax
400faf: eb 26 jmp 400fd7
400fb1: b8 e4020000 mov $0x2e4,%eax
400fb6: eb 1f jmp 400fd7
400fb8: b88b 030000 mov $0x38b,%eax
400fbd: eb 18 jmp 400fd7
400fbf: b892010000 mov $0x192,%eax
400fc4: eb 11 jmp 400fd7
400fc6: e856050000 callq 401521
400fcb: b800000000 mov $0x0,%eax
400fd0: eb 05 jmp 400fd7
400fd2: b859010000 mov $0x159,%eax
400fd7: 39442408 cmp %eax,0x8(%rsp)
400fdb: 7505 jne 400fe2
400fdd: 4883 c418 add $0x18,%rsp
400fe1: c3 retq
400fe2: e83a 050000 callq 401521
400fe7: eb f4 jmp 400fdd
0000000000400fe9 :
400fe9: 53 push %rbx
400fea: 89 d0 mov %edx,%eax
400fec: 29 f0 sub %esi,%eax
400fee: 89 c3 mov %eax,%ebx
400ff0: c1 eb 1f shr $0x1f,%ebx
400ff3: 01 c3 add %eax,%ebx
400ff5: d1 fb sar %ebx
400ff7: 01 f3 add %esi,%ebx
400ff9: 39 fb cmp %edi,%ebx
400ffb: 7f 06 jg 401003
400ffd: 7c 10 jl 40100f
400fff: 89 d8 mov %ebx,%eax
401001: 5b pop %rbx
401002: c3 retq
401003: 8d 53 ff lea -0x1(%rbx),%edx
401006: e8 de ff ff ff callq 400fe9
40100b: 01 c3 add %eax,%ebx
40100d: eb f0 jmp 400fff
40100f: 8d 7301 lea 0x1(%rbx),%esi
401012: e8 d2 ff ff ff callq 400fe9
401017: 01 c3 add %eax,%ebx

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!