// File: /workspace/github_c_makefile_star2_O2/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 $0x88, %rsp
movq %r9, -0x70(%rbp)
movq %r8, %r12
movq %rcx, -0x30(%rbp)
movq %rdx, -0x48(%rbp)
movq %rsi, %r13
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq 0x10(%rsi), %rsi
leaq -0x50(%rbp), %rdx
callq 0x2ec8b
movl %eax, %ebx
movq %rdx, %rax
andq %r15, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x31d8d
decl (%rax)
jne 0x31d8d
movq %rbx, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xd6539(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %rbx, %rdi
callq 0xd86d
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xd759
testb %al, %al
je 0x31dc0
movq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rbx
andq %rbx, %r15
andl $0x3, %ebx
xorl %r14d, %r14d
movq %r15, %rdx
xorl %r15d, %r15d
jmp 0x31f5b
movq %r12, -0x68(%rbp)
movq 0x10(%r13), %rsi
movq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdx
callq 0x2598b
movq %rax, -0x60(%rbp)
movq 0x10(%r13), %rsi
movq (%rbx), %rdi
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdx
callq 0x2f684
movl %eax, %r12d
movq %rdx, %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0xcd32
movq (%rbx), %rcx
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
andq %r15, %rsi
movq %rsi, -0x40(%rbp)
setne %sil
andq $0x3, %rbx
sete %dil
andb %sil, %dil
movb %dil, -0x38(%rbp)
leaq -0x90(%rbp), %rsi
movb $0x1, %r8b
movq %r14, %rdi
testb $0x1, %r8b
je 0x31ef9
xorl %r8d, %r8d
movl $0x0, %r14d
testl %r12d, %r12d
je 0x31e32
movq %rbx, -0x58(%rbp)
cmpl $0x1, %r12d
jne 0x31fb0
movq %rdx, %r15
movl %eax, %ebx
movq %rcx, %r14
callq 0xce01
movq %rax, 0x10(%r13)
cmpb $0x0, -0x38(%rbp)
je 0x31e78
movq -0x40(%rbp), %rax
incl (%rax)
movq %r14, %rdi
movq %r13, %rsi
movq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x80(%rbp), %r8
leaq -0x78(%rbp), %r9
callq 0x31786
movq %rax, %rdi
callq 0x3233d
movq %rdx, %rdi
movabsq $0xa000000000000, %rax  # imm = 0xA000000000000
orq %rax, %rdi
leaq 0xd6c37(%rip), %rsi     # 0x108ae9
movl %ebx, %edx
movq %r15, %rcx
leaq -0xa0(%rbp), %r8
callq 0x8e35
movl -0x90(%rbp), %r12d
movq -0x88(%rbp), %r14
movl -0xa0(%rbp), %eax
movq -0x98(%rbp), %rdx
movq -0x78(%rbp), %r13
movq -0x80(%rbp), %rcx
movq -0x58(%rbp), %rbx
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
jmp 0x31e28
movq %rcx, -0x38(%rbp)
andq %rdi, %r15
sete %sil
testb $0x3, %dil
setne %cl
orb %sil, %cl
jne 0x31f37
decl (%r15)
jne 0x31f37
shlq $0x30, %r12
orq %rdi, %r12
movl %eax, %r14d
movq %rdx, %r15
leaq 0xd6350(%rip), %rsi     # 0x108279
movq %r12, %rdi
callq 0xce94
movq %r15, %rdx
movl %r14d, %eax
movl %eax, %edi
movq %rdx, %rsi
callq 0xcd32
movl %eax, %r14d
movq %rdx, %r15
movq -0x60(%rbp), %rax
movq %rax, 0x10(%r13)
movq -0x68(%rbp), %r12
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
testq %rdx, %rdx
sete %al
testq %rbx, %rbx
setne %cl
orb %al, %cl
jne 0x31f8d
decl (%rdx)
jne 0x31f8d
movq -0x48(%rbp), %rdi
shlq $0x30, %rdi
orq -0x30(%rbp), %rdi
movq %rsi, %rbx
leaq 0xd6c3c(%rip), %rsi     # 0x108bc1
callq 0xce94
movq %rbx, %rsi
movq -0x70(%rbp), %rax
movq %r13, (%rax)
movq %rsi, (%r12)
movl %r14d, %eax
movq %r15, %rdx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa2856(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6