// File: /workspace/github_c_makefile_star2_O1/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, 0x58d7(%rip)      # 0x8340
movq %rsp, %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x20d0
movq 0x5541(%rip), %r13      # 0x7fc0
movq (%r13), %rdi
leaq 0x2633(%rip), %rsi      # 0x50bd
xorl %eax, %eax
callq 0x39a9
leaq 0x266f(%rip), %rdi      # 0x5107
callq 0x2030
movq (%r13), %rdi
testq %rax, %rax
je 0x2adc
movq %rax, %r15
leaq 0x2665(%rip), %rsi      # 0x5115
movq %rax, %rdx
xorl %eax, %eax
callq 0x39a9
movq %r15, %rdi
callq 0x20a0
movq %rax, %r14
movslq %r14d, %rdx
leaq 0x5881(%rip), %rdi      # 0x8350
movq %r15, %rsi
callq 0x2060
jmp 0x2bb7
leaq 0x266e(%rip), %rsi      # 0x5151
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x39a9
leaq 0x26ad(%rip), %rdi      # 0x51a1
callq 0x2030
testq %rax, %rax
je 0x2c64
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 0x24c1(%rip), %rsi      # 0x5004
movq %r14, %rdi
callq 0x2190
testq %rax, %rax
je 0x2c6e
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2170
movq %r15, %rdi
callq 0x2140
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2170
movslq %r14d, %rsi
leaq 0x57c9(%rip), %r12      # 0x8350
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x2080
movq %rax, %r14
movq %r15, %rdi
callq 0x2090
movq (%r13), %rdi
leaq 0x2669(%rip), %rsi      # 0x5216
movq %r12, %rdx
xorl %eax, %eax
callq 0x39a9
testl %r14d, %r14d
je 0x2c18
movl $0x1, %r15d
movq 0x5777(%rip), %r14      # 0x8340
xorl %r12d, %r12d
leaq 0x51dd(%rip), %r13      # 0x7db0
movq (%r12,%r13), %rsi
movq %r14, %rdi
callq 0x2120
testl %eax, %eax
je 0x2bf6
incl %r15d
addq $0x8, %r12
cmpq $0x18, %r12
jne 0x2bd3
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
decl %r15d
cmpl $0x3, %r15d
ja 0x2c46
leaq 0x2402(%rip), %rax      # 0x5008
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x1, 0x673a(%rip)      # 0x9350
jmp 0x2c26
movl $0x1, %ebx
jmp 0x2c32
movb $0x1, 0x672e(%rip)      # 0x9354
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2c7b
movl %eax, %ebx
movl %ebx, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3230
movl $0x1, %ebx
cmpl $-0x1, %eax
jne 0x2c32
callq 0x2289
jmp 0x2c32
callq 0x226d
jmp 0x2bb7
callq 0x2240
xorl %r14d, %r14d
jmp 0x2bb7