// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/spgbld/func.cxx
// Function: parse_args(int, char**)
void parse_args(int argc, char* argv[])
{
	int i;
	conf.packer = PM_AUTO;

	if (i = parse_arg(argc, argv, "-b", 2)) {
		conf.mode = M_BLD;
		conf.in_fname = argv[i];
		conf.out_fname = argv[i+1];

		if (i = parse_arg(argc, argv, "-c", 1))
			if( !strcmp("auto",argv[i]) ){
				conf.packer = PM_AUTO;
			}
			else if( !strcmp("none",argv[i]) ){
				conf.packer = PM_NONE;
			}
			else if( !strcmp("mlz",argv[i]) ){
				conf.packer = PM_MLZ;
			}
			else if( !strcmp("hst",argv[i]) ){
				conf.packer = PM_HST;
			}
			else {
				conf.packer = (C_PACK)_wtoi(argv[i]);
			}

		return;
	}

	if (i = parse_arg(argc, argv, "-u", 1)) {
		conf.mode = M_UNP;
		conf.in_fname = argv[i];
		return;
	}

	print_help();
	error(ARG);
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
leaq 0x44587c(%rip), %rax    # 0x447dd0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rsi
leaq 0x2aaa(%rip), %rdx      # 0x5014
movl $0x2, %ecx
callq 0x24b0
movl %eax, 0x4(%rsp)
cmpl $0x0, %eax
je 0x26d0
leaq 0x445848(%rip), %rax    # 0x447dd0
movl $0x1, 0x4(%rax)
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x44582c(%rip), %rax    # 0x447dd0
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x44580e(%rip), %rax    # 0x447dd0
movq %rcx, 0x10(%rax)
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rsi
leaq 0x2a41(%rip), %rdx      # 0x5017
movl $0x1, %ecx
callq 0x24b0
movl %eax, 0x4(%rsp)
cmpl $0x0, %eax
je 0x26ce
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x2a18(%rip), %rdi      # 0x501a
callq 0x2250
cmpl $0x0, %eax
jne 0x261e
leaq 0x4457bd(%rip), %rax    # 0x447dd0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x26cc
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x29ec(%rip), %rdi      # 0x501f
callq 0x2250
cmpl $0x0, %eax
jne 0x264c
leaq 0x44578c(%rip), %rax    # 0x447dd0
movl $0x0, (%rax)
jmp 0x26ca
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x29c3(%rip), %rdi      # 0x5024
callq 0x2250
cmpl $0x0, %eax
jne 0x267a
leaq 0x44575e(%rip), %rax    # 0x447dd0
movl $0x1, (%rax)
jmp 0x26c8
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x2999(%rip), %rdi      # 0x5028
callq 0x2250
cmpl $0x0, %eax
jne 0x26a8
leaq 0x445730(%rip), %rax    # 0x447dd0
movl $0x2, (%rax)
jmp 0x26c6
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x22b0
movl %eax, %ecx
leaq 0x44570c(%rip), %rax    # 0x447dd0
movl %ecx, (%rax)
jmp 0x26c8
jmp 0x26ca
jmp 0x26cc
jmp 0x26ce
jmp 0x2747
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rsi
leaq 0x294c(%rip), %rdx      # 0x502c
movl $0x1, %ecx
callq 0x24b0
movl %eax, 0x4(%rsp)
cmpl $0x0, %eax
je 0x271c
leaq 0x4456d6(%rip), %rax    # 0x447dd0
movl $0x3, 0x4(%rax)
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x4456ba(%rip), %rax    # 0x447dd0
movq %rcx, 0x8(%rax)
jmp 0x2747
callq 0x4b10
leaq 0x2907(%rip), %rdi      # 0x502f
movb $0x0, %al
callq 0x2030
leaq 0x2909(%rip), %rdi      # 0x503f
movb $0x0, %al
callq 0x2030
movl $0x1, %edi
callq 0x2210
addq $0x18, %rsp
retq
nopl (%rax)