// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/binhex.c
// Function: de_run_binhex
static void de_run_binhex(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	int ret;

	d = de_malloc(c, sizeof(lctx));
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_MACROMAN);

	ret = find_start(c, &pos);
	if(!ret) {
		de_err(c, "Not a BinHex file, or not a supported type");
		goto done;
	}

	do_binhex(c, d, pos);

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movl $0x170, %esi            # imm = 0x170
callq 0xdecaf
movq %rax, %r14
pushq $0x11
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe08d2
movl %eax, (%r14)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ee33
testl %eax, %eax
je 0x2e93c
movq 0x10(%rsp), %r15
leaq 0x70(%r14), %r12
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movl $0xff, %esi
callq 0x18140
xorl %eax, %eax
leaq 0xdb6ca(%rip), %rcx     # 0x109ed0
cmpq $0x40, %rax
je 0x2e819
movzbl (%rax,%rcx), %edx
movb %al, (%r12,%rdx)
incq %rax
jmp 0x2e806
leaq 0xdb592(%rip), %rsi     # 0x109db2
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe59cd
movq %rax, 0x8(%r14)
movq %rax, %rdi
callq 0xe589c
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe59cd
movq %rax, 0x10(%r14)
movq %rax, %rdi
callq 0xe589c
xorl %ecx, %ecx
movabsq $0x100002600, %r13      # imm = 0x100002600
xorl %ebp, %ebp
movb %cl, 0x8(%rsp)
movq 0x18(%rbx), %rdi
cmpq 0x18(%rdi), %r15
jge 0x2ed28
movq %r15, %rsi
callq 0xe3eb4
movzbl %al, %eax
cmpb $0x3a, %al
ja 0x2e8a7
btq %rax, %r13
jae 0x2e89d
incq %r15
jmp 0x2e875
cmpq $0x3a, %rax
je 0x2e952
movb (%r12,%rax), %cl
cmpb $0x40, %cl
jae 0x2ed14
incq %r15
movl %ebp, %eax
leaq 0xdb418(%rip), %rdx     # 0x109cd8
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
pushq $0x6
popq %rbp
jmpq *%rax
movb 0x8(%rsp), %dl
shlb $0x4, %dl
movl %ecx, %eax
shrb $0x2, %al
orb %dl, %al
movq 0x8(%r14), %rdi
movzbl %al, %esi
movl %ecx, %ebp
callq 0xe5bc5
movl %ebp, %ecx
andb $0x3, %cl
pushq $0x2
popq %rbp
jmp 0x2e871
movb 0x8(%rsp), %dl
shlb $0x2, %dl
movl %ecx, %eax
shrb $0x4, %al
orb %dl, %al
movq 0x8(%r14), %rdi
movzbl %al, %esi
movl %ecx, %ebp
callq 0xe5bc5
movl %ebp, %ecx
andb $0xf, %cl
pushq $0x4
popq %rbp
jmp 0x2e871
movb 0x8(%rsp), %al
shlb $0x6, %al
orb %al, %cl
movq 0x8(%r14), %rdi
movzbl %cl, %esi
movl %ecx, %ebp
callq 0xe5bc5
movl %ebp, %ecx
jmp 0x2e86f
leaq 0xdb3d8(%rip), %rsi     # 0x109d1b
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x2ed5b
movq 0x8(%r14), %rdi
callq 0xe58e8
movq 0x8(%r14), %rax
movl 0x18(%rax), %edx
leaq 0xdb499(%rip), %rsi     # 0x109e02
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x8(%r14), %rdi
callq 0xe58e8
leaq 0x98(%rsp), %r15
leaq 0x20(%rsp), %r12
leaq 0xb8(%rsp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xee7ee
movq 0x8(%r14), %rax
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
movq 0x18(%rax), %rax
movq %rax, 0x10(%r15)
movq 0x10(%r14), %rax
movq %rax, (%r12)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0xeee2c
movq (%r12), %rdi
callq 0xe58e8
cmpl $0x0, (%r13)
je 0x2ea0b
leaq 0xb8(%rsp), %rsi
movq %rbx, %rdi
callq 0xee7bc
leaq 0xd9306(%rip), %rsi     # 0x107cff
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdf2a5
jmp 0x2ed31
movq 0x10(%r14), %rax
movl 0x18(%rax), %edx
leaq 0xdb3b2(%rip), %rsi     # 0x109dcb
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xf07cc
movq %rax, 0x18(%r14)
movq 0x10(%r14), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xe3eb4
movzbl %al, %r13d
leaq 0x10908a(%rip), %rsi    # 0x137ad2
movq %rbx, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
testb %r13b, %r13b
je 0x2eac6
movl (%r14), %r9d
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0xe495c
movq %rax, %r12
movq 0x18(%r14), %rax
movq 0x68(%rax), %rdi
movq 0x18(%r12), %rsi
callq 0xead71
movq 0x18(%r14), %rax
movb $0x1, 0x79(%rax)
movq 0x18(%r12), %rdi
callq 0xeb877
leaq 0xe6b1c(%rip), %rsi     # 0x1155bb
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq 0x8(%r12), %rsi
movq %r12, 0x8(%rsp)
movq 0x10(%r12), %rdx
callq 0xf0864
jmp 0x2eae6
movq 0x18(%r14), %rax
movq 0x68(%rax), %rdi
leaq 0xf9a08(%rip), %rsi     # 0x1284dd
pushq $0x5
popq %rdx
callq 0xeae42
movq $0x0, 0x8(%rsp)
leaq 0x2(%r13), %rsi
leaq 0x68(%rsp), %rdx
pushq $0x4
popq %rbp
movq %r15, %rdi
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0xe657c
leaq 0x78(%rsp), %r12
leaq 0xd8da5(%rip), %rsi     # 0x1078b0
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rax
movl -0x10(%r12), %ecx
movl %ecx, 0x90(%rax)
movq 0x18(%r14), %rax
movb $0x1, %cl
movb %cl, 0x7b(%rax)
leaq 0x6(%r13), %rsi
leaq 0x38(%rsp), %rdx
movq %r15, %rdi
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0xe657c
leaq 0x48(%rsp), %r12
leaq 0xf84c1(%rip), %rsi     # 0x127013
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rax
movl -0x10(%r12), %ecx
movl %ecx, 0x94(%rax)
movq 0x18(%r14), %rax
movb $0x1, %cl
movb %cl, 0x7c(%rax)
movb $0x1, %r12b
leaq 0xa(%r13), %rax
leaq 0x18(%rsp), %rbp
movq %rax, (%rbp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xe3f6e
movq 0x18(%r14), %rcx
movw %ax, 0x7e(%rcx)
movb %r12b, 0x7d(%rcx)
movzwl %ax, %edx
leaq 0xed545(%rip), %rsi     # 0x11c0ed
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
movq %rbp, %rsi
callq 0xe4071
leaq 0x20(%r14), %r13
movq %rax, 0x28(%r14)
leaq 0xdb24e(%rip), %rsi     # 0x109e1a
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
movq %rbp, %rsi
callq 0xe4071
movq %rax, 0x50(%r14)
leaq 0xdb23e(%rip), %rsi     # 0x109e2c
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
movq %rbp, %rsi
callq 0xe3f6e
leaq 0xf07e1(%rip), %rsi     # 0x11f3ed
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
leaq 0xfe412(%rip), %rax     # 0x12d031
movq %rax, 0x40(%r14)
leaq 0xe14a6(%rip), %rax     # 0x1100d0
movq %rax, 0x68(%r14)
movq (%rbp), %rax
movq %rax, 0x20(%r14)
movq 0x28(%r14), %rcx
leaq 0x2(%rax,%rcx), %rax
movq %rax, (%rbp)
movq %rax, 0x48(%r14)
pushq $0x20
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe0ae9
movq %rax, 0x38(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe0ae9
movq %rax, 0x60(%r14)
movq 0x18(%r14), %rcx
addq $0x10, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2ef6a
testl %eax, %eax
je 0x2ece9
movq %r14, %rbp
addq $0x48, %rbp
movq 0x18(%r14), %rcx
addq $0x38, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2ef6a
movq 0x18(%r14), %rdi
movq 0x28(%r14), %rax
testq %rax, %rax
setg 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq 0x50(%r14), %rax
testq %rax, %rax
setg 0x38(%rdi)
movq %rax, 0x40(%rdi)
movq %r14, 0x8(%rdi)
leaq 0x32e(%rip), %rax       # 0x2eff8
movq %rax, 0x60(%rdi)
callq 0xf08e8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2f03a
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2f03a
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xe4b94
movq 0x38(%r14), %rdi
callq 0xe0e8d
andq $0x0, 0x38(%r14)
movq 0x60(%r14), %rdi
callq 0xe0e8d
andq $0x0, 0x60(%r14)
jmp 0x2ed31
leaq 0xdb0cd(%rip), %rsi     # 0x109de8
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xdf2a5
movq 0x8(%r14), %rdi
callq 0xe58e8
movq 0x18(%r14), %rdi
callq 0xf0812
andq $0x0, 0x18(%r14)
movq 0x10(%r14), %rdi
callq 0xe5591
andq $0x0, 0x10(%r14)
movq 0x8(%r14), %rdi
callq 0xe5591
andq $0x0, 0x8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq