What are the expected 6 numbers of the following x84-64 code? I can tell that the base case is 0 but unsure how to get the remaining 5.
What are the expected 6 numbers of the following x84-64 code? I can tell that the base case is 0 but unsure how to get the remaining 5.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
What are the expected 6 numbers of the following x84-64 code? I can tell that the base case is 0 but unsure how to get the remaining 5.

Transcribed Image Text:1
445 WNH
2
3
6
7
8
9
10
11
12
13
14
15
16
55
99
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
000000000000164b
164b:
164f:
1650:
1651:
1655:
165c:
165e:
1663:
1665:
1668:
166d:
1671:
1673:
1676:
167b:
167d:
1682:
1684:
1687:
168b:
168e:
1690:
1692:
1695:
1698:
169a:
169f:
<phase_2>:
fo of le fa
55
16a1:
16a6:
16ad:
16af:
16b1:
16b5:
16b6:
16b7:
16b8:
53
48 83 ec 28
64 48 8b 04 25 28 00
00 00
48 89 44 24 18
31 có
48 89 e6
e8 36 08 00 00
83 3c 24 00
78 0a
48 89 e5
bb 01 00 00 00
eb 13
e8 df 07 00 00
eb ef
83 c3 01
48 83 c5 04
83 fb 06
74 11
89 d8
03 45 00
39 45 04
74 ea
e8 c2 07 00 00
eb e3
48 8b 44 24 18
64 48 2b 04 25 28 00
00 00
75 07
48 83 c4 28
5b
5d
c3
e8 c3 fb ff ff
endbr64
push
push
sub
mov
mov
xor
mov
call
cmpl
js
mov
mov
jmp
call
jmp
add
add
cmp
je
mov
add
cmp
je
call
jmp
mov
sub
jne
add
pop
pop
ret
call
%rbp
%rbx
$0x28,%rsp
%fs:0x28,%rax
%rax, 0x18 (%rsp)
%eax,%eax
%rsp,%rsi
lea3 <read six numbers>
$0x0, (%rsp) // 0 Base case
167d <phase_2+0x32>
%rsp,%rbp
$0x1,%ebx
1690 <phase_2+0x45>
1e61 <explode_bomb>
1673 <phase_2+0x28>
$0x1,%ebx
$0x4,%rbp
$0x6,%ebx
16a1 <phase_2+0x56>
%ebx,%eax
0x0 (%rbp), %eax
%eax, 0x4 (%rbp)
1684 <phase_2+0x39>
1e61 <explode_bomb>
1684 <phase_2+0x39>
0x18 (%rsp), %rax
%fs:0x28,%rax
16b8 <phase_2+0x6d>
$0x28,%rsp
%rbx
%rbp
1280 < _stack_chk_fail@plt
Expert Solution

Step 1
frog:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %edx
movl 12(%ebp), %eax
cmpl $7, %edx
ja .L8
jmp *.L9(,%edx,4)
.section .rodata
.align 4
.align 4
.L9:
.long .L8
.long .L4
.long .L8
.long .L5
.long .L8
.long .L4
.long .L6
.long .L2
.text
.L4:
movl $7, %eax
jmp .L2
.L5:
decl %eax
jmp .L2
.L6:
incl %eax
jmp .L2
.L8:
movl $-1, %eax
.L2:
popl %ebp
ret
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education