// File: /workspace/github_cpp_makefile_star2_O2/sbingner[P]kerneldec/main.c
// Function: main
int main(int argc,char**argv)
{
    FILE *input=stdin, *output=stdout;
    char *kppfile = NULL;
    const char *infile = "stdin";
    const char *outfile = "stdout";
    bool quiet=false;

    int option_index = 0;
    int c;
    while ((c = getopt_long(argc, argv, "hdi:k:o:q", long_options, &option_index)) != -1) {
        switch (c) {
            case 'd':
                if (quiet) {
                    fprintf(stderr, "Can't have quiet debug output\n");
                    return -1;
                }
                g_debug++;
                break;
            case 'h':
                usage();
                exit(0);
                break;
            case 'i':
		infile = optarg;
		if (input != stdin)
		    fclose(input);
		input = fopen(infile, "r");
		break;
            case 'k':
		kppfile = optarg;
		break;
	    case 'o':
		outfile = optarg;
		if (output != stdin)
		    fclose(output);
		output = fopen(outfile, "w");
		break;
            case 'q':
                if (g_debug>0) {
                    fprintf(stderr, "Can't have quiet debug output\n");
                    return -1;
                }
                quiet=true;
                break;
	    default:
		usage();
		exit(1);
		break;
	}
    }

    if (!output || !input) {
	usage();
	return 1;
    }

    FILE *kppfh = NULL;
    if (kppfile != NULL) {
    }

    int rv = decompress_kernel(input, output, kppfh, quiet);

    if (output != stdout)
	fclose(output);

    if (input != stdout)
	fclose(input);

    if (kppfh) {
        fclose(kppfh);
    }

    return rv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movl %edi, %r12d
movq 0x8fd5(%rip), %rax      # 0xcfd0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq 0x8fa7(%rip), %rax      # 0xcfb0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x44(%rbp), %rax
andl $0x0, (%rax)
movl $0x0, -0x2c(%rbp)
leaq 0x43af(%rip), %rbx      # 0x83d4
leaq 0x90d4(%rip), %r14      # 0xd100
leaq 0x4369(%rip), %r13      # 0x839c
movl %r12d, %edi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq -0x44(%rbp), %r8
callq 0x3180
leal -0x64(%rax), %ecx
cmpl $0xd, %ecx
ja 0x4107
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
testb $0x1, -0x2c(%rbp)
jne 0x417d
leaq 0x9189(%rip), %rax      # 0xd1f8
incl (%rax)
jmp 0x4033
movb $0x1, %al
movl %eax, -0x2c(%rbp)
leaq 0x9179(%rip), %rax      # 0xd1f8
cmpl $0x0, (%rax)
jle 0x4033
jmp 0x417d
movq 0x8f30(%rip), %rax      # 0xcfc0
movq (%rax), %rcx
movq -0x38(%rbp), %rdi
movq 0x8f32(%rip), %rax      # 0xcfd0
cmpq (%rax), %rdi
je 0x40b0
movq %rcx, -0x38(%rbp)
callq 0x30a0
movq -0x38(%rbp), %rcx
movq %rcx, %rdi
leaq 0x4345(%rip), %rsi      # 0x83ff
callq 0x30c0
movq %rax, -0x38(%rbp)
jmp 0x4033
movq 0x8ef1(%rip), %rax      # 0xcfc0
movq (%rax), %rcx
movq -0x40(%rbp), %rdi
movq 0x8ef3(%rip), %rax      # 0xcfd0
cmpq (%rax), %rdi
je 0x40ef
movq %rcx, -0x40(%rbp)
callq 0x30a0
movq -0x40(%rbp), %rcx
movq %rcx, %rdi
leaq 0x4304(%rip), %rsi      # 0x83fd
callq 0x30c0
movq %rax, -0x40(%rbp)
jmp 0x4033
cmpl $-0x1, %eax
jne 0x419d
movq -0x38(%rbp), %r12
testq %r12, %r12
setne %al
movq -0x40(%rbp), %r14
testq %r14, %r14
setne %cl
testb %cl, %al
je 0x4164
movzbl -0x2c(%rbp), %ecx
andl $0x1, %ecx
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3455
movl %eax, %ebx
movq 0x8e6b(%rip), %r15      # 0xcfb0
cmpq (%r15), %r12
je 0x4155
movq %r12, %rdi
callq 0x30a0
movq (%r15), %r12
cmpq %r12, %r14
je 0x416c
movq %r14, %rdi
callq 0x30a0
jmp 0x416c
callq 0x3fcc
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8e54(%rip), %rax      # 0xcfd8
movq (%rax), %rcx
leaq 0x4250(%rip), %rdi      # 0x83de
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x31a0
pushq $-0x1
jmp 0x416b
callq 0x3fcc
pushq $0x1
popq %rdi
callq 0x30e0
callq 0x3fcc
xorl %edi, %edi
callq 0x30e0
nop