// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaTypeElab_elabzetypezesigzx
static struct mirth_type_ArrowType* mw_mirth_elab_zaTypeElab_elabzetypezesigzx (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;
	bool v9 = mw_mirth_token_Token_runzeendzy(in_zaMirth_1, v7, &v8);
	struct mirth_mirth_zaMirth* branch_zaMirth_10;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_11;
	if (v9) {
		uint64_t v12 = in_zaTypeElab_2->mtoken;
		STR* v13;
		STRLIT(v13, "expected type signature", 23);
		struct mirth_mirth_zaMirth* v14;
		mw_mirth_mirth_zaMirth_emitzeerrorzx(v8, v12, v13, &v14);
		branch_zaTypeElab_11 = in_zaTypeElab_2;
		branch_zaMirth_10 = v14;
	} else {
		branch_zaTypeElab_11 = in_zaTypeElab_2;
		branch_zaMirth_10 = v8;
	}
	incref(MK_mirth_type_StackType(in_StackType_3));
	struct mirth_mirth_zaMirth* v15;
	struct mirth_elab_zaTypeElab* v16;
	struct std_list_List_1 v17 = mw_mirth_elab_zaTypeElab_elabzetypezesigzeparamszx(branch_zaMirth_10, branch_zaTypeElab_11, in_StackType_3, &v15, &v16);
	incref(MK_mirth_type_StackType(in_StackType_3));
	struct mirth_mirth_zaMirth* v18;
	struct mirth_elab_zaTypeElab* v19;
	struct mirth_type_StackType v20 = mw_mirth_elab_zaTypeElab_elabzestackzetypezx(v15, v16, in_StackType_3, &v18, &v19);
	uint64_t v21 = v19->mtoken;
	struct mirth_mirth_zaMirth* v22;
	bool v23 = mw_mirth_token_Token_vdashzy(v18, v21, &v22);
	struct std_list_List_1 branch_List_24;
	struct mirth_type_StackType branch_StackType_25;
	struct mirth_mirth_zaMirth* branch_zaMirth_26;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_27;
	struct mirth_type_StackType branch_StackType_28;
	if (v23) {
		decref(MK_mirth_type_StackType(in_StackType_3));
		uint64_t v29 = v19->mtoken;
		struct mirth_mirth_zaMirth* v30;
		uint64_t v31 = mw_mirth_token_Token_succ(v22, v29, &v30);
		v19->mtoken = v31;
		incref(MK_mirth_type_StackType(v20));
		struct mirth_mirth_zaMirth* v32;
		struct mirth_elab_zaTypeElab* v33;
		struct std_list_List_1 v34 = mw_mirth_elab_zaTypeElab_elabzetypezesigzeparamszx(v30, v19, v20, &v32, &v33);
		struct std_list_List_1 v35 = mw_std_list_List_1_cat(v17, v34);
		incref(MK_mirth_type_StackType(v20));
		struct mirth_mirth_zaMirth* v36;
		struct mirth_elab_zaTypeElab* v37;
		struct mirth_type_StackType v38 = mw_mirth_elab_zaTypeElab_elabzestackzetypezx(v32, v33, v20, &v36, &v37);
		branch_StackType_28 = v38;
		branch_zaTypeElab_27 = v37;
		branch_zaMirth_26 = v36;
		branch_StackType_25 = v20;
		branch_List_24 = v35;
	} else {
		branch_StackType_28 = v20;
		branch_zaTypeElab_27 = v19;
		branch_zaMirth_26 = v22;
		branch_StackType_25 = in_StackType_3;
		branch_List_24 = v17;
	}
	uint64_t v39 = branch_zaTypeElab_27->mtoken;
	struct mirth_mirth_zaMirth* v40;
	bool v41 = mw_mirth_token_Token_sigzedasheszy(branch_zaMirth_26, v39, &v40);
	struct std_list_List_1 branch_List_42;
	struct mirth_type_StackType branch_StackType_43;
	struct mirth_type_StackType branch_StackType_44;
	struct mirth_mirth_zaMirth* branch_zaMirth_45;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_46;
	struct mirth_type_StackType branch_StackType_47;
	if (v41) {
		uint64_t v48 = branch_zaTypeElab_27->mtoken;
		struct mirth_mirth_zaMirth* v49;
		uint64_t v50 = mw_mirth_token_Token_succ(v40, v48, &v49);
		branch_zaTypeElab_27->mtoken = v50;
		incref(MK_mirth_type_StackType(branch_StackType_25));
		struct mirth_mirth_zaMirth* v51;
		struct mirth_elab_zaTypeElab* v52;
		struct mirth_type_StackType v53 = mw_mirth_elab_zaTypeElab_elabzestackzetypezx(v49, branch_zaTypeElab_27, branch_StackType_25, &v51, &v52);
		branch_StackType_47 = v53;
		branch_zaTypeElab_46 = v52;
		branch_zaMirth_45 = v51;
		branch_StackType_44 = branch_StackType_25;
		branch_StackType_43 = branch_StackType_28;
		branch_List_42 = branch_List_24;
	} else {
		incref(MK_mirth_type_StackType(branch_StackType_25));
		branch_StackType_47 = branch_StackType_28;
		branch_zaTypeElab_46 = branch_zaTypeElab_27;
		branch_zaMirth_45 = v40;
		branch_StackType_44 = branch_StackType_25;
		branch_StackType_43 = branch_StackType_25;
		branch_List_42 = branch_List_24;
	}
	uint64_t v54 = branch_zaTypeElab_46->mtoken;
	struct mirth_mirth_zaMirth* v55;
	bool v56 = mw_mirth_token_Token_runzeendzy(branch_zaMirth_45, v54, &v55);
	struct mirth_mirth_zaMirth* branch_zaMirth_57;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_58;
	if (v56) {
		branch_zaTypeElab_58 = branch_zaTypeElab_46;
		branch_zaMirth_57 = v55;
	} else {
		uint64_t v59 = branch_zaTypeElab_46->mtoken;
		STR* v60;
		STRLIT(v60, "expected right paren or comma", 29);
		struct mirth_mirth_zaMirth* v61;
		mw_mirth_mirth_zaMirth_emitzeerrorzx(v55, v59, v60, &v61);
		branch_zaTypeElab_58 = branch_zaTypeElab_46;
		branch_zaMirth_57 = v61;
	}
	struct mirth_type_StackType v62 = mw_std_list_List_1_for_1_sp102(branch_StackType_43, branch_List_42);
	struct mirth_type_ArrowType* v63 = mw_mirth_type_Tzezg(v62, branch_StackType_47);
	decref(MK_mirth_type_StackType(branch_StackType_44));
	*out_zaTypeElab_5 = branch_zaTypeElab_58;
	*out_zaMirth_4 = branch_zaMirth_57;
	return v63;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, -0x98(%rbp)
movq %r8, -0xa0(%rbp)
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r14
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq 0x10(%rsi), %rsi
leaq -0x88(%rbp), %rdx
callq 0x316aa
testb %al, %al
je 0x3183a
movq %rbx, %r13
movq 0x10(%r14), %rbx
movq 0x10daf7c(%rip), %rdx   # 0x110c758
testq %rdx, %rdx
jne 0x317fa
leaq 0xa757f(%rip), %rdi     # 0xd8d67
pushq $0x17
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10daf5e(%rip)   # 0x110c758
movq %rdx, %rax
andq %r12, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x31811
incl (%rax)
movq -0x88(%rbp), %rdi
leaq -0x80(%rbp), %r12
movq %rbx, %rsi
movq %r12, %rcx
callq 0x2ceb4
movq (%r12), %rdi
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %r13, %rbx
jmp 0x31841
movq -0x88(%rbp), %rdi
movq %r15, %r13
andq %r12, %r13
setne %al
testb $0x3, %r15b
sete %r12b
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x3185f
incl (%r13)
leaq -0x80(%rbp), %r8
leaq -0xb8(%rbp), %r9
movq %r14, %rsi
movl %ebx, %edx
movq %r15, %rcx
callq 0x31d1f
movl %eax, -0x2c(%rbp)
movq %rdx, -0x68(%rbp)
testb %r12b, %r12b
je 0x31887
incl (%r13)
movq -0x80(%rbp), %rdi
movq -0xb8(%rbp), %rsi
leaq -0xb0(%rbp), %r8
leaq -0xa8(%rbp), %r9
movl %ebx, %edx
movq %r15, %rcx
callq 0x31fc7
movq %r15, -0x40(%rbp)
movl %eax, %r15d
movq %rbx, %r14
movq %rdx, -0x38(%rbp)
movq %rdx, %rbx
leaq -0xa8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq 0x10(%rax), %rsi
leaq -0xb0(%rbp), %rax
movq (%rax), %rdi
leaq -0x78(%rbp), %rdx
callq 0x321eb
testb %al, %al
je 0x319bb
movq -0x40(%rbp), %rax
testb %r12b, %r12b
je 0x3190d
decl (%r13)
jne 0x3190d
shlq $0x30, %r14
orq %rax, %r14
movq %r14, %rdi
leaq 0xd72b9(%rip), %rsi     # 0x108bc1
callq 0xce94
movq -0x48(%rbp), %rsi
movq 0x10(%rsi), %rax
xorl %ecx, %ecx
cmpq %rax, 0x10daada(%rip)   # 0x110c3f8
leaq 0x1(%rax), %rax
cmovaq %rax, %rcx
movq -0x78(%rbp), %rdi
movq %rcx, 0x10(%rsi)
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq -0x38(%rbp), %r14
andq %r12, %r14
setne %al
movq %rbx, %r13
testb $0x3, %r13b
sete %bl
andb %al, %bl
cmpb $0x1, %bl
jne 0x31956
incl (%r14)
leaq -0x60(%rbp), %r8
leaq -0x50(%rbp), %r9
movl %r15d, %edx
movq %r13, %rcx
callq 0x31d1f
movq %rdx, %rcx
movl -0x2c(%rbp), %edi
movq -0x68(%rbp), %rsi
movl %eax, %edx
callq 0x26383
movl %eax, -0x2c(%rbp)
movq %rdx, -0x68(%rbp)
testb %bl, %bl
je 0x31988
incl (%r14)
movq -0x60(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x70(%rbp), %rbx
leaq -0xc0(%rbp), %r14
movl %r15d, %edx
movq %r13, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x31fc7
movl %eax, -0x38(%rbp)
movq %rdx, -0x58(%rbp)
movq (%r14), %r14
movq (%rbx), %rdi
jmp 0x319dc
movq -0x78(%rbp), %rdi
movl %r15d, -0x38(%rbp)
movq %rbx, -0x58(%rbp)
movl %r14d, %r15d
movq -0x40(%rbp), %r13
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq -0x48(%rbp), %r14
movq 0x10(%r14), %rsi
leaq -0x60(%rbp), %rdx
callq 0x32294
testb %al, %al
movq %r13, -0x48(%rbp)
je 0x31a59
movq 0x10(%r14), %rax
xorl %ecx, %ecx
cmpq %rax, 0x10da9fa(%rip)   # 0x110c3f8
leaq 0x1(%rax), %rax
cmovaq %rax, %rcx
movq -0x60(%rbp), %rdi
movq %rcx, 0x10(%r14)
movq %r13, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x31a24
incl (%rax)
leaq -0x50(%rbp), %r12
leaq -0x70(%rbp), %rbx
movq %r14, %rsi
movl %r15d, %edx
movq %r13, %rcx
movq %r12, %r8
movq %rbx, %r9
callq 0x31fc7
movl %eax, -0x40(%rbp)
movq %rdx, %r13
movq (%rbx), %r14
movq (%r12), %rdi
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
jmp 0x31a89
movq %r13, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x31a6f
incl (%rax)
movq -0x60(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x58(%rbp), %r13
movl %r15d, -0x38(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x10(%r14), %rsi
leaq -0x50(%rbp), %rdx
callq 0x316aa
testb %al, %al
movq %r15, -0x90(%rbp)
je 0x31aa7
movq -0x50(%rbp), %r15
jmp 0x31b11
movq 0x10(%r14), %r12
movq 0x10dacae(%rip), %rdx   # 0x110c760
testq %rdx, %rdx
jne 0x31ad0
leaq 0xa72c1(%rip), %rdi     # 0xd8d7f
pushq $0x1d
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10dac90(%rip)   # 0x110c760
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x31af1
incl (%rax)
movq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rbx
movq %r12, %rsi
movq %rbx, %rcx
callq 0x2ceb4
movq (%rbx), %r15
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movl -0x38(%rbp), %edi
movq -0x58(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x68(%rbp), %rcx
callq 0x1df70
movl %eax, %edi
movq %rdx, %rsi
movl -0x40(%rbp), %edx
movq %r13, %rcx
callq 0x1e896
movq %rax, %rbx
movq -0x48(%rbp), %rdx
andq %rdx, %r12
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x31b6b
decl (%r12)
jne 0x31b6b
movq -0x90(%rbp), %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xd705b(%rip), %rsi     # 0x108bc1
callq 0xce94
movq -0x98(%rbp), %rax
movq %r14, (%rax)
movq -0xa0(%rbp), %rax
movq %r15, (%rax)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq