// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: main
int main(int argc, char *argv[])
{
	int call_state;

	/* Strip out any path name that may have been passed into argv[0] */
	progname = basename(argv[0]);

	/* Get our developer dir */
	if (!get_developer_path(developer_dir))
		return 1;

	/* Check if we are being treated as a multi-call binary. */
	call_state = get_multicall_state(progname, multicall_tool_names, 4);

	/* Execute based on the state that we were called in. */
	switch (call_state) {
		case 1: /* xcrun */
			return xcrun_main(argc, argv);
			break;
		case 2: /* xcrun_log */
			logging_mode = 1;
			return xcrun_main(argc, argv);
			break;
		case 3: /* xcrun_verbose */
			verbose_mode = 1;
			return xcrun_main(argc, argv);
			break;
		case 4: /* xcrun_nocache */
			return xcrun_main(argc, argv);
			break;
		case -1:
		default: /* called as tool name */
			/* Locate and execute the command */
			if (request_command(progname, argc, argv) != -1) {
				return 1; /* NOREACH */
			} else {
				fprintf(stderr, "xcrun: error: failed to execute command \'%s\'. aborting.\n", progname);
			}
			break;
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
callq 0x2160
movq %rax, 0x4ceb(%rip)      # 0x7340
movq %rsp, %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x20d0
movq 0x4955(%rip), %r13      # 0x6fc0
movq (%r13), %rdi
leaq 0x1a47(%rip), %rsi      # 0x40bd
xorl %eax, %eax
callq 0x365c
leaq 0x1a83(%rip), %rdi      # 0x4107
callq 0x2030
movq (%r13), %rdi
testq %rax, %rax
je 0x26c8
movq %rax, %r14
leaq 0x1a79(%rip), %rsi      # 0x4115
movq %rax, %rdx
xorl %eax, %eax
callq 0x365c
movq %r14, %rdi
callq 0x20a0
movq %rax, %r15
movslq %r15d, %rdx
leaq 0x4c95(%rip), %rdi      # 0x7350
movq %r14, %rsi
callq 0x2060
jmp 0x279c
leaq 0x1a82(%rip), %rsi      # 0x4151
xorl %eax, %eax
callq 0x365c
leaq 0x1ac4(%rip), %rdi      # 0x41a1
callq 0x2030
testq %rax, %rax
je 0x2857
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x20a0
movw $0x2f, (%rsp,%rax)
movq %r14, %rdi
callq 0x20a0
movabsq $0x642e76656463782e, %rcx # imm = 0x642E76656463782E
movq %rcx, (%rsp,%rax)
movl $0x746164, 0x7(%rsp,%rax) # imm = 0x746164
leaq 0x18d8(%rip), %rsi      # 0x4004
movq %r14, %rdi
callq 0x2190
testq %rax, %rax
je 0x2875
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2170
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2170
movslq %r15d, %rsi
leaq 0x4be2(%rip), %r12      # 0x7350
pushq $0x1
popq %rdx
movq %r12, %rdi
movq %r14, %rcx
callq 0x2080
movq %rax, %r15
movq %r14, %rdi
callq 0x2090
movq (%r13), %rdi
leaq 0x1a84(%rip), %rsi      # 0x4216
movq %r12, %rdx
xorl %eax, %eax
callq 0x365c
pushq $0x1
popq %r14
testl %r15d, %r15d
je 0x2842
leaq 0x4600(%rip), %r13      # 0x6db0
movq 0x4b89(%rip), %r15      # 0x7340
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0x27fb
movq (%r13), %rsi
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x27d9
incq %r12
addq $0x8, %r13
jmp 0x27ba
cmpl $0x3, %r12d
ja 0x27fb
movl %r12d, %eax
leaq 0x181f(%rip), %rcx      # 0x4008
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, 0x5b57(%rip)      # 0x8350
jmp 0x2835
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2ee0
cmpl $-0x1, %eax
jne 0x2842
movq 0x47dc(%rip), %rax      # 0x6ff0
movq (%rax), %rdi
movq 0x4b22(%rip), %rdx      # 0x7340
leaq 0x185f(%rip), %rsi      # 0x4084
xorl %eax, %eax
callq 0x2130
jmp 0x2842
movb $0x1, 0x5b1f(%rip)      # 0x8354
movl %ebp, %edi
movq %rbx, %rsi
callq 0x28a5
movl %eax, %r14d
movl %r14d, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4792(%rip), %rax      # 0x6ff0
movq (%rax), %rcx
leaq 0x193e(%rip), %rdi      # 0x41a6
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x21f0
jmp 0x289f
movq 0x4774(%rip), %rax      # 0x6ff0
movq (%rax), %rbx
callq 0x2050
movl (%rax), %edi
callq 0x2210
leaq 0x194c(%rip), %rsi      # 0x41de
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2130
pushq $0x1
popq %r14
jmp 0x2842