// File: /workspace/github_cpp_makefile_star2_O3/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 0x9d99(%rip), %rax      # 0xdfd0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq 0x9d6b(%rip), %rax      # 0xdfb0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x44(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x2c(%rbp)
leaq 0x5170(%rip), %rbx      # 0x93d4
leaq 0x9e95(%rip), %r14      # 0xe100
leaq 0x512a(%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 0x4346
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
testb $0x1, -0x2c(%rbp)
jne 0x43c5
leaq 0x9f4a(%rip), %rax      # 0xe1f8
incl (%rax)
jmp 0x4272
movb $0x1, %al
movl %eax, -0x2c(%rbp)
leaq 0x9f3a(%rip), %rax      # 0xe1f8
cmpl $0x0, (%rax)
jle 0x4272
jmp 0x43d1
movq 0x9cf1(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq -0x38(%rbp), %rdi
movq 0x9cf3(%rip), %rax      # 0xdfd0
cmpq (%rax), %rdi
je 0x42ef
movq %rcx, -0x38(%rbp)
callq 0x30a0
movq -0x38(%rbp), %rcx
movq %rcx, %rdi
leaq 0x5106(%rip), %rsi      # 0x93ff
callq 0x30c0
movq %rax, -0x38(%rbp)
jmp 0x4272
movq 0x9cb2(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq -0x40(%rbp), %rdi
movq 0x9cb4(%rip), %rax      # 0xdfd0
cmpq (%rax), %rdi
je 0x432e
movq %rcx, -0x40(%rbp)
callq 0x30a0
movq -0x40(%rbp), %rcx
movq %rcx, %rdi
leaq 0x50c5(%rip), %rsi      # 0x93fd
callq 0x30c0
movq %rax, -0x40(%rbp)
jmp 0x4272
cmpl $-0x1, %eax
jne 0x43d8
movq -0x38(%rbp), %r12
testq %r12, %r12
setne %al
movq -0x40(%rbp), %r14
testq %r14, %r14
setne %cl
testb %cl, %al
je 0x43a3
movzbl -0x2c(%rbp), %ecx
andl $0x1, %ecx
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x36e3
movl %eax, %ebx
movq 0x9c2c(%rip), %r15      # 0xdfb0
cmpq (%r15), %r12
je 0x4394
movq %r12, %rdi
callq 0x30a0
movq (%r15), %r12
cmpq %r12, %r14
je 0x43b4
movq %r14, %rdi
callq 0x30a0
jmp 0x43b4
leaq 0x5072(%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 0x43b4
callq 0x3429
jmp 0x43ca
callq 0x4208
movl $0x1, %edi
callq 0x30e0
callq 0x4208
xorl %edi, %edi
callq 0x30e0
nop