// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/eps.c
// Function: de_run_eps
static void de_run_eps(deark *c, de_module_params *mparams)
{
	u8 b[2];

	de_read(b, 0, (i64)sizeof(b));

	if(b[0]==0xc5 && b[1]==0xd0) {
		de_run_eps_binary(c);
	}
	else if(b[0]=='%' && b[1]=='!') {
		de_run_eps_normal(c);
	}
	else {
		de_err(c, "Not an EPS file");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x3e(%rsp), %r14
pushq $0x2
popq %rcx
movq %r14, %rsi
xorl %edx, %edx
callq 0xe3cb7
movb (%r14), %al
movb 0x1(%r14), %cl
movl %eax, %edx
xorb $-0x3b, %dl
movl %ecx, %esi
xorb $-0x30, %sil
orb %dl, %sil
jne 0x4265a
leaq 0xccef9(%rip), %rsi     # 0x10f438
movq %rbx, %rdi
callq 0xe07f7
movq 0x18(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0xe409f
movq %rax, %rbp
movq 0x18(%rbx), %rdi
pushq $0x8
popq %rsi
callq 0xe409f
movq %rax, %r14
movq 0x18(%rbx), %rdi
pushq $0xc
popq %rsi
callq 0xe409f
movq %rax, %r12
movq 0x18(%rbx), %rdi
pushq $0x10
popq %rsi
callq 0xe409f
movq %rax, %r13
movq 0x18(%rbx), %rdi
pushq $0x14
popq %rsi
callq 0xe409f
movq %rax, 0x28(%rsp)
movq 0x18(%rbx), %rdi
pushq $0x18
popq %rsi
callq 0xe409f
movq %rax, %r15
testq %r14, %r14
jle 0x425da
leaq 0xcce94(%rip), %rsi     # 0x10f443
movq %rbx, %rdi
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0xcce2d(%rip), %rcx     # 0x10f3f6
movq %rbp, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe4e0b
testq %r13, %r13
jle 0x42613
leaq 0xcce7b(%rip), %rsi     # 0x10f461
movq %rbx, %rdi
movl %r12d, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0xcce7e(%rip), %rcx     # 0x10f47f
pushq $0x1
popq %r9
movq %r12, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
callq 0xe4e0b
testq %r15, %r15
jle 0x42725
leaq 0xcce68(%rip), %rsi     # 0x10f48b
movq %rbx, %rdi
movq 0x28(%rsp), %r14
movl %r14d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0xcce67(%rip), %rcx     # 0x10f4aa
pushq $0x1
popq %r9
movq %r14, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0xe4e0b
jmp 0x42725
xorb $0x25, %al
xorb $0x21, %cl
orb %al, %cl
jne 0x42714
leaq 0xccd8c(%rip), %rsi     # 0x10f3fa
movq %rbx, %rdi
callq 0xe07f7
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %rbp
leaq 0xcce4e(%rip), %r13     # 0x10f4d5
pushq $0xf
popq %r14
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
movq %r15, %rsi
leaq 0x20(%rsp), %rdx
movq %r12, %rcx
callq 0xe6482
testl %eax, %eax
je 0x42725
movl 0x20(%rsp), %ecx
movl 0x30(%rsp), %r8d
movq %rbx, %rdi
leaq 0xccdfd(%rip), %rsi     # 0x10f4b6
movl %r15d, %edx
xorl %eax, %eax
callq 0xde9f1
movq 0x20(%rsp), %rcx
cmpq $0x400, %rcx            # imm = 0x400
jl 0x426df
movq $0x3ff, 0x20(%rsp)      # imm = 0x3FF
movl $0x3ff, %ecx            # imm = 0x3FF
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xe3cb7
movq 0x20(%rsp), %rax
movb $0x0, 0x50(%rsp,%rax)
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x18230
testl %eax, %eax
je 0x42737
addq 0x30(%rsp), %r15
jmp 0x4268e
leaq 0xccd0d(%rip), %rsi     # 0x10f428
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f(%rsp), %r12
addq 0x30(%rsp), %r15
movl $0x450, %esi            # imm = 0x450
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r14
leaq 0xccd8d(%rip), %rsi     # 0x10f4e5
leaq 0x1c(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
movq %r12, %rdi
xorl %eax, %eax
callq 0x18220
cmpl $0x4, %eax
jne 0x4283e
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
movl 0x14(%rsp), %r8d
movl 0x10(%rsp), %r9d
leaq 0xccd7b(%rip), %rsi     # 0x10f513
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movslq 0x1c(%rsp), %rax
movq %rax, (%r14)
movslq 0x18(%rsp), %rcx
movq %rcx, 0x8(%r14)
movslq 0x14(%rsp), %r8
movq %r8, 0x18(%r14)
movslq 0x10(%rsp), %rdx
movq %rdx, 0x28(%r14)
cmpq $0x8, %r8
ja 0x42988
movl $0x116, %edx            # imm = 0x116
btl %r8d, %edx
jae 0x42988
imulq %r8, %rax
addq $0x7, %rax
pushq $0x8
popq %rsi
cqto
idivq %rsi
movq %rax, 0x20(%r14)
shlq $0x3, %rax
cqto
idivq %r8
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
callq 0xe6be1
testl %eax, %eax
je 0x4299c
movq $-0x186a1, %rax         # imm = 0xFFFE795F
movq 0x28(%r14), %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0x4284a
leaq 0xccd18(%rip), %rsi     # 0x10f547
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x4299c
leaq 0xcccad(%rip), %rsi     # 0x10f4f2
jmp 0x4271b
andq $0x0, 0x30(%r14)
movq 0x8(%r14), %rsi
imulq 0x10(%r14), %rsi
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe59cd
movq %rax, %r12
leaq 0x38(%rsp), %r13
cmpq 0x28(%r14), %rbp
jge 0x42906
movq 0x18(%rbx), %rdi
movq %r15, %rsi
leaq 0x48(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0xe6482
testl %eax, %eax
je 0x42906
movq %rbp, 0x28(%rsp)
xorl %ebp, %ebp
cmpq 0x48(%rsp), %rbp
jge 0x428f4
movq 0x18(%rbx), %rdi
leaq (%r15,%rbp), %rsi
callq 0xe3eb4
movzbl %al, %edi
movq %r13, %rsi
callq 0xe11c4
cmpl $0x0, 0x38(%rsp)
jne 0x428ef
movq 0x30(%r14), %rcx
testb $0x1, %cl
jne 0x428d0
movb %al, 0x48(%r14)
orq $0x1, %rcx
jmp 0x428eb
movb 0x48(%r14), %cl
shlb $0x4, %cl
orb %al, %cl
movzbl %cl, %esi
movq %r12, %rdi
callq 0xe5bc5
movq 0x30(%r14), %rcx
incq %rcx
movq %rcx, 0x30(%r14)
incq %rbp
jmp 0x42897
addq 0x40(%rsp), %r15
movq 0x28(%rsp), %rbp
incq %rbp
jmp 0x4286c
movq 0x10(%r14), %rdx
movq (%r14), %rsi
movq 0x8(%r14), %rcx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %r8d
callq 0xe746f
movq %rax, %r15
movq %r14, %r13
addq $0x4c, %r13
movb 0x18(%r14), %cl
pushq $0x1
popq %rsi
shlq %cl, %rsi
movq %r13, %rdi
movl %ebp, %edx
callq 0xe87a8
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
andl $0x0, (%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %r8
movq %r15, %r9
callq 0xe7cbc
cmpq $0x1, 0x18(%r14)
pushq $0x9
popq %rax
pushq $0x3
popq %rdx
cmovel %eax, %edx
leaq 0xc5cbf(%rip), %rsi     # 0x10862d
movq %r15, %rdi
callq 0xe70b7
movq %r15, %rdi
callq 0xe7084
movq %r12, %rdi
callq 0xe5591
jmp 0x4299c
leaq 0xccb98(%rip), %rsi     # 0x10f527
movq %rbx, %rdi
movl %r8d, %edx
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
jmp 0x42725