// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_c99_zaC99_cnamezetypezetozec99zeapi
static struct mirth_c99_C99API* mw_mirth_c99_zaC99_cnamezetypezetozec99zeapi (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_c99_zaC99* in_zaC99_2, STR* in_Str_3, struct mirth_type_ArrowType* in_ArrowType_4, struct mirth_mirth_zaMirth* *out_zaMirth_5, struct mirth_c99_zaC99* *out_zaC99_6) {
	INT v8 = WRAP_I63(1LL);
	INT v9 = in_zaC99_2->mfreshzecounter;
	incref(MKNAT(v9));
	INT v10 = in_zaC99_2->mfreshzecounter;
	decref(MKNAT(v10));
	in_zaC99_2->mfreshzecounter = v8;
	incref(MK_mirth_type_ArrowType(in_ArrowType_4));
	struct mirth_type_StackType v11 = in_ArrowType_4->mdom;
	incref(MK_mirth_type_StackType(v11));
	decref(MK_mirth_type_ArrowType(in_ArrowType_4));
	enum mirth_c99_C99APIArgMode v12 = mirth_c99_C99APIArgMode_In;
	struct mirth_mirth_zaMirth* v13;
	struct mirth_c99_zaC99* v14;
	bool v15;
	struct std_list_List_1 v16 = mw_mirth_c99_zaC99_stackzetypezetozec99zeapizeparams(in_zaMirth_1, in_zaC99_2, v11, v12, &v13, &v14, &v15);
	incref(MK_mirth_type_ArrowType(in_ArrowType_4));
	struct mirth_type_StackType v17 = in_ArrowType_4->mcod;
	incref(MK_mirth_type_StackType(v17));
	decref(MK_mirth_type_ArrowType(in_ArrowType_4));
	enum mirth_c99_C99APIArgMode v18 = mirth_c99_C99APIArgMode_Out;
	struct mirth_mirth_zaMirth* v19;
	struct mirth_c99_zaC99* v20;
	bool v21;
	struct std_list_List_1 v22 = mw_mirth_c99_zaC99_stackzetypezetozec99zeapizeparams(v13, v14, v17, v18, &v19, &v20, &v21);
	struct std_list_List_1 v23 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v24;
	mw_std_list_List_1_buildzx(v23, &v24);
	bool v25 = true;
	struct mirth_mirth_zaMirth* r26 = v19;
	struct mirth_c99_zaC99* r27 = v20;
	struct std_list_List_1 r28 = v24;
	struct std_list_List_1 v29 = v22;
	bool v30 = v25;
	bool v31 = v25;
	while (v31) {
		struct mirth_mirth_zaMirth* r32 = r26;
		struct mirth_c99_zaC99* r33 = r27;
		struct std_list_List_1 r34 = r28;
		struct std_list_List_1 v35 = v29;
		bool v36 = v30;
		struct mirth_mirth_zaMirth* branch_zaMirth_37;
		VAL branch_zux1_38;
		struct std_list_List_1 branch_zaLister_39;
		struct std_list_List_1 branch_List_40;
		bool branch_Bool_41;
		switch ((v35).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v42;
				VAL v43 = mtp_std_list_List_1_Cons(v35, &v42);
				incref(v43);
				struct mirth_mirth_zaMirth* v44;
				bool v45 = mw_mirth_c99_C99APIArg_iszephysicalzevaluezy(r32, V_mirth_c99_C99APIArg(v43), &v44);
				struct mirth_mirth_zaMirth* branch_zaMirth_46;
				VAL branch_zux1_47;
				struct std_list_List_1 branch_zaLister_48;
				struct std_list_List_1 branch_List_49;
				bool branch_Bool_50;
				if (v45) {
					struct std_list_List_1 v51 = mw_std_list_List_1_cons(v43, v42);
					bool v52 = false;
					branch_Bool_50 = v52;
					branch_List_49 = v51;
					branch_zaLister_48 = r34;
					branch_zux1_47 = MK_mirth_c99_zaC99(r33);
					branch_zaMirth_46 = v44;
				} else {
					struct std_list_List_1 v53;
					mw_std_list_zaLister_1_pushzx(v43, r34, &v53);
					bool v54 = true;
					branch_Bool_50 = v54;
					branch_List_49 = v42;
					branch_zaLister_48 = v53;
					branch_zux1_47 = MK_mirth_c99_zaC99(r33);
					branch_zaMirth_46 = v44;
				}
				branch_Bool_41 = branch_Bool_50;
				branch_List_40 = branch_List_49;
				branch_zaLister_39 = branch_zaLister_48;
				branch_zux1_38 = branch_zux1_47;
				branch_zaMirth_37 = branch_zaMirth_46;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v55 = { .tag=std_list_List_1_Nil };
				bool v56 = false;
				branch_Bool_41 = v56;
				branch_List_40 = v55;
				branch_zaLister_39 = r34;
				branch_zux1_38 = MK_mirth_c99_zaC99(r33);
				branch_zaMirth_37 = r32;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v31 = branch_Bool_41;
		v30 = branch_Bool_41;
		v29 = branch_List_40;
		r28 = branch_zaLister_39;
		r27 = V_mirth_c99_zaC99(branch_zux1_38);
		r26 = branch_zaMirth_37;
	}
	struct std_list_List_1 v57 = mw_std_list_zaLister_1_donezx(r28);
	struct std_list_List_1 v58;
	struct std_maybe_Maybe_1 v59 = mw_std_list_List_1_uncons(v29, &v58);
	INT v60 = r27->mfreshzecounter;
	incref(MKNAT(v60));
	INT v61 = r27->mfreshzecounter;
	decref(MKNAT(v61));
	r27->mfreshzecounter = v9;
	decref(MKNAT(v60));
	bool v62 = (v21 || v15);
	incref(MK_mirth_type_ArrowType(in_ArrowType_4));
	struct mirth_type_StackType v63 = in_ArrowType_4->mcod;
	incref(MK_mirth_type_StackType(v63));
	decref(MK_mirth_type_ArrowType(in_ArrowType_4));
	struct mirth_mirth_zaMirth* v64;
	struct std_maybe_Maybe_1 v65 = mw_mirth_type_StackType_linearzebasezevarzy(r26, v63, &v64);
	struct mirth_type_ArrowType* branch_ArrowType_66;
	struct mirth_mirth_zaMirth* branch_zaMirth_67;
	bool branch_Bool_68;
	switch ((v65).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v69 = mtp_std_maybe_Maybe_1_Some(v65);
			incref(MK_mirth_type_ArrowType(in_ArrowType_4));
			struct mirth_type_StackType v70 = in_ArrowType_4->mdom;
			incref(MK_mirth_type_StackType(v70));
			decref(MK_mirth_type_ArrowType(in_ArrowType_4));
			struct mirth_mirth_zaMirth* v71;
			struct std_maybe_Maybe_1 v72 = mw_mirth_type_StackType_linearzebasezevarzy(v64, v70, &v71);
			bool branch_Bool_73;
			switch ((v72).tag) {
				case std_maybe_Maybe_1_Some: {
					VAL v74 = mtp_std_maybe_Maybe_1_Some(v72);
					uint64_t v75 = V_mirth_var_Var(v74);
					uint64_t v76 = V_mirth_var_Var(v69);
					bool v77 = (v75 == v76);
					bool v78 = !v77;
					branch_Bool_73 = v78;
				} break;
				case std_maybe_Maybe_1_None: {
					decref(v69);
					bool v79 = false;
					branch_Bool_73 = v79;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_Bool_68 = branch_Bool_73;
			branch_zaMirth_67 = v71;
			branch_ArrowType_66 = in_ArrowType_4;
		} break;
		case std_maybe_Maybe_1_None: {
			bool v80 = false;
			branch_Bool_68 = v80;
			branch_zaMirth_67 = v64;
			branch_ArrowType_66 = in_ArrowType_4;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	bool v81 = !branch_Bool_68;
	bool v82 = (v81 && v62);
	struct mirth_c99_C99API* v83 = mtw_mirth_c99_C99API_C99API(in_Str_3, branch_ArrowType_66, v16, v57, v59, v58, v82, branch_Bool_68);
	*out_zaC99_6 = r27;
	*out_zaMirth_5 = branch_zaMirth_67;
	return v83;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, -0xc0(%rbp)
movq %r8, -0xc8(%rbp)
movq %rcx, %r13
movq %rdx, -0xb8(%rbp)
movq %rsi, %rbx
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq 0x10(%rsi), %r14
leaq 0x6640b(%rip), %rsi     # 0x111111
movq %r14, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0xaad2d
cmpl $0x0, (%rax)
jne 0xaad2d
movq %rdi, %r12
movq %r14, %rdi
callq 0xd13d
movq %r12, %rdi
movq $0x3, 0x10(%rbx)
movq %r13, %rsi
andq %r15, %rsi
setne %al
testb $0x3, %r13b
sete %cl
andb %al, %cl
movb %cl, -0x29(%rbp)
cmpb $0x1, %cl
jne 0xaad51
incl (%rsi)
movl 0x8(%r13), %r12d
movq 0x10(%r13), %r15
movq %r15, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0xaad79
incl (%rax)
movq %r14, -0x60(%rbp)
cmpb $0x0, -0x29(%rbp)
movq %rsi, -0x48(%rbp)
je 0xaade1
decl (%rsi)
movq %rsi, %r14
jne 0xaada5
movq %rdi, -0x50(%rbp)
movq %r13, %rdi
leaq 0x66ddd(%rip), %rsi     # 0x111b79
callq 0xd13d
movq -0x50(%rbp), %rdi
leaq -0x2a(%rbp), %rax
leaq -0xa8(%rbp), %r10
leaq -0xb0(%rbp), %r9
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
callq 0xab392
addq $0x10, %rsp
movl %eax, -0x54(%rbp)
movq %rdx, -0xa0(%rbp)
incl (%r14)
movq %r14, %rsi
jmp 0xaae19
leaq -0x2a(%rbp), %rax
leaq -0xa8(%rbp), %r10
leaq -0xb0(%rbp), %r9
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
callq 0xab392
movq -0x48(%rbp), %rsi
addq $0x10, %rsp
movl %eax, -0x54(%rbp)
movq %rdx, -0xa0(%rbp)
movl 0x18(%r13), %ebx
movq 0x20(%r13), %r14
movq %r14, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0xaae41
incl (%rax)
cmpb $0x0, -0x29(%rbp)
je 0xaae5a
decl (%rsi)
jne 0xaae5a
movq %r13, %rdi
leaq 0x66d24(%rip), %rsi     # 0x111b79
callq 0xd13d
movq %r13, -0x40(%rbp)
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0x2b(%rbp), %rax
leaq -0xe0(%rbp), %r12
leaq -0xe8(%rbp), %r15
movl %ebx, %edx
movq %r14, %rcx
movl $0x1, %r8d
movq %r15, %r9
pushq %rax
pushq %r12
callq 0xab392
addq $0x10, %rsp
movl %eax, %r14d
movq %rdx, %rbx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd01b
movq %rdx, %rcx
movq (%r15), %r13
movq (%r12), %r12
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq %r12, -0x38(%rbp)
cmpl $0x1, %r14d
jne 0xab045
movl %r14d, -0x88(%rbp)
movl %eax, -0x70(%rbp)
movq %rcx, -0x50(%rbp)
movq %rbx, %rdi
leaq -0x98(%rbp), %rsi
callq 0xd0aa
movq %rax, %r14
movq %rax, %rbx
andq %r15, %rbx
movq %rdx, -0x68(%rbp)
testb $0x1, %dl
jne 0xaaf04
movl %r14d, %eax
andl $0x3, %eax
jmp 0xaaf1c
testq %rbx, %rbx
sete %cl
movq %r14, %rax
andq $0x3, %rax
setne %dl
orb %cl, %dl
jne 0xaaf1c
incl (%rbx)
xorl %eax, %eax
testq %rbx, %rbx
setne %cl
testq %rax, %rax
sete %r12b
andb %cl, %r12b
cmpb $0x1, %r12b
jne 0xaaf5e
incl (%rbx)
movq %r13, %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rdx
callq 0xacba1
testb %al, %al
jne 0xaaf75
decl (%rbx)
jne 0xab00c
movq %r14, %rdi
leaq 0x68138(%rip), %rsi     # 0x113091
jmp 0xaaff2
movq %r13, %rdi
movq %r14, %rsi
leaq -0x80(%rbp), %rdx
callq 0xacba1
testb %al, %al
je 0xab00c
movl 0x8(%r14), %ecx
movq 0x10(%r14), %rdi
movq %rdi, %r13
andq %r15, %r13
setne %al
testb $0x3, %dil
sete %r15b
andb %al, %r15b
cmpb $0x1, %r15b
jne 0xaaf9b
incl (%r13)
testb %r12b, %r12b
je 0xaafbf
decl (%rbx)
jne 0xaafbf
movq %rdi, %rbx
movq %r14, %rdi
leaq 0x680e0(%rip), %rsi     # 0x113091
movq %rcx, %r12
callq 0xd13d
movq %r12, %rcx
movq %rbx, %rdi
cmpl $0x1, %ecx
je 0xaaff9
testl %ecx, %ecx
je 0xab2e9
testb %r15b, %r15b
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
je 0xab00c
decl (%r13)
jne 0xab00c
shlq $0x30, %rcx
orq %rdi, %rcx
movq %rcx, %rdi
leaq 0x680e7(%rip), %rsi     # 0x1130d9
callq 0xd13d
jmp 0xab00c
decl (%rdi)
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
jne 0xab00c
callq 0x5030
movq -0x80(%rbp), %r13
movq %r14, %rdi
movq -0x68(%rbp), %rsi
movl -0x70(%rbp), %edx
movq -0x50(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0x949e
movl -0x98(%rbp), %r14d
movq -0x90(%rbp), %rbx
movl -0x80(%rbp), %eax
movq -0x78(%rbp), %rcx
movq -0x38(%rbp), %r12
jmp 0xaaec3
testl %r14d, %r14d
jne 0xab32a
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
movl %eax, %edx
callq 0xd01b
movl %eax, -0x50(%rbp)
movq %rdx, -0x70(%rbp)
leaq -0xd8(%rbp), %rdx
movl %r14d, %edi
movq %rbx, %rsi
callq 0x111eb
movl %eax, -0x68(%rbp)
movq %rdx, -0x88(%rbp)
movq 0x10(%r12), %r14
movq %r14, %rbx
andq %r15, %rbx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0xab0d6
movl (%rbx), %eax
testl %eax, %eax
movq -0x48(%rbp), %rsi
jne 0xab0b6
movq %r14, %rdi
leaq 0x66066(%rip), %rsi     # 0x111111
callq 0xd13d
movq -0x48(%rbp), %rsi
movl (%rbx), %eax
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%r12)
decl %eax
movl %eax, (%rbx)
jne 0xab0e3
movq %r14, %rdi
leaq 0x66042(%rip), %rsi     # 0x111111
callq 0xd13d
jmp 0xab0df
movq -0x60(%rbp), %rax
movq %rax, 0x10(%r12)
movq -0x48(%rbp), %rsi
cmpb $0x0, -0x29(%rbp)
je 0xab0eb
incl (%rsi)
movq -0x40(%rbp), %rax
movl 0x18(%rax), %r14d
movq 0x20(%rax), %r12
movq %r12, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0xab10d
incl (%rax)
movb -0x2b(%rbp), %r15b
movb -0x2a(%rbp), %al
movb %al, -0x60(%rbp)
cmpb $0x0, -0x29(%rbp)
je 0xab131
decl (%rsi)
jne 0xab131
movq -0x40(%rbp), %rdi
leaq 0x66a4d(%rip), %rsi     # 0x111b79
callq 0xd13d
leaq -0x98(%rbp), %rcx
movq %r13, %rdi
movl %r14d, %esi
movq %r12, %rdx
callq 0xab410
testl %eax, %eax
je 0xab1f1
cmpl $0x1, %eax
movq -0x40(%rbp), %rbx
jne 0xab37f
movq %rdx, %rdi
callq 0xd745
movq %rax, %r14
movq %rdx, %r12
cmpb $0x0, -0x29(%rbp)
movq -0x48(%rbp), %rsi
je 0xab175
incl (%rsi)
movl 0x8(%rbx), %r13d
movq 0x10(%rbx), %rbx
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0xab19c
incl (%rax)
cmpb $0x0, -0x29(%rbp)
je 0xab1b6
decl (%rsi)
jne 0xab1b6
movq -0x40(%rbp), %rdi
leaq 0x669c8(%rip), %rsi     # 0x111b79
callq 0xd13d
movq -0x98(%rbp), %rdi
leaq -0x80(%rbp), %rcx
movl %r13d, %esi
movq %rbx, %rdx
callq 0xab410
testl %eax, %eax
je 0xab204
cmpl $0x1, %eax
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r12
jne 0xab32a
movq %rdx, %rdi
callq 0xd745
cmpq %r14, %rax
setne %bl
jmp 0xab23e
movq -0x98(%rbp), %r14
xorl %ebx, %ebx
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r12
jmp 0xab242
testb $0x1, %r12b
movq -0x40(%rbp), %r13
je 0xab238
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r14, %rdx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0xab238
decl (%rdx)
jne 0xab238
movq %r14, %rdi
movq %r12, %rsi
callq 0xd13d
xorl %ebx, %ebx
movq -0x38(%rbp), %r12
movq -0x80(%rbp), %r14
movl $0x1, %edi
movl $0x60, %esi
callq 0x50c0
testq %rax, %rax
je 0xab35a
testb %r15b, %r15b
movzbl -0x60(%rbp), %ecx
movl $0x1, %edx
cmovnel %edx, %ecx
xorl %esi, %esi
testb %bl, %bl
cmovel %ecx, %esi
movl %edx, (%rax)
movb %bl, 0x59(%rax)
movb %sil, 0x58(%rax)
movups -0xd8(%rbp), %xmm0
movups %xmm0, 0x48(%rax)
movl -0x68(%rbp), %ecx
movl %ecx, 0x38(%rax)
movq -0x88(%rbp), %rcx
movq %rcx, 0x40(%rax)
movl -0x50(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl -0x54(%rbp), %ecx
movl %ecx, 0x18(%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq %r13, 0x10(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xc0(%rbp), %rcx
movq %r12, (%rcx)
movq -0xc8(%rbp), %rcx
movq %r14, (%rcx)
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x80(%rbp), %r13
movl -0x98(%rbp), %edx
movq -0x90(%rbp), %rcx
movq %r14, %rdi
movq -0x68(%rbp), %rsi
callq 0xd1ec
movq %rdx, %rbx
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq -0x38(%rbp), %r12
movq -0x50(%rbp), %rcx
movl -0x70(%rbp), %eax
movl -0x88(%rbp), %r14d
jmp 0xab050
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x3538a(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x3538f(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302
leaq 0x4e50e(%rip), %rsi     # 0xf986f
movl $0x32, %edx
movl $0x2, %edi
callq 0x5060
callq 0x52b6
movl $0x1, %edi
callq 0x5130
leaq 0x35347(%rip), %rdi     # 0xe06cd
movl $0x20, %esi
callq 0x9040
jmp 0xab352