// File: /workspace/github_c_makefile_star2_O1/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
movl $0x2, %ecx
movq %r14, %rsi
xorl %edx, %edx
callq 0xeeee8
movb (%r14), %al
movb 0x1(%r14), %cl
movl %eax, %edx
xorb $-0x3b, %dl
movl %ecx, %esi
xorb $-0x30, %sil
orb %dl, %sil
jne 0x445a8
leaq 0xd7f9b(%rip), %rsi     # 0x11c418
movq %rbx, %rdi
callq 0xeb6d6
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xef37e
movq %rax, %rbp
movq 0x18(%rbx), %rdi
movl $0x8, %esi
callq 0xef37e
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0xc, %esi
callq 0xef37e
movq %rax, %r12
movq 0x18(%rbx), %rdi
movl $0x10, %esi
callq 0xef37e
movq %rax, %r13
movq 0x18(%rbx), %rdi
movl $0x14, %esi
callq 0xef37e
movq %rax, 0x28(%rsp)
movq 0x18(%rbx), %rdi
movl $0x18, %esi
callq 0xef37e
movq %rax, %r15
testq %r14, %r14
jle 0x44524
leaq 0xd7f2a(%rip), %rsi     # 0x11c423
movq %rbx, %rdi
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0xd7ec3(%rip), %rcx     # 0x11c3d6
movq %rbp, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf0321
testq %r13, %r13
jle 0x4455f
leaq 0xd7f11(%rip), %rsi     # 0x11c441
movq %rbx, %rdi
movl %r12d, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0xd7f14(%rip), %rcx     # 0x11c45f
movq %r12, %rsi
movq %r13, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xf0321
testq %r15, %r15
jle 0x4469a
leaq 0xd7efc(%rip), %rsi     # 0x11c46b
movq %rbx, %rdi
movq 0x28(%rsp), %r14
movl %r14d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
leaq 0xd7efb(%rip), %rcx     # 0x11c48a
movq %r14, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xf0321
jmp 0x4469a
xorb $0x25, %al
xorb $0x21, %cl
orb %al, %cl
jne 0x44689
leaq 0xd7e1e(%rip), %rsi     # 0x11c3da
movq %rbx, %rdi
callq 0xeb6d6
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rcx
xorl %esi, %esi
callq 0xf1c72
testl %eax, %eax
je 0x4469a
movabsq $0x506e696765422525, %r14 # imm = 0x506E696765422525
movabsq $0x3a77656976657250, %r12 # imm = 0x3A77656976657250
leaq 0x10(%rsp), %r13
leaq 0x30(%rsp), %rbp
xorl %r15d, %r15d
movl 0x10(%rsp), %ecx
movl 0x30(%rsp), %r8d
movq %rbx, %rdi
leaq 0xd7e81(%rip), %rsi     # 0x11c496
movl %r15d, %edx
xorl %eax, %eax
callq 0xe93cf
cmpq $0x400, 0x10(%rsp)      # imm = 0x400
jl 0x44633
movq $0x3ff, 0x10(%rsp)      # imm = 0x3FF
movq 0x18(%rbx), %rdi
movq 0x10(%rsp), %rcx
leaq 0x50(%rsp), %rsi
movq %r15, %rdx
callq 0xeeee8
movq 0x10(%rsp), %rax
movb $0x0, 0x50(%rsp,%rax)
movq 0x50(%rsp), %rax
xorq %r14, %rax
movq 0x57(%rsp), %rcx
xorq %r12, %rcx
orq %rax, %rcx
je 0x446ac
addq 0x30(%rsp), %r15
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0xf1c72
testl %eax, %eax
jne 0x44602
jmp 0x4469a
leaq 0xd7d78(%rip), %rsi     # 0x11c408
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
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 0xe969b
movq %rax, %r14
leaq 0xd7df8(%rip), %rsi     # 0x11c4c5
leaq 0x24(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x1c(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %r12, %rdi
xorl %eax, %eax
callq 0x18220
cmpl $0x4, %eax
jne 0x447bd
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
movl 0x1c(%rsp), %r8d
movl 0x18(%rsp), %r9d
leaq 0xd7de6(%rip), %rsi     # 0x11c4f3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9226
movslq 0x24(%rsp), %rax
movq %rax, (%r14)
movslq 0x20(%rsp), %rcx
movq %rcx, 0x8(%r14)
movslq 0x1c(%rsp), %r8
movq %r8, 0x18(%r14)
movslq 0x18(%rsp), %rdx
movq %rdx, 0x28(%r14)
cmpq $0x8, %r8
ja 0x44922
movl $0x116, %edx            # imm = 0x116
btl %r8d, %edx
jae 0x44922
imulq %r8, %rax
leaq 0x7(%rax), %rdx
addq $0xe, %rax
testq %rdx, %rdx
cmovnsq %rdx, %rax
movq %rax, %rdx
sarq $0x3, %rdx
movq %rdx, 0x20(%r14)
andq $-0x8, %rax
cqto
idivq %r8
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %rax, %rsi
movq %rcx, %rdx
callq 0xf241d
testl %eax, %eax
je 0x44936
movq $-0x186a1, %rax         # imm = 0xFFFE795F
movq 0x28(%r14), %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0x447c9
leaq 0xd7d79(%rip), %rsi     # 0x11c527
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
jmp 0x44936
leaq 0xd7d0e(%rip), %rsi     # 0x11c4d2
jmp 0x44690
movq $0x0, 0x30(%r14)
movq 0x8(%r14), %rsi
imulq 0x10(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf0faf
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%r14)
jle 0x4488f
xorl %ebp, %ebp
leaq 0x38(%rsp), %r13
movq 0x18(%rbx), %rdi
movq %r15, %rsi
leaq 0x40(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0xf1c72
testl %eax, %eax
je 0x4488f
cmpq $0x0, 0x40(%rsp)
jle 0x4487d
xorl %r12d, %r12d
movq 0x18(%rbx), %rdi
leaq (%r15,%r12), %rsi
callq 0xef0d5
movzbl %al, %edi
movq %r13, %rsi
callq 0xec1cc
cmpl $0x0, 0x38(%rsp)
jne 0x44873
movq 0x30(%r14), %rcx
testb $0x1, %cl
jne 0x44852
movb %al, 0x48(%r14)
orq $0x1, %rcx
jmp 0x4486f
movb 0x48(%r14), %cl
shlb $0x4, %cl
orb %al, %cl
movzbl %cl, %esi
movq 0x28(%rsp), %rdi
callq 0xf11be
movq 0x30(%r14), %rcx
incq %rcx
movq %rcx, 0x30(%r14)
incq %r12
cmpq 0x40(%rsp), %r12
jl 0x44820
addq 0x48(%rsp), %r15
incq %rbp
cmpq 0x28(%r14), %rbp
jl 0x447fb
movq 0x10(%r14), %rdx
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movl $0x1, %r8d
callq 0xf2ce6
movq %rax, %r15
movq %r14, %r13
addq $0x4c, %r13
movb 0x18(%r14), %cl
movl $0x1, %esi
shlq %cl, %rsi
movq %r13, %rdi
movl $0x1, %edx
callq 0xf41f4
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movl $0x0, (%rsp)
movq 0x28(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %r8
movq %r15, %r9
callq 0xf35b8
cmpq $0x1, 0x18(%r14)
movl $0x9, %eax
movl $0x3, %edx
cmovel %eax, %edx
leaq 0xd0d05(%rip), %rsi     # 0x11560d
movq %r15, %rdi
callq 0xf2923
movq %r15, %rdi
callq 0xf28d4
movq %r12, %rdi
callq 0xf0b13
jmp 0x44936
leaq 0xd7bde(%rip), %rsi     # 0x11c507
movq %rbx, %rdi
movl %r8d, %edx
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe9752
jmp 0x4469a