// File: /workspace/github_c_makefile_star2_O2/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 $0xb8, %rsp
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, %r12
movq %rdx, -0xa0(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0xfffffffffffc, %r8    # imm = 0xFFFFFFFFFFFC
movq 0x10(%rsi), %r15
leaq 0x66e10(%rip), %rsi     # 0x108111
movq %r15, %rax
andq %r8, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0xa132c
cmpl $0x0, (%rax)
jne 0xa132c
movq %r15, %rdi
callq 0xce94
movabsq $0xfffffffffffc, %r8    # imm = 0xFFFFFFFFFFFC
movq %r15, -0x60(%rbp)
movq $0x3, 0x10(%rbx)
movq %r12, %rax
andq %r8, %rax
movq %rax, -0x38(%rbp)
setne %al
testb $0x3, %r12b
sete %dil
andb %al, %dil
cmpb $0x1, %dil
jne 0xa135c
movq -0x38(%rbp), %rax
incl (%rax)
movl 0x8(%r12), %r15d
movq 0x10(%r12), %r13
movq %r13, %rax
andq %r8, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0xa137c
incl (%rax)
movb %dil, -0x29(%rbp)
testb %dil, %dil
je 0xa139c
movq -0x38(%rbp), %rax
decl (%rax)
jne 0xa139c
movq %r12, %rdi
leaq 0x677e2(%rip), %rsi     # 0x108b79
callq 0xce94
leaq -0x2c(%rbp), %rax
leaq -0xb8(%rbp), %r10
leaq -0xc0(%rbp), %r9
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movq %r13, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
callq 0xa1905
popq %rcx
popq %rsi
movl %eax, -0x8c(%rbp)
movq %rdx, -0x98(%rbp)
movb -0x29(%rbp), %sil
testb %sil, %sil
je 0xa13e3
movq -0x38(%rbp), %rax
incl (%rax)
movl 0x18(%r12), %ebx
movq 0x20(%r12), %r14
movq %r14, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0xa140d
incl (%rax)
testb %sil, %sil
je 0xa1429
movq -0x38(%rbp), %rax
decl (%rax)
jne 0xa1429
movq %r12, %rdi
leaq 0x67755(%rip), %rsi     # 0x108b79
callq 0xce94
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
leaq -0x2b(%rbp), %rax
movq %r12, -0x40(%rbp)
leaq -0xd8(%rbp), %r12
pushq $0x1
popq %r8
leaq -0xe0(%rbp), %r15
movl %ebx, %edx
movq %r14, %rcx
movq %r15, %r9
pushq %rax
pushq %r12
callq 0xa1905
popq %rcx
popq %rsi
movl %eax, %ebx
movq %rdx, %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0xcd32
movl %eax, %edi
movq (%r15), %r15
movq (%r12), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %r12
movb $0x1, %al
leaq -0x70(%rbp), %rsi
movq %r14, %r13
testb $0x1, %al
je 0xa162b
xorl %eax, %eax
movl $0x0, %r14d
testl %ebx, %ebx
je 0xa1488
movq %rdx, -0x50(%rbp)
movl %edi, -0x58(%rbp)
cmpl $0x1, %ebx
jne 0xa18cf
movq %r13, %rdi
callq 0xce01
movq %rax, %r14
movq %rax, %rbx
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %rbx
movq %rdx, -0x48(%rbp)
testb $0x1, %dl
jne 0xa14db
movl %r14d, %eax
andl $0x3, %eax
jmp 0xa14f3
testq %rbx, %rbx
sete %cl
movq %r14, %rax
andq $0x3, %rax
setne %dl
orb %cl, %dl
jne 0xa14f3
incl (%rbx)
xorl %eax, %eax
testq %rbx, %rbx
setne %cl
testq %rax, %rax
sete %r12b
andb %cl, %r12b
cmpb $0x1, %r12b
jne 0xa150b
incl (%rbx)
movq %r15, %rdi
movq %r14, %rsi
leaq -0x88(%rbp), %rdx
callq 0xa2ec1
testb %al, %al
je 0xa15ae
movl 0x8(%r14), %edi
movq 0x10(%r14), %rcx
movq %rcx, %r13
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r13
setne %al
testb $0x3, %cl
sete %r15b
andb %al, %r15b
cmpb $0x1, %r15b
jne 0xa1554
incl (%r13)
testb %r12b, %r12b
je 0xa1578
decl (%rbx)
jne 0xa1578
movq %rdi, %rbx
movq %r14, %rdi
leaq 0x68b27(%rip), %rsi     # 0x10a091
movq %rcx, %r12
callq 0xce94
movq %r12, %rcx
movq %rbx, %rdi
testl %edi, %edi
movq -0x40(%rbp), %r12
jne 0xa15c7
movq -0x88(%rbp), %r15
movl -0x70(%rbp), %edx
movq -0x68(%rbp), %rcx
movq %r14, %rdi
movq -0x48(%rbp), %rsi
callq 0xcf39
movq %rdx, %r14
xorl %eax, %eax
pushq $0x1
popq %rbx
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rdx
jmp 0xa1484
testb %r12b, %r12b
movq -0x40(%rbp), %r12
je 0xa15f4
decl (%rbx)
jne 0xa15f4
movq %r14, %rdi
leaq 0x68acc(%rip), %rsi     # 0x10a091
jmp 0xa15ef
cmpl $0x1, %edi
jne 0xa15d6
movq %rcx, %rdi
callq 0xa2f51
jmp 0xa15f4
testb %r15b, %r15b
je 0xa15f4
decl (%r13)
jne 0xa15f4
shlq $0x30, %rdi
orq %rcx, %rdi
leaq 0x68aea(%rip), %rsi     # 0x10a0d9
callq 0xce94
movq -0x88(%rbp), %r15
movq %r14, %rdi
movq -0x48(%rbp), %rsi
movl -0x58(%rbp), %edx
movq -0x50(%rbp), %rcx
leaq -0x88(%rbp), %r8
callq 0x8e35
movl -0x70(%rbp), %ebx
movq -0x68(%rbp), %r14
movl -0x88(%rbp), %edi
movq -0x80(%rbp), %rdx
jmp 0xa1482
movq %rdx, %rsi
callq 0xcd32
movl %eax, -0x40(%rbp)
movq %rdx, -0x58(%rbp)
leaq -0xd0(%rbp), %rdx
movl %ebx, %edi
movq %r13, %rsi
callq 0x1075d
movl %eax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq -0x78(%rbp), %r13
movq 0x10(%r13), %r14
movq %r14, %rbx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rbx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0xa16ce
movl (%rbx), %eax
testl %eax, %eax
movb -0x29(%rbp), %sil
jne 0xa16a1
movq %r14, %rdi
leaq 0x66a85(%rip), %rsi     # 0x108111
callq 0xce94
movb -0x29(%rbp), %sil
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
movl (%rbx), %eax
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%r13)
decl %eax
movl %eax, (%rbx)
jne 0xa16da
movq %r14, %rdi
leaq 0x66a58(%rip), %rsi     # 0x108111
callq 0xce94
movb -0x29(%rbp), %sil
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
jmp 0xa16da
movq -0x60(%rbp), %rax
movq %rax, 0x10(%r13)
movb -0x29(%rbp), %sil
testb %sil, %sil
je 0xa16e5
movq -0x38(%rbp), %rax
incl (%rax)
movl 0x18(%r12), %r14d
movq 0x20(%r12), %rbx
movq %rbx, %rax
andq %rdx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0xa1704
incl (%rax)
movb -0x2b(%rbp), %al
movb %al, -0x60(%rbp)
movb -0x2c(%rbp), %al
movb %al, -0x2a(%rbp)
testb %sil, %sil
je 0xa172c
movq -0x38(%rbp), %rax
decl (%rax)
jne 0xa172c
movq %r12, %rdi
leaq 0x67452(%rip), %rsi     # 0x108b79
callq 0xce94
leaq -0x70(%rbp), %rcx
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xa197f
testl %eax, %eax
je 0xa17e8
cmpl $0x1, %eax
jne 0xa18cf
movq %rdx, %rdi
callq 0xd491
movq %rax, %r14
movq %rdx, %r15
movb -0x29(%rbp), %sil
testb %sil, %sil
je 0xa176c
movq -0x38(%rbp), %rax
incl (%rax)
movl 0x8(%r12), %ebx
movq 0x10(%r12), %r13
movq %r13, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0xa1796
incl (%rax)
testb %sil, %sil
je 0xa17b2
movq -0x38(%rbp), %rax
decl (%rax)
jne 0xa17b2
movq %r12, %rdi
leaq 0x673cc(%rip), %rsi     # 0x108b79
callq 0xce94
movq -0x70(%rbp), %rdi
leaq -0x88(%rbp), %rcx
movl %ebx, %esi
movq %r13, %rdx
callq 0xa197f
testl %eax, %eax
je 0xa17f0
cmpl $0x1, %eax
movq -0x78(%rbp), %r13
jne 0xa18cf
movq %rdx, %rdi
callq 0xd491
cmpq %r14, %rax
setne %bl
jmp 0xa1826
movq -0x70(%rbp), %r14
xorl %ebx, %ebx
jmp 0xa182d
testb $0x1, %r15b
movq -0x78(%rbp), %r13
je 0xa1824
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r14, %rdx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0xa1824
decl (%rdx)
jne 0xa1824
movq %r14, %rdi
movq %r15, %rsi
callq 0xce94
xorl %ebx, %ebx
movq -0x88(%rbp), %r14
pushq $0x1
popq %rdi
pushq $0x60
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0xa18e6
cmpb $0x0, -0x60(%rbp)
movzbl -0x2a(%rbp), %ecx
pushq $0x1
popq %rdx
cmovnel %edx, %ecx
xorl %esi, %esi
testb %bl, %bl
cmovel %ecx, %esi
movl %edx, (%rax)
movb %bl, 0x59(%rax)
movb %sil, 0x58(%rax)
movups -0xd0(%rbp), %xmm0
movups %xmm0, 0x48(%rax)
movl -0x50(%rbp), %ecx
movl %ecx, 0x38(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x40(%rax)
movl -0x40(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl -0x8c(%rbp), %ecx
movl %ecx, 0x18(%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq %r12, 0x10(%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rcx
movq %r13, (%rcx)
movq -0xb0(%rbp), %rcx
movq %r14, (%rcx)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32f37(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6
leaq 0x4c2bf(%rip), %rsi     # 0xedbac
pushq $0x2
popq %rdi
pushq $0x32
popq %rdx
callq 0x5060
callq 0x52ae
pushq $0x1
popq %rdi
callq 0x5130