// File: /workspace/github_c_makefile_star2_O1/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
movl $0xffffffff, 0x10d0(%rsp) # imm = 0xFFFFFFFF
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x10c8(%rsp)
movss 0x32d9(%rip), %xmm0     # 0x6050
movups %xmm0, 0x10e4(%rsp)
movss 0x32cd(%rip), %xmm0     # 0x6054
movups %xmm0, 0x10d4(%rsp)
movl $0xa, 0x10f4(%rsp)
leaq 0x331b(%rip), %r14      # 0x60bc
leaq 0x32dc(%rip), %r15      # 0x6084
movq 0x6229(%rip), %r12      # 0x8fd8
leaq 0x32a6(%rip), %r13      # 0x605c
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1200
cmpl $0x61, %eax
jle 0x2e06
leal -0x62(%rax), %ecx
cmpl $0x9, %ecx
ja 0x2e1b
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 0x2db6
jmp 0x3209
leal -0x30(%rax), %ecx
cmpl $0x8, %ecx
jae 0x2ece
movl %ecx, 0x10d0(%rsp)
jmp 0x2db6
addl $-0x72, %eax
cmpl $0x6, %eax
ja 0x3217
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movl $0x1, 0x10e0(%rsp)
jmp 0x2db6
movl $0x0, 0x10e4(%rsp)
jmp 0x2db6
movl $0x1, 0x10dc(%rsp)
jmp 0x2db6
movl $0x1, 0x10d8(%rsp)
jmp 0x2db6
movl $0x0, 0x10c8(%rsp)
jmp 0x2db6
movl $0x1, 0x10f0(%rsp)
jmp 0x2db6
movl $0x1, 0x10ec(%rsp)
jmp 0x2db6
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1210
movl %eax, 0x10d4(%rsp)
cmpl $0x400000, %eax         # imm = 0x400000
jae 0x3200
shll $0xa, %eax
movl %eax, 0x10d4(%rsp)
jmp 0x2db6
cmpl $-0x1, %eax
jne 0x3217
movl $0x1e, %edi
callq 0x11f0
testq %rax, %rax
movl $0x1000, %ecx           # imm = 0x1000
cmovgq %rax, %rcx
movq %rcx, 0x6354(%rip)      # 0x9248
movq 0x60d5(%rip), %r15      # 0x8fd0
cmpl %ebp, (%r15)
je 0x3217
movl (%r15), %eax
xorl %r13d, %r13d
cmpl %ebp, %eax
jge 0x31eb
leaq 0x28(%rsp), %r12
xorl %r13d, %r13d
cltq
movq (%rbx,%rax,8), %rdi
movq %rdi, 0xc0(%rsp)
cmpb $0x2d, (%rdi)
jne 0x2f37
cmpb $0x0, 0x1(%rdi)
je 0x307d
movq %r12, %rsi
callq 0x11b0
testl %eax, %eax
js 0x3122
movl 0x40(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x3066
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x3169
cmpl $0x0, 0x10e0(%rsp)
je 0x317e
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 0x3196
movq %rax, %r15
movq %rax, %rdi
callq 0x1100
testq %rax, %rax
je 0x30ef
movq %rax, %r12
xorl %r14d, %r14d
movzwl 0x62(%r12), %eax
addl $-0x4, %eax
cmpl $0x6, %eax
ja 0x2fde
leaq 0x30cb(%rip), %rcx      # 0x60a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0x1100
movq %rax, %r12
testq %rax, %rax
jne 0x2fc0
jmp 0x30f2
movq 0x30(%r12), %rax
movq %rax, 0xc0(%rsp)
movq 0x68(%r12), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x32d0
testl %r14d, %r14d
cmovel %eax, %r14d
jmp 0x2fde
callq 0x1050
movl (%rax), %edi
movl %edi, 0x4(%rsp)
movq 0x5fc3(%rip), %rax      # 0x8ff8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%r12), %r12
callq 0x1260
movq 0x8(%rsp), %rdi
leaq 0x32fa(%rip), %rsi      # 0x634d
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
movl 0x4(%rsp), %eax
jmp 0x301a
movq %r12, 0xb8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x32d0
jmp 0x30ea
xorl %edi, %edi
callq 0x1090
testl %eax, %eax
jne 0x31d4
leaq 0x30ab(%rip), %rax      # 0x613e
movq %rax, 0xc0(%rsp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpl $0x0, 0x10f0(%rsp)
jne 0x30db
movl $0x1, %edi
callq 0x1090
testl %eax, %eax
jne 0x31db
leaq 0xc0(%rsp), %rax
movabsq $0x2974756f64747328, %rcx # imm = 0x2974756F64747328
movq %rcx, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %esi
xorl %edi, %edi
leaq 0xb8(%rsp), %rdx
callq 0x3a8a
movl %eax, %r14d
jmp 0x3106
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x10e0
movq 0x5ecf(%rip), %r15      # 0x8fd0
leaq 0x28(%rsp), %r12
testl %r13d, %r13d
cmovel %r14d, %r13d
movl (%r15), %eax
incl %eax
movl %eax, (%r15)
cmpl %ebp, %eax
jl 0x2f1a
jmp 0x31eb
callq 0x1050
movl (%rax), %r14d
movq 0x5ec7(%rip), %rax      # 0x8ff8
movq (%rax), %r15
movq 0xc0(%rsp), %r12
movl %r14d, %edi
callq 0x1260
movq %r15, %rdi
movq 0x5e82(%rip), %r15      # 0x8fd0
leaq 0x2f7c(%rip), %rsi      # 0x60d1
movq %r12, %rdx
leaq 0x28(%rsp), %r12
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x3106
leaq 0xc0(%rsp), %rdi
callq 0x12a4
movl $0x16, %r14d
jmp 0x3106
leaq 0xc0(%rsp), %rdi
callq 0x1280
movl $0x15, %r14d
jmp 0x3106
callq 0x1050
movl (%rax), %r14d
movq 0x5e53(%rip), %rax      # 0x8ff8
movq (%rax), %r15
movq 0xc0(%rsp), %r12
movl %r14d, %edi
callq 0x1260
movq %r15, %rdi
leaq 0x3170(%rip), %rsi      # 0x6332
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x30fa
callq 0x12c8
jmp 0x31e0
callq 0x12ea
movl $0x5, %r14d
jmp 0x3106
movl %r13d, %eax
addq $0x10f8, %rsp           # imm = 0x10F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x339e(%rip), %rdi      # 0x65a5
jmp 0x3210
leaq 0x33ab(%rip), %rdi      # 0x65bb
callq 0x1080
jmp 0x321c
callq 0x3226
movl $0x1, %edi
callq 0x1230