// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaTypeElab_elabzetypezesigzeparamszx
static struct std_list_List_1 mw_mirth_elab_zaTypeElab_elabzetypezesigzeparamszx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_elab_zaTypeElab* in_zaTypeElab_2, struct mirth_type_StackType in_StackType_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_elab_zaTypeElab* *out_zaTypeElab_5) {
	uint64_t v7 = in_zaTypeElab_2->mtoken;
	struct mirth_mirth_zaMirth* v8;
	struct std_maybe_Maybe_1 v9 = mw_mirth_token_Token_lparenzy(in_zaMirth_1, v7, &v8);
	int64_t v10 = (v9).tag;
	decref(MK_std_maybe_Maybe_1(v9));
	INT v11 = WRAP_I63(0LL);
	INT v12 = v11;
	INT v13 = i64_to_int(v10);
	bool v14 = int_eq(v13, v12);
	bool v15 = !v14;
	struct mirth_type_StackType branch_StackType_16;
	struct mirth_mirth_zaMirth* branch_zaMirth_17;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_18;
	struct std_list_List_1 branch_List_19;
	if (v15) {
		uint64_t v20 = in_zaTypeElab_2->mtoken;
		struct mirth_mirth_zaMirth* v21;
		uint64_t v22 = mw_mirth_token_Token_next(v8, v20, &v21);
		uint64_t v23 = in_zaTypeElab_2->mtoken;
		struct mirth_mirth_zaMirth* v24;
		struct std_list_List_1 v25 = mw_mirth_token_Token_args(v21, v23, &v24);
		struct std_list_List_1 v26 = { .tag=std_list_List_1_Nil };
		struct std_list_List_1 v27;
		mw_std_list_List_1_buildzx(v26, &v27);
		bool v28 = true;
		struct mirth_mirth_zaMirth* r29 = v24;
		struct mirth_type_StackType v30 = in_StackType_3;
		struct mirth_elab_zaTypeElab* r31 = in_zaTypeElab_2;
		struct std_list_List_1 r32 = v27;
		struct std_list_List_1 v33 = v25;
		bool v34 = v28;
		bool v35 = v28;
		while (v35) {
			struct mirth_mirth_zaMirth* r36 = r29;
			struct mirth_type_StackType v37 = v30;
			struct mirth_elab_zaTypeElab* r38 = r31;
			struct std_list_List_1 r39 = r32;
			struct std_list_List_1 v40 = v33;
			bool v41 = v34;
			struct mirth_type_StackType branch_StackType_42;
			struct mirth_mirth_zaMirth* branch_zaMirth_43;
			struct mirth_elab_zaTypeElab* branch_zaTypeElab_44;
			struct std_list_List_1 branch_zaLister_45;
			struct std_list_List_1 branch_List_46;
			bool branch_Bool_47;
			switch ((v40).tag) {
				case std_list_List_1_Cons: {
					struct std_list_List_1 v48;
					VAL v49 = mtp_std_list_List_1_Cons(v40, &v48);
					r38->mtoken = V_mirth_token_Token(v49);
					incref(MK_mirth_type_StackType(v37));
					struct mirth_mirth_zaMirth* v50;
					struct mirth_elab_zaTypeElab* v51;
					struct mirth_type_ArrowType* v52 = mw_mirth_elab_zaTypeElab_elabzetypezesigzx(r36, r38, v37, &v50, &v51);
					struct mirth_type_Type v53 = mtw_mirth_type_Type_Arrow(v52);
					struct std_list_List_1 v54;
					mw_std_list_zaLister_1_pushzx(MK_mirth_type_Type(v53), r39, &v54);
					bool v55 = true;
					branch_Bool_47 = v55;
					branch_List_46 = v48;
					branch_zaLister_45 = v54;
					branch_zaTypeElab_44 = v51;
					branch_zaMirth_43 = v50;
					branch_StackType_42 = v37;
				} break;
				case std_list_List_1_Nil: {
					struct std_list_List_1 v56 = { .tag=std_list_List_1_Nil };
					bool v57 = false;
					branch_Bool_47 = v57;
					branch_List_46 = v56;
					branch_zaLister_45 = r39;
					branch_zaTypeElab_44 = r38;
					branch_zaMirth_43 = r36;
					branch_StackType_42 = v37;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			v35 = branch_Bool_47;
			v34 = branch_Bool_47;
			v33 = branch_List_46;
			r32 = branch_zaLister_45;
			r31 = branch_zaTypeElab_44;
			v30 = branch_StackType_42;
			r29 = branch_zaMirth_43;
		}
		decref(MK_std_list_List_1(v33));
		struct std_list_List_1 v58 = mw_std_list_zaLister_1_donezx(r32);
		r31->mtoken = v22;
		branch_List_19 = v58;
		branch_zaTypeElab_18 = r31;
		branch_zaMirth_17 = r29;
		branch_StackType_16 = v30;
	} else {
		struct std_list_List_1 v59 = { .tag=std_list_List_1_Nil };
		branch_List_19 = v59;
		branch_zaTypeElab_18 = in_zaTypeElab_2;
		branch_zaMirth_17 = v8;
		branch_StackType_16 = in_StackType_3;
	}
	decref(MK_mirth_type_StackType(branch_StackType_16));
	*out_zaTypeElab_5 = branch_zaTypeElab_18;
	*out_zaMirth_4 = branch_zaMirth_17;
	return branch_List_19;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %r13
movq %r8, %r12
movq %rcx, -0x40(%rbp)
movq %rdx, -0x50(%rbp)
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
movq %rsi, -0x38(%rbp)
movq 0x10(%rsi), %rsi
leaq -0x58(%rbp), %rdx
callq 0x31552
movl %eax, %ebx
movq %rdx, %rax
movq %r14, -0x48(%rbp)
andq %r14, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x349a6
decl (%rax)
jne 0x349a6
movq %rbx, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xdc920(%rip), %rsi     # 0x1112c1
callq 0xd13d
leaq 0x1(,%rbx,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x34b18
movq %r13, -0x70(%rbp)
movq %r12, -0x78(%rbp)
movq -0x38(%rbp), %r14
movq 0x10(%r14), %rsi
movq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdx
callq 0x28324
movq %rax, -0x68(%rbp)
movq 0x10(%r14), %rsi
movq (%rbx), %rdi
leaq -0xb0(%rbp), %r14
movq %r14, %rdx
callq 0x3204c
movl %eax, %r12d
movq %rdx, %r13
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd01b
movl %eax, %r15d
movq %rdx, %rbx
movq (%r14), %r14
movq -0x40(%rbp), %rcx
andq %rcx, -0x48(%rbp)
setne %al
andq $0x3, %rcx
movq %rcx, -0x60(%rbp)
sete %cl
andb %al, %cl
movb %cl, -0x29(%rbp)
cmpl $0x1, %r12d
jne 0x34add
movq %r13, %rdi
leaq -0xa8(%rbp), %rsi
callq 0xd0aa
movq -0x38(%rbp), %rsi
movq %rax, 0x10(%rsi)
cmpb $0x0, -0x29(%rbp)
je 0x34a61
movq -0x48(%rbp), %rax
incl (%rax)
movq %r14, %rdi
movq -0x50(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x88(%rbp), %r8
leaq -0x80(%rbp), %r9
callq 0x3433e
movq %rax, %rdi
callq 0x34fb2
movq %rdx, %rdi
movabsq $0xa000000000000, %rax  # imm = 0xA000000000000
orq %rax, %rdi
leaq 0xdd04e(%rip), %rsi     # 0x111ae9
movl %r15d, %edx
movq %rbx, %rcx
leaq -0x98(%rbp), %r8
callq 0x949e
movl -0xa8(%rbp), %r12d
movq -0xa0(%rbp), %r13
movl -0x98(%rbp), %r15d
movq -0x90(%rbp), %rbx
movq -0x80(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x88(%rbp), %r14
jmp 0x34a34
testl %r12d, %r12d
jne 0x34b89
xorl %edi, %edi
xorl %esi, %esi
movl %r15d, %edx
movq %rbx, %rcx
callq 0xd01b
movl %eax, %ebx
movq %rdx, %r15
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %r13
movq -0x48(%rbp), %rcx
movq -0x60(%rbp), %rdx
jmp 0x34b37
movq -0x58(%rbp), %r14
movq -0x40(%rbp), %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
movl %eax, %edx
andl $0x3, %edx
xorl %ebx, %ebx
xorl %r15d, %r15d
testq %rcx, %rcx
sete %al
testq %rdx, %rdx
movq %rcx, %rdx
setne %cl
orb %al, %cl
jne 0x34b66
decl (%rdx)
jne 0x34b66
movq -0x50(%rbp), %rdi
shlq $0x30, %rdi
orq -0x40(%rbp), %rdi
leaq 0xdd060(%rip), %rsi     # 0x111bc1
callq 0xd13d
movq -0x38(%rbp), %rax
movq %rax, (%r13)
movq %r14, (%r12)
movl %ebx, %eax
movq %r15, %rdx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0xabb2b(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0xabb30(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302