NAME=aFr on ELF
FILE=bins/elf/msp430.elf
CMDS=<<EOF
s main
aFr
pif
afi
EOF
EXPECT=<<EOF
add 0xff9c, sp
mov loc..strings, r15
call loc.puts
mov sp, r15
call loc.get_password
mov sp, r15
call loc.check_password
tst r15
jnz $+0x000c
mov 0x44c7, r15
call loc.puts
jmp $+0x000e
mov 0x44e4, r15
call loc.puts
call loc.unlock_door
clr r15
add 0x0064, sp
bis 0x00f0, sr
jmp $-0x0004
#
offset: 0x00004438
name: main
size: 62
is-pure: true
realsz: 62
stackframe: 0
cyclomatic-cost: 0
cyclomatic-complexity: 1
bits: 32
type: fcn [NEW]
num-bbs: 5
edges: 6
end-bbs: 0
call-refs: 0x00004558 C 0x0000447a C 0x00004484 C 0x00004558 C 0x0000446a J 0x00004558 C 0x0000449c C 0x00004470 J
data-refs:
code-xrefs: 0x0000445c J 0x00004474 J
noreturn: false
in-degree: 2
out-degree: 6
data-xrefs:
locals: 0
args: 0
diff: type: new
EOF
RUN

NAME=aFr on same but ihex and .rz script
BROKEN=1
FILE=ihex://bins/microcorruption/tutorial
CMDS=<<EOF
. bins/microcorruption/tutorial.rz
s main
aFr
pif
afi
EOF
EXPECT=<<EOF
add 0xff9c, sp
mov loc..strings, r15
call loc.puts
mov sp, r15
call loc.get_password
mov sp, r15
call loc.check_password
tst r15
jnz $+0x000c
mov 0x44c7, r15
call loc.puts
jmp $+0x000e
mov 0x44e4, r15
call loc.puts
call loc.unlock_door
clr r15
add 0x0064, sp
bis 0x00f0, sr
jmp $-0x0004
#
offset: 0x00004438
name: main
size: 62
is-pure: true
realsz: 62
stackframe: 0
call-convention: (null)
cyclomatic-cost: 0
cyclomatic-complexity: 1
bits: 32
type: fcn [NEW]
num-bbs: 5
edges: 6
end-bbs: 0
call-refs: 0x00004558 C 0x0000447a C 0x00004484 C 0x00004558 C 0x0000446a J 0x00004558 C 0x0000449c C 0x00004470 J
data-refs:
code-xrefs: 0x0000445c J 0x00004474 J
in-degree: 2
out-degree: 6
data-xrefs:
locals: 0
args: 0
diff: type: new
EOF
RUN
