// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/reko.c
// Function: de_run_reko
static void de_run_reko(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	const char *fmtname;

	d = de_malloc(c, sizeof(lctx));
	d->combine_images = (u8)de_get_ext_option_bool(c, "reko:combine", 1);

	d->fmt = reko_fmt_from_sig(c);
	if(d->fmt==0) {
		de_err(c, "Unsupported REKO version");
		goto done;
	}
	if(d->fmt==RKFMT_RKP8) fmtname = "RKP 8";
	else if(d->fmt==RKFMT_RKP16) fmtname = "RKP 16";
	else if(d->fmt==RKFMT_RKP24) fmtname = "RKP 24";
	else fmtname = "Amiga";
	de_declare_fmtf(c, "REKO cardset (%s)", fmtname);

	if(d->fmt==RKFMT_RKP8 || d->fmt==RKFMT_RKP16 || d->fmt==RKFMT_RKP24) {
		d->is_pc = 1;
	}

	if(d->is_pc) {
		d->idx_of_first_main_card = 1;
	}
	else {
		d->idx_of_first_main_card = 3;
	}

	if(d->fmt==RKFMT_RKP24) {
		read_header_rkp24(c, d);
	}
	else if(d->is_pc) {
		read_header_pc(c, d);
	}
	else {
		read_header_amiga(c, d);
	}
	if(d->fatalerrflag) goto done;

	if(!d->is_pc) {
		read_palette_amiga(c, d);
	}
	if(d->fatalerrflag) goto done;
	if(d->fmt==RKFMT_RKP24) {
		reko_main_rkp24(c, d);
	}
	else {
		reko_main(c, d);
	}

done:
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported file");
		}
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, %r15
movl $0x470, %esi            # imm = 0x470
callq 0xe969b
movq %rax, %rbp
leaq 0x605ca(%rip), %rsi     # 0x1454bd
movq %r15, %rdi
movl $0x1, %edx
callq 0xea727
movb %al, 0x5(%rbp)
movq %r15, %rdi
callq 0xe6405
movb %al, (%rbp)
cmpb $0x6, %al
ja 0xe4f56
movzbl %al, %eax
leaq 0x6054c(%rip), %rcx     # 0x145468
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6059e(%rip), %rsi     # 0x1454ca
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0xe570a
leaq 0x605a7(%rip), %rdx     # 0x1454e9
jmp 0xe4f5d
leaq 0x60598(%rip), %rdx     # 0x1454e3
jmp 0xe4f5d
leaq 0x6059c(%rip), %rdx     # 0x1454f0
jmp 0xe4f5d
leaq 0x3341a(%rip), %rdx     # 0x118377
leaq 0x60593(%rip), %rsi     # 0x1454f7
movq %r15, %rdi
xorl %eax, %eax
callq 0xeb703
movb (%rbp), %al
leal -0x4(%rax), %ecx
cmpb $0x2, %cl
ja 0xe4f7d
movb $0x1, 0x1(%rbp)
movb 0x1(%rbp), %cl
xorl %edx, %edx
testb %cl, %cl
sete %dl
leaq 0x1(,%rdx,2), %rdx
movq %rdx, 0x68(%rbp)
cmpb $0x6, %al
jne 0xe50b1
leaq 0x110(%rsp), %r14
movq $0x0, (%r14)
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe958c
movq (%r14), %rdx
leaq 0x3e1db(%rip), %rsi     # 0x12319f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
addq $0x8, (%r14)
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xef3a0
movq %rax, 0x10(%rbp)
leaq 0x6051a(%rip), %rsi     # 0x145510
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xef3a0
movq %rax, 0x8(%rbp)
leaq 0x60505(%rip), %rsi     # 0x14551f
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xef3a0
movq %rax, 0x18(%rbp)
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xef3a0
movq %rax, 0x20(%rbp)
movq 0x18(%rbp), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0xe9b05
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xef3a0
movl %eax, 0x38(%rbp)
leaq 0x3ef0e(%rip), %rsi     # 0x123f7a
movq %r15, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movl 0x38(%rbp), %eax
movl %eax, 0x3c(%rbp)
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0xef3a0
movq %rax, 0x48(%rbp)
leaq 0x60499(%rip), %rsi     # 0x14552e
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq $0x450, 0x50(%rbp)      # imm = 0x450
movl (%rbx), %esi
jmp 0xe53a0
leaq 0x110(%rsp), %rbx
testb %cl, %cl
je 0xe51d0
movq $0x0, (%rbx)
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xe958c
movq (%rbx), %rdx
leaq 0x3e0bd(%rip), %rsi     # 0x12319f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
addq $0x8, (%rbx)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef3a0
movq %rax, 0x8(%rbp)
leaq 0x6040b(%rip), %rsi     # 0x14551f
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef3a0
movq %rax, 0x10(%rbp)
leaq 0x603d8(%rip), %rsi     # 0x145510
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef1ed
movq %rax, 0x18(%rbp)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef1ed
movq %rax, 0x20(%rbp)
movq 0x18(%rbp), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0xe9b05
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movl %edx, 0x38(%rbp)
leaq 0x3eded(%rip), %rsi     # 0x123f7a
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movl 0x38(%rbp), %eax
movl %eax, 0x3c(%rbp)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movq %rdx, 0x48(%rbp)
leaq 0x60377(%rip), %rsi     # 0x14552e
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq (%rbx), %rax
movq %rax, 0x50(%rbp)
movl (%r14), %esi
jmp 0xe53a0
movq $0x0, (%rbx)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0xe958c
movq (%rbx), %rdx
leaq 0x3dfb1(%rip), %rsi     # 0x12319f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
addq $0x4, (%rbx)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef34e
movq %rax, 0x8(%rbp)
leaq 0x602ff(%rip), %rsi     # 0x14551f
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef34e
movq %rax, 0x10(%rbp)
leaq 0x602cc(%rip), %rsi     # 0x145510
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef193
movq %rax, 0x20(%rbp)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef193
movq %rax, 0x18(%rbp)
movq 0x20(%rbp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0xe9b05
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef34e
movl %eax, 0x40(%rbp)
leaq 0x602a7(%rip), %rsi     # 0x14553d
movq %r15, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
testb $0x8, 0x41(%rbp)
je 0xe52ac
movb $0x1, 0x44(%rbp)
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movzbl 0x44(%rbp), %edx
leaq 0x2bc92(%rip), %rsi     # 0x110f56
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x18(%r15), %rdi
leaq 0x110(%rsp), %rbx
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movl %edx, 0x38(%rbp)
leaq 0x3ec7e(%rip), %rsi     # 0x123f7a
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef14d
movzbl %al, %edx
movq %rdx, 0x48(%rbp)
leaq 0x6020e(%rip), %rsi     # 0x14552e
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq (%rbx), %rax
movq %rax, 0x50(%rbp)
movq 0x18(%rbp), %rdx
leaq -0x59(%rdx), %rax
cmpq $0x60, %rdx
jne 0xe534d
cmpq $0x7, %rax
ja 0xe5370
cmpl $0x4, 0x38(%rbp)
jne 0xe5353
jmp 0xe5370
cmpq $0x7, %rax
ja 0xe5370
leaq 0x601f5(%rip), %rsi     # 0x14554f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9b27
movq $0x58, 0x18(%rbp)
movb $0x1, 0x4(%rbp)
movl 0x38(%rbp), %eax
leal -0x9(%rax), %ecx
cmpl $-0x9, %ecx
ja 0xe5383
movw $0x101, 0x2(%rbp)       # imm = 0x101
jmp 0xe539c
movl %eax, 0x3c(%rbp)
cmpb $0x0, 0x44(%rbp)
je 0xe539c
cmpl $0x6, %eax
je 0xe5396
cmpl $0x8, %eax
jne 0xe537b
addl $-0x2, %eax
movl %eax, 0x3c(%rbp)
movl 0x8(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
cmpb $0x0, 0x2(%rbp)
jne 0xe570a
cmpb $0x0, 0x1(%rbp)
jne 0xe5442
leaq 0x110(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe958c
movq 0x50(%rbp), %r14
leaq 0x601a3(%rip), %rsi     # 0x14557d
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movb 0x3c(%rbp), %cl
movl $0x1, %eax
shlq %cl, %rax
movl $0x3, %edx
shlq %cl, %rdx
movq %rdx, 0x58(%rbp)
movq 0x18(%r15), %rsi
leaq 0x70(%rbp), %r9
subq $0x8, %rsp
movl $0x3, %r8d
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
pushq $0x8
pushq $0x1
pushq $0x100                  # imm = 0x100
callq 0xf32f2
addq $0x20, %rsp
movl (%rbx), %esi
movq %r15, %rdi
callq 0xe9595
cmpb $0x0, 0x2(%rbp)
jne 0xe570a
cmpb $0x6, (%rbp)
jne 0xe54d6
leaq 0x110(%rsp), %rsi
movq %r15, %rdi
callq 0xe958c
movq 0x50(%rbp), %rbx
leaq 0x60122(%rip), %rsi     # 0x145593
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq %r15, %rdi
callq 0xea9a9
movq %rax, 0x40(%rsp)
movq 0x10(%rbp), %r12
movq 0x48(%rbp), %rax
testq %r12, %r12
leaq 0x4e010(%rip), %rcx     # 0x1334ba
leaq 0x3bba1(%rip), %rdx     # 0x121052
cmoveq %rcx, %rdx
movq %rdx, 0x88(%rsp)
leaq -0x51(%rax), %rcx
cmpq $-0x50, %rcx
jae 0xe5596
movw $0x101, 0x2(%rbp)       # imm = 0x101
jmp 0xe56ee
leaq 0x9c(%rsp), %rsi
movq %r15, %rdi
callq 0xe958c
movq 0x58(%rbp), %rdx
addq 0x50(%rbp), %rdx
leaq 0x6009e(%rip), %rsi     # 0x145593
movq %r15, %rdi
movq %rdx, 0xb8(%rsp)
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq %r15, %rdi
callq 0xea9a9
movq %rax, %rbx
cmpb $0x0, 0x1(%rbp)
je 0xe5532
movl 0x38(%rbp), %eax
cmpl $0x8, %eax
je 0xe5532
cmpl $0x10, %eax
jne 0xe5563
movq 0x48(%rbp), %rcx
leaq -0x51(%rcx), %rax
cmpq $-0x50, %rax
jb 0xe5563
movq 0x18(%rbp), %rax
addq $-0x65, %rax
cmpq $-0x25, %rax
jb 0xe5563
movq $-0x97, %rax
addq 0x20(%rbp), %rax
cmpq $-0x34, %rax
ja 0xe573e
movw $0x101, 0x2(%rbp)       # imm = 0x101
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %r13, %rdi
callq 0xf28d4
movq %r14, %rdi
callq 0xf28d4
movq %r15, %rdi
movq %rbx, %rsi
callq 0xea9b3
movl 0x9c(%rsp), %esi
jmp 0xe5702
testq %rax, %rax
jle 0xe56ee
xorl %r13d, %r13d
movq %r12, 0x58(%rsp)
movq %r15, %rdi
leaq 0x5ffef(%rip), %rsi     # 0x1455a0
movq %r13, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
testq %r12, %r12
je 0xe55f3
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef169
cmpq $0x424d, %rax           # imm = 0x424D
jne 0xe5647
movq %rbp, %r14
movq 0x10(%rbp), %r12
movq %rbx, %rbp
movq %r12, %rdx
jmp 0xe5628
movq %rbp, %r14
leaq 0x4(%rbx), %rbp
movq 0x18(%r15), %rdi
movq %rbp, %rsi
callq 0xef169
cmpq $0xffd8, %rax           # imm = 0xFFD8
jne 0xe56d1
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef37e
movq %rax, %r12
movq %rax, %rdx
addq $0x4, %rdx
leaq (%r12,%rbp), %rax
movq 0x18(%r15), %rcx
cmpq 0x18(%rcx), %rax
jle 0xe5652
movq %r14, %rbp
movw $0x101, 0x2(%r14)       # imm = 0x101
xorl %eax, %eax
jmp 0xe56ca
movw $0x101, 0x2(%rbp)       # imm = 0x101
jmp 0xe56db
movq %rbx, 0x38(%rsp)
movq %r14, %rbx
movq 0x68(%r14), %rsi
movq %r15, %rdi
movq %rdx, 0x90(%rsp)
movq %r13, %rdx
movq 0x40(%rsp), %r14
movq %r14, %rcx
callq 0xe649f
movq %r15, %rdi
movq 0x88(%rsp), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xf037a
movq %rax, %r14
movq 0x18(%r15), %rdi
movq %rbp, %rsi
movq %rbx, %rbp
movq 0x38(%rsp), %rbx
movq %r12, %rdx
movq %rax, %rcx
callq 0xefabc
movq %r14, %rdi
callq 0xf0b13
addq 0x90(%rsp), %rbx
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movb $0x1, %al
movq 0x58(%rsp), %r12
jmp 0xe56dd
movq %r14, %rbp
movw $0x101, 0x2(%r14)       # imm = 0x101
xorl %eax, %eax
testb %al, %al
je 0xe56ee
incq %r13
cmpq 0x48(%rbp), %r13
jl 0xe55a7
movq %r15, %rdi
movq 0x40(%rsp), %rsi
callq 0xea9b3
movl 0x110(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
cmpb $0x0, 0x3(%rbp)
je 0xe5721
leaq 0x33758(%rip), %rsi     # 0x118e6f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %r15, %rdi
movq %rbp, %rsi
callq 0xe9752
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x68(%rbp), %rdx
addq $0x34, %rdx
cmpq %rdx, %rcx
jge 0xe575c
leaq 0x5fe77(%rip), %rsi     # 0x1455c9
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9b27
cmpb $0x0, 0x1(%rbp)
movq 0x18(%rbp), %rax
je 0xe5777
imulq 0x20(%rbp), %rax
movl 0x38(%rbp), %ecx
shrl $0x3, %ecx
imulq %rax, %rcx
jmp 0xe57ad
leaq 0x7(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x3, %rcx
movq %rcx, 0x30(%rbp)
movl 0x38(%rbp), %edx
imulq %rdx, %rcx
movq %rcx, 0x28(%rbp)
imulq %rdx, %rax
imulq 0x20(%rbp), %rax
leaq 0x7(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x3, %rcx
movq 0x10(%rbp), %rdx
cmpq %rcx, %rdx
je 0xe57d1
cmpb $0x0, 0x4(%rbp)
jne 0xe57d1
leaq 0x5fe32(%rip), %rsi     # 0x1455f5
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9b27
movb $0x1, 0x4(%rbp)
movq $0x0, 0x60(%rbp)
cmpb $0x0, 0x1(%rbp)
je 0xe57f4
movl $0x4, %eax
cmpl $0x8, 0x38(%rbp)
jne 0xe57f6
movq $0x200, 0x60(%rbp)      # imm = 0x200
jmp 0xe57f6
xorl %eax, %eax
movq 0x60(%rbp), %rdx
movq %rax, 0xa0(%rsp)
addq %rax, %rdx
addq 0x10(%rbp), %rdx
movq %rdx, 0x68(%rsp)
cmpb $0x0, 0x5(%rbp)
movq %rbx, 0x60(%rsp)
je 0xe587d
movq 0x48(%rbp), %rax
addq $0xc, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
cmpq $0x6, %rdx
movl $0x5, %eax
cmovlq %rax, %rdx
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rcx
addq $0x2, %rcx
imulq %rcx, %rdx
addq $-0x2, %rdx
leaq (%rax,%rax,2), %rcx
leaq (%rax,%rcx,4), %rsi
addq $0x18, %rsi
movq %r15, %rdi
movl $0x4, %ecx
callq 0xf2cab
movq %rax, 0x20(%rsp)
jmp 0xe5886
movq $0x0, 0x20(%rsp)
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
movq %r15, %rdi
movl $0x3, %ecx
callq 0xf2cab
movq %rax, %r13
cmpq $0x0, 0x48(%rbp)
movq 0x68(%rsp), %rax
jle 0xe604e
movq %rbp, %rcx
addq $0x70, %rcx
movq %rcx, 0x10(%rsp)
movl $0x4, %r14d
leaq 0x8(%rsp), %r12
movq 0xb8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
xorl %esi, %esi
xorl %ebx, %ebx
movq %r15, 0x28(%rsp)
movq %r13, 0x50(%rsp)
movq %rbp, 0xc8(%rsp)
movq %rsi, 0xb0(%rsp)
movq %rbx, 0xe0(%rsp)
movq %rcx, 0xe8(%rsp)
movq %rdx, %rcx
imulq %rax, %rcx
addq 0xb8(%rsp), %rcx
movq %r15, %rdi
leaq 0x5fc80(%rip), %rsi     # 0x1455a0
movq %rdx, 0x70(%rsp)
movq %rcx, 0x30(%rsp)
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
cmpb $0x0, 0x1(%rbp)
je 0xe59b8
cmpb $0x0, 0x2(%rbp)
jne 0xe59b8
movq 0xa0(%rsp), %rax
movq 0x30(%rsp), %rcx
addq %rcx, %rax
movq 0x18(%r15), %rdi
cmpq 0x18(%rdi), %rax
jg 0xe59b8
movq %r14, %r12
movq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0xef1ca
movq %rax, %rbx
movq 0x18(%r15), %rdi
leaq 0x2(%r14), %rsi
movq %r12, %r14
leaq 0x8(%rsp), %r12
callq 0xef1ca
incq %rbx
cmpq 0x18(%rbp), %rbx
jne 0xe599e
incq %rax
cmpq 0x20(%rbp), %rax
je 0xe59b8
movq %r15, %rdi
leaq 0x5fc74(%rip), %rsi     # 0x14561c
movq 0x70(%rsp), %rdx
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0x2(%rbp)
movq 0x18(%rbp), %rcx
movq 0x20(%rbp), %r8
subq $0x8, %rsp
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff000000, %r9d       # imm = 0xFF000000
pushq $0x0
callq 0xf3cb3
addq $0x10, %rsp
cmpb $0x0, 0x2(%rbp)
jne 0xe5eb1
cmpb $0x0, 0x1(%rbp)
je 0xe5b0a
movq %r14, 0x48(%rsp)
movq 0xa0(%rsp), %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax), %rdx
cmpl $0x8, 0x38(%rbp)
jne 0xe5e43
movq %rdx, 0x8(%rsp)
movq %r15, %rdi
leaq 0x50789(%rip), %rsi     # 0x1361a8
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movl $0x400, %edx            # imm = 0x400
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x18140
xorl %ebx, %ebx
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xef1ed
movq %rax, %r14
movl %r14d, %edi
callq 0xecf84
movq 0x10(%rsp), %rcx
movl %eax, (%rcx,%rbx,4)
cmpl $0x2, (%r15)
jl 0xe5aad
movl $0x40, %esi
leaq 0x110(%rsp), %r12
movq %r12, %rdi
leaq 0x5a053(%rip), %rdx     # 0x13fad5
movl %r14d, %ecx
xorl %eax, %eax
callq 0xe8d67
movq 0x10(%rsp), %rax
movl (%rax,%rbx,4), %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rcx
leaq 0x8(%rsp), %r12
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe9c1e
incq %rbx
cmpq $0x100, %rbx            # imm = 0x100
jne 0xe5a46
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x8(%rsp), %rdx
movq %r15, %rdi
leaq 0x48a43(%rip), %rsi     # 0x12e518
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rbp), %rcx
subq $0x8, %rsp
movl $0x8, %edx
movq 0x18(%rsp), %r8
movq %r13, %r9
pushq $0x0
callq 0xf35b8
addq $0x10, %rsp
jmp 0xe5eac
cmpb $0x0, 0x44(%rbp)
movq 0x18(%r15), %rdi
movl 0x38(%rbp), %edx
je 0xe602a
movq %rdi, 0xf8(%rsp)
movq %r14, 0x48(%rsp)
movq 0x28(%rbp), %rax
movq %rax, 0xd8(%rsp)
movq 0x30(%rbp), %rcx
movq $0x0, 0x110(%rsp)
movl $0x4, 0x1c(%rsp)
cmpl $0x6, %edx
je 0xe5b62
movl $0x2, 0x1c(%rsp)
cmpl $0x8, %edx
jne 0xe5e39
cmpq $0x0, 0x10(%r13)
jle 0xe5e39
movq 0x8(%r13), %rsi
leaq 0x7(%rsi), %rax
movq %rsi, 0xd0(%rsp)
addq $0xe, %rsi
testq %rax, %rax
cmovnsq %rax, %rsi
sarq $0x3, %rsi
cmpq $0x6, %rdx
movl $0x3f, %edi
movl $0xf, %eax
cmovel %eax, %edi
movl %edi, 0x90(%rsp)
setne %al
addb %al, %al
orb $0x4, %al
movb %al, 0x88(%rsp)
cmpl $0x2, %edx
movl $0x1, %r15d
cmovael %edx, %r15d
cmpq $0x2, %rsi
movl $0x1, %eax
cmovlq %rax, %rsi
movq %rsi, 0xf0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq $0x0, 0x38(%rsp)
movq %rcx, 0x108(%rsp)
movq %rdx, 0x40(%rsp)
cmpq $0x0, 0xd0(%rsp)
jle 0xe5e10
movq 0x10(%rsp), %rax
movl (%rax), %r12d
movl %r12d, %r14d
movl $0xff, %eax
andl %eax, %r14d
movl 0x1c(%rsp), %ecx
shrl %cl, %r14d
movl %r12d, %ebx
shrl $0x8, %ebx
andl %eax, %ebx
shrl %cl, %ebx
shrl $0x10, %r12d
andl %eax, %r12d
shrl %cl, %r12d
movq 0x78(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq $0x0, 0x80(%rsp)
movq %r14, 0x100(%rsp)
testq %rdx, %rdx
movq 0xf8(%rsp), %r14
je 0xe5c90
movq 0xc0(%rsp), %rbp
xorl %r13d, %r13d
movq %r14, %rdi
movq %rbp, %rsi
callq 0xef0d5
movb %al, 0x110(%rsp,%r13)
incq %r13
addq 0x108(%rsp), %rbp
cmpq %r13, %r15
jne 0xe5c6d
movq 0x80(%rsp), %rax
leaq (,%rax,8), %rax
movq %rax, 0x58(%rsp)
xorl %ebp, %ebp
movq 0x50(%rsp), %r13
movq 0x100(%rsp), %r14
movq 0x40(%rsp), %r8
testq %r8, %r8
je 0xe5cf1
movb $0x7, %cl
subb %bpl, %cl
movl $0x1, %edx
shll %cl, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movzbl 0x110(%rsp,%rcx), %esi
movl $0x1, %edi
shll %cl, %edi
andl %edx, %esi
testl %esi, %esi
cmovel %esi, %edi
orb %dil, %al
incq %rcx
cmpq %rcx, %r15
jne 0xe5cce
jmp 0xe5cf3
xorl %eax, %eax
movl %eax, %edx
movb 0x88(%rsp), %cl
shrb %cl, %dl
andb 0x90(%rsp), %al
cmpb $0x1, %dl
je 0xe5d20
movzbl %dl, %ecx
cmpl $0x3, %ecx
je 0xe5d1c
cmpl $0x2, %ecx
jne 0xe5d25
movl %eax, %r12d
jmp 0xe5d57
movl %eax, %ebx
jmp 0xe5d57
movl %eax, %r14d
jmp 0xe5d57
movzbl %al, %eax
movq 0x10(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
movl %r14d, %r12d
shrl $0x10, %r12d
movl $0xff, %eax
andl %eax, %r12d
movl 0x1c(%rsp), %ecx
shrl %cl, %r12d
movl %r14d, %ebx
shrl $0x8, %ebx
andl %eax, %ebx
shrl %cl, %ebx
andl %eax, %r14d
shrl %cl, %r14d
cmpl $0x6, %r8d
jne 0xe5d78
movl %r12d, %eax
shlb $0x4, %al
orb %r12b, %al
movl %ebx, %ecx
shlb $0x4, %cl
orb %bl, %cl
movl %r14d, %edx
shlb $0x4, %dl
orb %r14b, %dl
jmp 0xe5da7
leal (,%r12,4), %ecx
movl %r12d, %eax
shrb $0x4, %al
orb %cl, %al
leal (,%rbx,4), %edx
movl %ebx, %ecx
shrb $0x4, %cl
orb %dl, %cl
leal (,%r14,4), %esi
movl %r14d, %edx
shrb $0x4, %dl
orb %sil, %dl
movq 0x58(%rsp), %rsi
addq %rbp, %rsi
movzbl %al, %eax
shll $0x10, %eax
movzbl %cl, %edi
shll $0x8, %edi
orl %eax, %edi
movzbl %dl, %ecx
orl %edi, %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movq %r13, %rdi
movq 0x38(%rsp), %rdx
callq 0xf2b02
incq %rbp
cmpq $0x8, %rbp
jne 0xe5cb4
movq 0x80(%rsp), %rcx
incq %rcx
incq 0xc0(%rsp)
movq %rcx, 0x80(%rsp)
cmpq 0xf0(%rsp), %rcx
movq 0x40(%rsp), %rdx
jne 0xe5c4d
movq 0x38(%rsp), %rcx
incq %rcx
movq 0x78(%rsp), %rax
addq 0xd8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rcx, 0x38(%rsp)
cmpq 0x10(%r13), %rcx
jl 0xe5bf7
movq 0xc8(%rsp), %rbp
jmp 0xe5eac
movq %rdx, 0x110(%rsp)
movq %r15, %rdi
leaq 0x486c3(%rip), %rsi     # 0x12e518
xorl %eax, %eax
callq 0xe9226
cmpq $0x0, 0x20(%rbp)
leaq 0x110(%rsp), %r12
jle 0xe5eac
xorl %ebx, %ebx
cmpq $0x0, 0x18(%rbp)
jle 0xe5ea3
xorl %r14d, %r14d
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xef1ed
movl %eax, %edi
callq 0xecf84
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %eax, %ecx
callq 0xf2afd
incq %r14
cmpq 0x18(%rbp), %r14
jl 0xe5e77
incq %rbx
cmpq 0x20(%rbp), %rbx
jl 0xe5e6d
movq 0x48(%rsp), %r14
movq 0x68(%rbp), %rsi
movq 0x70(%rsp), %rdx
cmpq %rsi, %rdx
setl %al
leaq 0x34(%rsi), %rcx
cmpq %rcx, %rdx
setge %cl
orb %al, %cl
movq 0xe8(%rsp), %rdi
movq 0xe0(%rsp), %r10
je 0xe5f13
movq 0xb0(%rsp), %r8
leaq 0x1(%r8), %rax
movq %r14, %rcx
xorl %r14d, %r14d
cmpq $0xc, %r8
setge %r14b
movl $0x0, %r12d
cmovlq %rax, %r12
addq %rcx, %r14
movq %r10, %rbx
movq %rdi, %r15
movq %r8, %rdi
movq %rcx, %r10
jmp 0xe5f36
leaq 0x1(%r10), %rax
xorl %r15d, %r15d
cmpq $0x3, %r10
movl $0x0, %ebx
cmovlq %rax, %rbx
setge %r15b
addq %rdi, %r15
movq 0xb0(%rsp), %r12
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0xe5f76
movq 0x18(%rbp), %r8
movq 0x20(%rbp), %r9
leaq 0x2(%r9), %rax
imulq %r10, %rax
leaq 0x2(%r8), %r10
imulq %rdi, %r10
subq $0x8, %rsp
movq %r13, %rdi
movq %rcx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
pushq $0x0
pushq %rax
pushq %r10
callq 0xf3d2f
addq $0x20, %rsp
jmp 0xe5f9c
movq 0x28(%rsp), %rdi
movq 0x60(%rsp), %r13
movq %r13, %rcx
callq 0xe649f
movq 0x50(%rsp), %rdi
movq %r13, %rsi
movq 0x50(%rsp), %r13
xorl %edx, %edx
callq 0xf2917
cmpb $0x0, 0x2(%rbp)
jne 0xe5fd2
movq 0x30(%rsp), %rcx
addq 0x68(%rsp), %rcx
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x18(%rax), %rcx
jle 0xe5fd2
movq 0x28(%rsp), %rdi
leaq 0x5f66f(%rip), %rsi     # 0x145636
xorl %eax, %eax
callq 0xe9df7
movb $0x1, 0x2(%rbp)
cmpq $0x0, 0x20(%rsp)
jne 0xe5fe4
cmpb $0x0, 0x2(%rbp)
jne 0xe606e
movq 0x28(%rsp), %r13
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x70(%rsp), %rdx
incq %rdx
movq 0x68(%rsp), %rax
addq %rax, 0xa8(%rsp)
movq %r15, %rcx
movq %r13, %r15
movq 0x50(%rsp), %r13
movq %r12, %rsi
cmpq 0x48(%rbp), %rdx
leaq 0x8(%rsp), %r12
jl 0xe58ef
jmp 0xe604e
movq 0x28(%rbp), %rcx
movq 0x30(%rbp), %r8
movq 0x30(%rsp), %rsi
movq 0x10(%rsp), %r9
pushq $0x2
pushq %r13
callq 0xf36f9
addq $0x10, %rsp
jmp 0xe5eb1
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
movq 0x60(%rsp), %rbx
je 0xe6082
xorl %esi, %esi
xorl %edx, %edx
movq %rdi, %r14
callq 0xf2923
jmp 0xe556f
movq 0x28(%rsp), %r15
movq 0x60(%rsp), %rbx
movq 0x20(%rsp), %r14
jmp 0xe556f
xorl %r14d, %r14d
jmp 0xe556f