// File: bluesky466[P]ResourcesParser/main.cpp
// Function: main
int main(int argc, char *argv[]) {
	const char* path = getArgv("-p", argv, argc);
	const char* type = getArgv("-t", argv, argc);
	const char* id = getArgv("-i", argv, argc);
	int all = findArgvIndex("-a", argv, argc);

	if(nullptr == path) {
		printHelp();
		return -1;
	} else if(getArgv("-h", argv, argc) != nullptr) {
		printHelp();
	}

	ResourcesParser parser(path);
	ResourcesParserInterpreter interpreter(&parser);

	if(all >= 0) {
		interpreter.parserResource(ResourcesParserInterpreter::ALL_TYPE);
	}

	if(type) {
		interpreter.parserResource(type);
	}

	if(id) {
		interpreter.parserId(id);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movl -0x8(%rbp), %edx
leaq 0x1622d(%rip), %rdi     # 0x1a004
callq 0x4100
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl -0x8(%rbp), %edx
leaq 0x16219(%rip), %rdi     # 0x1a007
callq 0x4100
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movl -0x8(%rbp), %edx
leaq 0x16205(%rip), %rdi     # 0x1a00a
callq 0x4100
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movl -0x8(%rbp), %edx
leaq 0x161f1(%rip), %rdi     # 0x1a00d
callq 0x4160
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x3e3d
callq 0x41d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x40de
movq -0x10(%rbp), %rsi
movl -0x8(%rbp), %edx
leaq 0x161c5(%rip), %rdi     # 0x1a010
callq 0x4100
cmpq $0x0, %rax
je 0x3e5b
callq 0x41d0
jmp 0x3e5d
movq -0x18(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x3460
movq -0x168(%rbp), %rsi
movq -0x160(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0x3360
jmp 0x3e97
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x9bf0
jmp 0x3eac
leaq -0xe8(%rbp), %rdi
callq 0x34a8
leaq -0xe9(%rbp), %rdi
callq 0x32a0
leaq -0x108(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x4290
jmp 0x3ed9
cmpl $0x0, -0x2c(%rbp)
jl 0x3f50
leaq 0x23392(%rip), %rsi     # 0x27278
leaq -0x108(%rbp), %rdi
callq 0x4e60
jmp 0x3ef4
jmp 0x3f50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x3f28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x34a8
leaq -0xe9(%rbp), %rdi
callq 0x32a0
jmp 0x40ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x40d0
cmpq $0x0, -0x20(%rbp)
je 0x4007
movq -0x20(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x3460
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
leaq -0x128(%rbp), %rdi
callq 0x3360
jmp 0x3f95
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x4e60
jmp 0x3faa
leaq -0x128(%rbp), %rdi
callq 0x34a8
leaq -0x129(%rbp), %rdi
callq 0x32a0
jmp 0x4007
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x3ff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x34a8
leaq -0x129(%rbp), %rdi
callq 0x32a0
jmp 0x40d0
cmpq $0x0, -0x28(%rbp)
je 0x40bb
movq -0x28(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x3460
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
leaq -0x150(%rbp), %rdi
callq 0x3360
jmp 0x404c
leaq -0x108(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x5ea0
jmp 0x4061
leaq -0x150(%rbp), %rdi
callq 0x34a8
leaq -0x151(%rbp), %rdi
callq 0x32a0
jmp 0x40bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x40ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x34a8
leaq -0x151(%rbp), %rdi
callq 0x32a0
jmp 0x40d0
movl $0x0, -0x4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x42b0
jmp 0x40de
leaq -0xc8(%rbp), %rdi
callq 0x42b0
jmp 0x40ea
movl -0x4(%rbp), %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x3450
nopw %cs:(%rax,%rax)