// File: ksherlock[P]wdc-utils/zrdz_disassembler.cpp
// Function: zrdz_disassembler::print_variables()
void zrdz_disassembler::print_variables() {

	std::vector<symbol> tmp;

	for (auto &s : _symbols) {
		if (s.flags & SF_VAR) tmp.push_back(s);
	}

	if (tmp.empty()) return;
	std::sort(tmp.begin(), tmp.end());

	for (const auto &s : tmp) {
		if (s.flags & SF_GBL) emit("", "public", s.name);
		emit(s.name, "var", to_x(s.offset, 4, '$'));
	}

	putchar('\n');

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x7d00
movq -0x120(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xa6a0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0xa490
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15c30
testb $0x1, %al
jne 0x1272f
jmp 0x1277b
leaq -0x30(%rbp), %rdi
callq 0xab10
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x1276e
movq -0x40(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x16010
jmp 0x1275b
jmp 0x1276e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12a42
jmp 0x12770
leaq -0x30(%rbp), %rdi
callq 0x15cf0
jmp 0x1271c
leaq -0x20(%rbp), %rdi
callq 0x15dd0
testb $0x1, %al
jne 0x1278a
jmp 0x12796
movl $0x1, -0x50(%rbp)
jmp 0x12a30
leaq -0x20(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0xa6a0
movq -0x128(%rbp), %rdi
movq %rax, -0x58(%rbp)
callq 0xa490
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x16080
jmp 0x127c9
leaq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0xa6a0
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
callq 0xa490
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x15c30
testb $0x1, %al
jne 0x12801
jmp 0x12a1d
leaq -0x70(%rbp), %rdi
callq 0xab10
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movzbl 0x21(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12928
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3460
movq -0x130(%rbp), %rdx
leaq 0x8b31(%rip), %rsi      # 0x1b374
leaq -0xa0(%rbp), %rdi
callq 0x8060
jmp 0x12851
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3460
movq -0x138(%rbp), %rdx
leaq 0x94bc(%rip), %rsi      # 0x1bd2e
leaq -0xc8(%rbp), %rdi
callq 0x8060
jmp 0x12880
movq -0x80(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xce40
jmp 0x12899
leaq -0xc8(%rbp), %rdi
callq 0x3160
leaq -0xc9(%rbp), %rdi
callq 0x32b0
leaq -0xa0(%rbp), %rdi
callq 0x3160
leaq -0xa1(%rbp), %rdi
callq 0x32b0
jmp 0x12928
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12917
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x128ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x3160
leaq -0xc9(%rbp), %rdi
callq 0x32b0
leaq -0xa0(%rbp), %rdi
callq 0x3160
leaq -0xa1(%rbp), %rdi
callq 0x32b0
jmp 0x12a42
movq -0x80(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x3460
movq -0x140(%rbp), %rdx
leaq 0x93e1(%rip), %rsi      # 0x1bd35
leaq -0xf0(%rbp), %rdi
callq 0x8060
jmp 0x12962
movq -0x80(%rbp), %rax
movl 0x24(%rax), %esi
leaq -0x118(%rbp), %rdi
movl $0x4, %edx
movl $0x24, %ecx
callq 0xcb90
jmp 0x12981
movq -0x148(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0xce40
jmp 0x1299d
leaq -0x118(%rbp), %rdi
callq 0x3160
leaq -0xf0(%rbp), %rdi
callq 0x3160
leaq -0xf1(%rbp), %rdi
callq 0x32b0
leaq -0x70(%rbp), %rdi
callq 0x15cf0
jmp 0x127eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12a0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12a03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3160
leaq -0xf0(%rbp), %rdi
callq 0x3160
leaq -0xf1(%rbp), %rdi
callq 0x32b0
jmp 0x12a42
movl $0xa, %edi
callq 0x3390
jmp 0x12a29
movl $0x0, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x7e00
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x7e00
movq -0x48(%rbp), %rdi
callq 0x3440
nopw %cs:(%rax,%rax)