// File: /workspace/github_c_makefile_star2_O1/sguerrini97[P]ps3linux-ps3vuart-tools/ps3dm/ps3dm.c
// Function: main
int
main(int argc, char **argv)
{
	int ret;

	ret = parse_opts(argc, argv, &opts);
	if (ret)
		exit(255);

	if (opts.do_help)
		usage();
	else if (opts.do_version)
		version();

	ret = dev_open(opts.device);
	if (ret) {
		perror("open device");
		exit(254);
	}

	ret = cmd_exec(sizeof(cmdv) / sizeof(cmdv[0]), cmdv,
	    argc - optind, &argv[optind]);
	switch (ret) {
	case CMD_EOK:
	break;
	case CMD_EBADCMD:
		fprintf(stderr, "invalid command specified\n");
	break;
	case CMD_EINVAL:
		fprintf(stderr, "invalid command argument(s) specified\n");
	break;
	case CMD_EIO:
		fprintf(stderr, "device error\n");
	break;
	case CMD_EUNKNOWN:
		fprintf(stderr, "unknown command error\n");
	break;
	}

	dev_close();

	exit(ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
leaq 0x1ba5(%rip), %r15      # 0x4088
leaq 0x4c66(%rip), %r12      # 0x7150
movq 0x4ae7(%rip), %rbp      # 0x6fd8
movq %rsp, %r13
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x2060
cmpl $0x6b, %eax
jg 0x252b
cmpl $0x63, %eax
jle 0x259d
cmpl $0x64, %eax
jne 0x2614
movq (%rbp), %rax
movq %rax, 0x4ba7(%rip)      # 0x70d0
jmp 0x24f4
cmpl $0x6c, %eax
je 0x2546
cmpl $0x70, %eax
je 0x2570
cmpl $0x76, %eax
jne 0x2619
incl 0x4b84(%rip)            # 0x70c8
jmp 0x24f4
movq (%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x20b0
movq %rax, 0x4b7d(%rip)      # 0x70d8
movq (%rsp), %rax
cmpb $0x0, (%rax)
jne 0x25c9
movl $0x1, 0x4b72(%rip)      # 0x70e0
jmp 0x24f4
movq (%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x20b0
movq %rax, 0x4b63(%rip)      # 0x70e8
movq (%rsp), %rax
cmpb $0x0, (%rax)
jne 0x25dc
movl $0x1, 0x4b58(%rip)      # 0x70f0
jmp 0x24f4
cmpl $-0x1, %eax
jne 0x25fe
movq 0x4a27(%rip), %rax      # 0x6fd0
cmpl %ebx, (%rax)
jl 0x2647
movq 0x4a40(%rip), %rax      # 0x6ff8
movq (%rax), %rcx
leaq 0x1b1e(%rip), %rdi      # 0x40e0
movl $0x15, %esi
jmp 0x25f2
movq 0x4a28(%rip), %rax      # 0x6ff8
movq (%rax), %rcx
leaq 0x1ab8(%rip), %rdi      # 0x4092
jmp 0x25ed
movq 0x4a15(%rip), %rax      # 0x6ff8
movq (%rax), %rcx
leaq 0x1abd(%rip), %rdi      # 0x40aa
movl $0x17, %esi
movl $0x1, %edx
callq 0x2130
jmp 0x2633
cmpl $0x3f, %eax
je 0x263d
cmpl $0x56, %eax
jne 0x2619
movl $0x1, 0x4ab2(%rip)      # 0x70c4
jmp 0x2647
cmpl $0x68, %eax
je 0x263d
movq 0x49d8(%rip), %rcx      # 0x6ff8
movq (%rcx), %rdi
leaq 0x1a98(%rip), %rsi      # 0x40c2
movl %eax, %edx
xorl %eax, %eax
callq 0x20d0
movl $0xff, %edi
callq 0x2120
movl $0x1, 0x4a79(%rip)      # 0x70c0
cmpl $0x0, 0x4a72(%rip)      # 0x70c0
jne 0x26d4
cmpl $0x0, 0x4a69(%rip)      # 0x70c4
jne 0x26d4
movq 0x4a6c(%rip), %rdi      # 0x70d0
callq 0x26f4
testl %eax, %eax
jne 0x26db
movq 0x495c(%rip), %rax      # 0x6fd0
movslq (%rax), %rax
subl %eax, %ebx
leaq (%r14,%rax,8), %rcx
leaq 0x4a7c(%rip), %rsi      # 0x7100
movl $0x9, %edi
movl %ebx, %edx
callq 0x3970
movl %eax, %ebx
decl %eax
cmpl $0x3, %eax
ja 0x26c8
movl %eax, %eax
leaq 0x1a6e(%rip), %rcx      # 0x4110
movq (%rcx,%rax,8), %rsi
leaq 0x1a83(%rip), %rcx      # 0x4130
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
movq 0x493d(%rip), %rax      # 0x6ff8
movq (%rax), %rcx
movl $0x1, %edx
callq 0x2130
callq 0x2721
movl %ebx, %edi
callq 0x2120
xorl %edi, %edi
callq 0x2120
leaq 0x1933(%rip), %rdi      # 0x4015
callq 0x2100
movl $0xfe, %edi
callq 0x2120
nopl (%rax)