// File: /workspace/github_cpp_makefile_star2_O3/ch4rli3kop[P]ch4rli3-fuzzer/main.cc
// Function: Add_cur_input()
void Add_cur_input(){
	ifstream in("out/cur_input.j2k", ios::ate);
	if (in.fail()){
        perror("open cur_input error!\n");
        exit(-1);
    }
	uint32_t length = in.tellg();
	in.seekg(0, ios::beg);
	uint8_t* buf = new uint8_t[length+1];
    in.read((char*)buf, length);
	
	string fileName = "out/crash/input_" + to_string(crash);
	ofstream out(fileName, ios::binary);
	out.write((char*)buf, length);
	out.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
leaq 0x19f2(%rip), %rsi      # 0x4118
leaq -0x458(%rbp), %rbx
movq %rbx, %rdi
movl $0x2, %edx
callq 0x2340
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x438(%rbp,%rax)
jne 0x2950
leaq -0x458(%rbp), %rdi
callq 0x2310
movq %rax, %r14
leaq -0x458(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2250
leal 0x1(%r14), %edi
callq 0x2030
movq %rax, %rbx
movl %r14d, %r14d
leaq -0x458(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2230
movq %rbx, -0x50(%rbp)
movl 0x4a5e(%rip), %r15d     # 0x71f8
movl %r15d, %r12d
negl %r12d
cmovsl %r15d, %r12d
movl $0x1, %r13d
cmpl $0xa, %r12d
jb 0x27fa
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x27f1
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x27f7
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x27fa
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x27be
addl $-0x3, %r13d
jmp 0x27fa
addl $-0x2, %r13d
jmp 0x27fa
decl %r13d
shrl $0x1f, %r15d
leal (%r15,%r13), %esi
leaq -0x240(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x250(%rbp), %rdi
movl $0x2d, %edx
callq 0x2200
leaq -0x250(%rbp), %rbx
addq (%rbx), %r15
movq %r15, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x32da
leaq 0x17fa(%rip), %rcx      # 0x4037
movl $0x10, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2873
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x287a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x28b3
movq -0x240(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x250(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x4, %edx
callq 0x2350
leaq -0x250(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r14, %rdx
callq 0x2240
leaq -0x250(%rbp), %rdi
callq 0x2270
movq 0x46e2(%rip), %rax      # 0x6fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x248(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x250(%rbp,%rcx)
callq 0x2160
leaq -0x158(%rbp), %rdi
callq 0x20a0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x2932
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x458(%rbp), %rdi
callq 0x2060
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2370
movq %rax, %rbx
jmp 0x298e
movq %rax, %rbx
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x29a8
movq -0x240(%rbp), %rsi
jmp 0x299b
jmp 0x29a5
jmp 0x29a5
jmp 0x29a5
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
callq 0x2290
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x29a8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x29a8
movq %rax, %rbx
leaq -0x458(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2320