// File: /workspace/github_cpp_makefile_star2_O1/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 0x19ea(%rip), %rsi      # 0x411b
leaq -0x458(%rbp), %rbx
movq %rbx, %rdi
movl $0x2, %edx
callq 0x2350
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x438(%rbp,%rax)
jne 0x295b
leaq -0x458(%rbp), %rdi
callq 0x2320
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 0x4a5b(%rip), %r15d     # 0x7200
movl %r15d, %r12d
negl %r12d
cmovsl %r15d, %r12d
movl $0x1, %r13d
cmpl $0xa, %r12d
jb 0x2805
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x27fc
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2802
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2805
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x27c9
addl $-0x3, %r13d
jmp 0x2805
addl $-0x2, %r13d
jmp 0x2805
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 0x32d6
leaq 0x17ef(%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 0x287e
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x2885
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 0x28be
movq -0x240(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x250(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x4, %edx
callq 0x2360
leaq -0x250(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r14, %rdx
callq 0x2240
leaq -0x250(%rbp), %rdi
callq 0x2280
movq 0x46d7(%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 0x293d
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 0x2380
movq %rax, %rbx
jmp 0x2999
movq %rax, %rbx
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x29b3
movq -0x240(%rbp), %rsi
jmp 0x29a6
jmp 0x29b0
jmp 0x29b0
jmp 0x29b0
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
callq 0x22a0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x29b3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x29b3
movq %rax, %rbx
leaq -0x458(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2330