// File: /workspace/github_c_makefile_star2_O3/lmcilroy[P]lzm/lzm.c
// Function: main
int
main(int argc, char **argv)
{
	struct compress_args args;
	int ret = 0;
	int err;
	int c;

	args.format = LZM_FORMAT_1;
	args.level = LZM_LEVEL_DEF;
	args.compress = true;
	args.console = false;
	args.clobber = false;
	args.recurse = false;
	args.remove = true;
	args.benchmark = false;
	args.verbose = false;
	args.test = false;
	args.chunk_size = CHUNK_SIZE;
	args.bench_tests = BENCH_TESTS;

	while ((c = getopt(argc, argv, "01234567b:cdfhkrtvx:")) != EOF) {
		switch (c) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
			args.level = c - '0';
			break;
		case 'b':
			args.benchmark = true;
			args.bench_tests = strtoul(optarg, NULL, 0);
			if (args.bench_tests == 0 || args.bench_tests > 100) {
				printf("Tests must be non-zero and max 100.\n");
				exit(1);
			}
			break;
		case 'c':
			args.console = true;
			break;
		case 'd':
			args.compress = false;
			break;
		case 'f':
			args.clobber = true;
			break;
		case 'k':
			args.remove = false;
			break;
		case 'r':
			args.recurse = true;
			break;
		case 't':
			args.test = true;
			break;
		case 'v':
			args.verbose = true;
			break;
		case 'x':
			args.chunk_size = strtoul(optarg, NULL, 0);
			if (args.chunk_size >= (1 << 22)) {
				printf("Chunk size too large.\n");
				exit(1);
			}
			args.chunk_size <<= 10;
			break;
		case 'h':
		default:
			usage();
			exit(1);
			break;
		}
	}

	pagesize = sysconf(_SC_PAGESIZE);
	if (pagesize <= 0)
		pagesize = 4096;

	if (optind == argc) {
		usage();
		exit(1);
	}

	while (optind < argc) {
		args.filename = argv[optind];
		err = process_path(&args);
		if (ret == 0)
			ret = err;
		optind++;
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10f8, %rsp           # imm = 0x10F8
movq %rsi, %rbx
movl %edi, %ebp
movaps 0x3237(%rip), %xmm0     # 0x6010
movups %xmm0, 0x10d8(%rsp)
movaps 0x3238(%rip), %xmm0     # 0x6020
movups %xmm0, 0x10c8(%rsp)
movaps 0x3239(%rip), %xmm0     # 0x6030
movups %xmm0, 0x10e8(%rsp)
leaq 0x32be(%rip), %r14      # 0x60c4
leaq 0x327b(%rip), %r15      # 0x6088
movq 0x61c4(%rip), %r12      # 0x8fd8
leaq 0x3245(%rip), %r13      # 0x6060
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1200
cmpl $0x61, %eax
jle 0x2e6b
leal -0x62(%rax), %ecx
cmpl $0x9, %ecx
ja 0x2e80
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x1, 0x10e8(%rsp)
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1210
movl %eax, 0x10f4(%rsp)
addl $-0x65, %eax
cmpl $-0x65, %eax
ja 0x2e1b
jmp 0x326d
leal -0x30(%rax), %ecx
cmpl $0x8, %ecx
jae 0x2f2c
movl %ecx, 0x10d0(%rsp)
jmp 0x2e1b
addl $-0x72, %eax
cmpl $0x6, %eax
ja 0x327b
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movl $0x1, 0x10e0(%rsp)
jmp 0x2e1b
movl $0x0, 0x10e4(%rsp)
jmp 0x2e1b
movl $0x1, 0x10dc(%rsp)
jmp 0x2e1b
movl $0x1, 0x10d8(%rsp)
jmp 0x2e1b
movl $0x0, 0x10c8(%rsp)
jmp 0x2e1b
movl $0x1, 0x10f0(%rsp)
jmp 0x2e1b
movl $0x1, 0x10ec(%rsp)
jmp 0x2e1b
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1210
cmpl $0x400000, %eax         # imm = 0x400000
jae 0x3264
shll $0xa, %eax
movl %eax, 0x10d4(%rsp)
jmp 0x2e1b
cmpl $-0x1, %eax
jne 0x327b
movl $0x1e, %edi
callq 0x11f0
testq %rax, %rax
movl $0x1000, %ecx           # imm = 0x1000
cmovgq %rax, %rcx
movq %rcx, 0x62f6(%rip)      # 0x9248
movq 0x6077(%rip), %r15      # 0x8fd0
movl (%r15), %eax
cmpl %ebp, %eax
je 0x327b
xorl %r13d, %r13d
cmpl %ebp, %eax
jge 0x324f
leaq 0x28(%rsp), %r12
xorl %r13d, %r13d
cltq
movq (%rbx,%rax,8), %rdi
movq %rdi, 0xc0(%rsp)
cmpb $0x2d, (%rdi)
jne 0x2f94
cmpb $0x0, 0x1(%rdi)
je 0x30dd
movq %r12, %rsi
callq 0x11b0
testl %eax, %eax
js 0x3186
movl 0x40(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x30c3
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x31cd
cmpl $0x0, 0x10e0(%rsp)
je 0x31e2
movq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x14, %esi
xorl %edx, %edx
callq 0x1190
testq %rax, %rax
je 0x31fa
movq %rax, %r15
movq %rax, %rdi
callq 0x1100
testq %rax, %rax
je 0x310e
movq %rax, %r12
xorl %r14d, %r14d
movzwl 0x62(%r12), %eax
addl $-0x4, %eax
cmpl $0x6, %eax
ja 0x303b
leaq 0x3072(%rip), %rcx      # 0x60a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0x1100
movq %rax, %r12
testq %rax, %rax
jne 0x301d
jmp 0x3111
movq 0x30(%r12), %rax
movq %rax, 0xc0(%rsp)
movq 0x68(%r12), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x3334
testl %r14d, %r14d
cmovel %eax, %r14d
jmp 0x303b
callq 0x1050
movl (%rax), %edi
movl %edi, 0x4(%rsp)
movq 0x5f66(%rip), %rax      # 0x8ff8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%r12), %r12
callq 0x1260
movq 0x8(%rsp), %rdi
leaq 0x32a5(%rip), %rsi      # 0x6355
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
movl 0x4(%rsp), %eax
jmp 0x3077
movq %r12, 0xb8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x3334
jmp 0x3167
xorl %edi, %edi
callq 0x1090
testl %eax, %eax
jne 0x3238
leaq 0x3053(%rip), %rax      # 0x6146
movq %rax, 0xc0(%rsp)
cmpl $0x0, 0x10f0(%rsp)
je 0x3127
xorl %edi, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
jmp 0x315a
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x10e0
movq 0x5eb0(%rip), %r15      # 0x8fd0
leaq 0x28(%rsp), %r12
jmp 0x316a
movl $0x1, %edi
callq 0x1090
testl %eax, %eax
jne 0x323f
leaq 0xc0(%rsp), %rax
movabsq $0x2974756f64747328, %rcx # imm = 0x2974756F64747328
movq %rcx, 0x8(%rax)
movb $0x0, 0x10(%rax)
xorl %edi, %edi
movl $0x1, %esi
leaq 0xb8(%rsp), %rdx
callq 0x3ae0
movl %eax, %r14d
testl %r13d, %r13d
cmovel %r14d, %r13d
movl (%r15), %eax
incl %eax
movl %eax, (%r15)
cmpl %ebp, %eax
jl 0x2f77
jmp 0x324f
callq 0x1050
movl (%rax), %r14d
movq 0x5e63(%rip), %rax      # 0x8ff8
movq (%rax), %r15
movq 0xc0(%rsp), %r12
movl %r14d, %edi
callq 0x1260
movq %r15, %rdi
movq 0x5e1e(%rip), %r15      # 0x8fd0
leaq 0x2f20(%rip), %rsi      # 0x60d9
movq %r12, %rdx
leaq 0x28(%rsp), %r12
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x316a
leaq 0xc0(%rsp), %rdi
callq 0x12a4
movl $0x16, %r14d
jmp 0x316a
leaq 0xc0(%rsp), %rdi
callq 0x1280
movl $0x15, %r14d
jmp 0x316a
callq 0x1050
movl (%rax), %r14d
movq 0x5def(%rip), %rax      # 0x8ff8
movq (%rax), %r15
movq 0xc0(%rsp), %r12
movl %r14d, %edi
callq 0x1260
movq %r15, %rdi
leaq 0x3114(%rip), %rsi      # 0x633a
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x3119
callq 0x12c8
jmp 0x3244
callq 0x12ea
movl $0x5, %r14d
jmp 0x316a
movl %r13d, %eax
addq $0x10f8, %rsp           # imm = 0x10F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3342(%rip), %rdi      # 0x65ad
jmp 0x3274
leaq 0x334f(%rip), %rdi      # 0x65c3
callq 0x1080
jmp 0x3280
callq 0x328a
movl $0x1, %edi
callq 0x1230