// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_external_External_c99zeapi
static struct mirth_c99_C99API* mw_mirth_external_External_c99zeapi (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_c99_zaC99* in_zaC99_2, uint64_t in_External_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_c99_zaC99* *out_zaC99_5) {
	void* v7 = field_mut(&mfld_mirth_external_External_ztc99zeapi, in_External_3);
	bool v8 = mut_is_set(v7);
	struct mirth_c99_zaC99* branch_zaC99_9;
	struct mirth_mirth_zaMirth* branch_zaMirth_10;
	uint64_t branch_External_11;
	struct mirth_c99_C99API* branch_C99API_12;
	if (v8) {
		VAL v13 = mut_get(v7);
		branch_C99API_12 = V_mirth_c99_C99API(v13);
		branch_External_11 = in_External_3;
		branch_zaMirth_10 = in_zaMirth_1;
		branch_zaC99_9 = in_zaC99_2;
	} else {
		struct mirth_mirth_zaMirth* v14;
		struct mirth_type_ArrowType* v15;
		STR* v16 = mw_mirth_external_External_cnamezetype(in_zaMirth_1, in_External_3, &v14, &v15);
		struct mirth_mirth_zaMirth* v17;
		struct mirth_c99_zaC99* v18;
		struct mirth_c99_C99API* v19 = mw_mirth_c99_zaC99_cnamezetypezetozec99zeapi(v14, in_zaC99_2, v16, v15, &v17, &v18);
		incref(MK_mirth_c99_C99API(v19));
		mut_set(MK_mirth_c99_C99API(v19), v7);
		branch_C99API_12 = v19;
		branch_External_11 = in_External_3;
		branch_zaMirth_10 = v17;
		branch_zaC99_9 = v18;
	}
	*out_zaC99_5 = branch_zaC99_9;
	*out_zaMirth_4 = branch_zaMirth_10;
	return branch_C99API_12;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x60(%rbp)
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x105e558(%rip), %rdi   # 0x11180e8
movq %rdx, %rsi
callq 0x13c85
movq %rax, %r14
movq %rax, %rdi
callq 0x1505d
testb %al, %al
je 0xb9bb7
movq %r14, %rdi
callq 0x13d82
movq %rax, %r14
jmp 0xb9d77
movq %r14, -0x50(%rbp)
leaq 0x105e536(%rip), %rdi   # 0x11180f8
movq %r13, %rsi
callq 0x13c85
cmpq $0x0, 0x8(%rax)
movq %r15, -0x58(%rbp)
je 0xb9bf0
movq %rax, %rdi
callq 0x13d82
movq %rax, %rdi
movq %rdx, %rsi
callq 0x9189
movq %rax, %r14
jmp 0xb9d0d
movq %rax, -0x48(%rbp)
movq 0x105e50d(%rip), %r14   # 0x1118108
testq %r14, %r14
jne 0xb9c19
xorl %edi, %edi
callq 0xf5e4
movq %rax, %r14
movq $0x0, 0x10(%rax)
movq %rax, 0x105e4ef(%rip)   # 0x1118108
movq %r14, %rax
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
andq %rdi, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0xb9c39
incl (%rax)
movq 0x105e4d0(%rip), %rsi   # 0x1118110
testq %rsi, %rsi
jne 0xb9c76
movl $0x5, %edi
callq 0xf5e4
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
movq %rax, %rsi
movq $0x5, 0x10(%rax)
movl $0x7478656d, 0x18(%rax) # imm = 0x7478656D
movb $0x5f, 0x1c(%rax)
movq %rax, 0x105e49a(%rip)   # 0x1118110
movq %rsi, %rax
andq %rdi, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0xb9c8c
incl (%rax)
movq %r14, %rdi
callq 0xe069
movq %rax, -0x40(%rbp)
leaq 0x105af11(%rip), %rdi   # 0x1114bb0
movq %r13, %rsi
callq 0x13c85
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1a6db
movq (%r14), %rdi
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %rbx
movq -0x40(%rbp), %rsi
movq %rax, %rdx
movq %rbx, %r8
callq 0x93ee1
movq (%rbx), %r14
movq %r14, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0xb9cf6
incl (%rax)
movq %r14, %rdi
leaq 0x57459(%rip), %rsi     # 0x111159
movq -0x48(%rbp), %rdx
callq 0x14766
movq -0x30(%rbp), %rbx
leaq -0x30(%rbp), %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x579dc
movq (%r15), %rdi
leaq -0x30(%rbp), %r8
leaq -0x38(%rbp), %r9
movq %r12, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0xaacc2
movq %rax, %r14
leaq 0x592bf(%rip), %rsi     # 0x113001
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0xb9d5f
incl (%rdx)
movq %r14, %rdi
movq -0x50(%rbp), %rdx
callq 0x14766
movq -0x30(%rbp), %rbx
movq -0x38(%rbp), %r12
movq -0x58(%rbp), %r15
movq -0x60(%rbp), %rax
movq %r12, (%rax)
movq %rbx, (%r15)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq