// File: /workspace/github_c_makefile_star2_O3/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 0x3981
leaq 0x266f(%rip), %rdi      # 0x5107
callq 0x2030
movq (%r13), %rdi
testq %rax, %rax
je 0x2adc
movq %rax, %r14
leaq 0x2665(%rip), %rsi      # 0x5115
movq %rax, %rdx
xorl %eax, %eax
callq 0x3981
movq %r14, %rdi
callq 0x20a0
movq %rax, %r15
movslq %r15d, %rdx
leaq 0x5881(%rip), %rdi      # 0x8350
movq %r14, %rsi
callq 0x2060
jmp 0x2bb4
leaq 0x266e(%rip), %rsi      # 0x5151
xorl %eax, %eax
callq 0x3981
leaq 0x26b0(%rip), %rdi      # 0x51a1
callq 0x2030
testq %rax, %rax
je 0x2c51
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 0x24c4(%rip), %rsi      # 0x5004
movq %r14, %rdi
callq 0x2190
testq %rax, %rax
je 0x2c58
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
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 0x57cc(%rip), %r12      # 0x8350
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x2080
movq %rax, %r15
movq %r14, %rdi
callq 0x2090
movq (%r13), %rdi
leaq 0x266c(%rip), %rsi      # 0x5216
movq %r12, %rdx
xorl %eax, %eax
callq 0x3981
movl $0x1, %r14d
testl %r15d, %r15d
je 0x2c3c
leaq 0x51ea(%rip), %r13      # 0x7db0
movq 0x5773(%rip), %r15      # 0x8340
xorl %r12d, %r12d
movq (%r13), %rsi
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x2c06
incq %r12
addq $0x8, %r13
cmpq $0x3, %r12
jne 0x2bd0
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3226
cmpl $-0x1, %eax
jne 0x2c3c
callq 0x2240
jmp 0x2c3c
cmpl $0x3, %r12d
ja 0x2bed
movl %r12d, %eax
leaq 0x23f2(%rip), %rcx      # 0x5008
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, 0x672a(%rip)      # 0x9350
jmp 0x2c2f
movb $0x1, 0x6725(%rip)      # 0x9354
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2c65
movl %eax, %r14d
movl %r14d, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2292
jmp 0x2c5d
callq 0x2265
movl $0x1, %r14d
jmp 0x2c3c