// File: /workspace/github_cpp_makefile_star2_O1/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 0x9d49(%rip), %rax      # 0xdfd0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq 0x9d1b(%rip), %rax      # 0xdfb0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x44(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x2c(%rbp)
leaq 0x5120(%rip), %rbx      # 0x93d4
leaq 0x9e45(%rip), %r14      # 0xe100
leaq 0x50da(%rip), %r13      # 0x939c
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 0x4396
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
testb $0x1, -0x2c(%rbp)
jne 0x4412
leaq 0x9efa(%rip), %rax      # 0xe1f8
incl (%rax)
jmp 0x42c2
movb $0x1, %al
movl %eax, -0x2c(%rbp)
leaq 0x9eea(%rip), %rax      # 0xe1f8
cmpl $0x0, (%rax)
jle 0x42c2
jmp 0x441e
movq 0x9ca1(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq -0x38(%rbp), %rdi
movq 0x9ca3(%rip), %rax      # 0xdfd0
cmpq (%rax), %rdi
je 0x433f
movq %rcx, -0x38(%rbp)
callq 0x30a0
movq -0x38(%rbp), %rcx
movq %rcx, %rdi
leaq 0x50b6(%rip), %rsi      # 0x93ff
callq 0x30c0
movq %rax, -0x38(%rbp)
jmp 0x42c2
movq 0x9c62(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq -0x40(%rbp), %rdi
movq 0x9c64(%rip), %rax      # 0xdfd0
cmpq (%rax), %rdi
je 0x437e
movq %rcx, -0x40(%rbp)
callq 0x30a0
movq -0x40(%rbp), %rcx
movq %rcx, %rdi
leaq 0x5075(%rip), %rsi      # 0x93fd
callq 0x30c0
movq %rax, -0x40(%rbp)
jmp 0x42c2
cmpl $-0x1, %eax
jne 0x4425
movq -0x38(%rbp), %r12
testq %r12, %r12
setne %al
movq -0x40(%rbp), %r15
testq %r15, %r15
setne %cl
testb %cl, %al
je 0x43f0
movzbl -0x2c(%rbp), %ecx
andl $0x1, %ecx
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x36e3
movl %eax, %ebx
movq 0x9bdc(%rip), %r14      # 0xdfb0
cmpq (%r14), %r12
je 0x43e1
movq %r12, %rdi
callq 0x30a0
cmpq (%r14), %r15
je 0x4401
movq %r15, %rdi
callq 0x30a0
jmp 0x4401
leaq 0x5025(%rip), %rdi      # 0x941c
callq 0x3140
movl $0x1, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x344b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x4401
callq 0x3429
jmp 0x4417
callq 0x4258
movl $0x1, %edi
callq 0x30e0
callq 0x4258
xorl %edi, %edi
callq 0x30e0