// File: /workspace/github_c_makefile_star2_O1/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, -0x90(%rbp)
movq %r8, -0x98(%rbp)
movq %rcx, %r13
movl %edx, %ebx
movq %rsi, %r14
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
movq 0x10(%rsi), %rsi
leaq -0x80(%rbp), %rdx
callq 0x3540e
testb %al, %al
je 0x3558d
movq 0x10(%r14), %rsi
cmpq $0x0, 0x10e4265(%rip)   # 0x1119758
jne 0x3552d
movl $0x17, %edi
movq %rsi, %r15
callq 0xf9f7
movq %r15, %rsi
movq $0x17, 0x10(%rax)
movabsq $0x65727574616e6769, %rcx # imm = 0x65727574616E6769
movq %rcx, 0x27(%rax)
movups 0xb37d0(%rip), %xmm0    # 0xe8cf2
movups %xmm0, 0x18(%rax)
movq %rax, 0x10e422b(%rip)   # 0x1119758
movq 0x10e4224(%rip), %r12   # 0x1119758
movq %r12, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x35554
incl (%rax)
movq -0x80(%rbp), %rdi
leaq -0x48(%rbp), %r15
movq %r15, %rdx
callq 0x1b861
movq (%r15), %rdi
leaq -0x50(%rbp), %r15
movq %rax, %rsi
movq %r12, %rdx
movl $0x2, %ecx
movq %r15, %r8
callq 0x1bf3a
movq (%r15), %rdi
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
jmp 0x35591
movq -0x80(%rbp), %rdi
movq %r13, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x355a7
incl (%rax)
leaq -0xb0(%rbp), %r8
leaq -0xa8(%rbp), %r9
movq %r14, %rsi
movl %ebx, %edx
movq %r13, %rcx
callq 0x35a72
movl %eax, -0x30(%rbp)
movq %rdx, -0x58(%rbp)
movq %r13, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x355df
incl (%rax)
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0xa0(%rbp), %r8
leaq -0xb8(%rbp), %r14
movl %ebx, %edx
movq %r13, %rcx
movq %r14, %r9
callq 0x35d35
movq %rbx, %r15
movl %eax, %ebx
movq %rdx, %r12
movq (%r14), %r14
movq 0x10(%r14), %rsi
leaq -0xa0(%rbp), %rax
movq (%rax), %rdi
leaq -0x78(%rbp), %rdx
callq 0x35fc2
testb %al, %al
je 0x3571c
movq %r12, -0x38(%rbp)
movq %r13, %rax
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x3566e
decl (%rax)
jne 0x3566e
shlq $0x30, %r15
orq %r13, %r15
movq %r15, %rdi
leaq 0xe0558(%rip), %rsi     # 0x115bc1
callq 0xd4e3
movq 0x10(%r14), %rax
xorl %ecx, %ecx
cmpq %rax, 0x10e3d7d(%rip)   # 0x11193f8
leaq 0x1(%rax), %rax
cmovaq %rax, %rcx
movq -0x78(%rbp), %rdi
movq %rcx, 0x10(%r14)
movq -0x38(%rbp), %r15
movq %r15, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x356a5
incl (%rax)
leaq -0x50(%rbp), %r8
leaq -0x48(%rbp), %r9
movq %r14, %rsi
movq %rbx, %r13
movl %r13d, %edx
movq %r15, %rcx
callq 0x35a72
movq %rdx, %rcx
movl -0x30(%rbp), %edi
movq -0x58(%rbp), %rsi
movl %eax, %edx
callq 0x293eb
movl %eax, -0x30(%rbp)
movq %rdx, -0x58(%rbp)
movq %r15, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x356ec
incl (%rax)
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rbx
leaq -0x60(%rbp), %r14
movl %r13d, %edx
movq %r15, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x35d35
movl %eax, -0x2c(%rbp)
movq %rdx, -0x40(%rbp)
movq (%r14), %r14
movq (%rbx), %rdi
jmp 0x3573a
movq -0x78(%rbp), %rdi
movl %ebx, -0x2c(%rbp)
movq %r12, -0x40(%rbp)
movl %r15d, %eax
movq %r13, %r15
movq %rax, %r13
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq 0x10(%r14), %rsi
leaq -0x68(%rbp), %rdx
callq 0x3609b
testb %al, %al
je 0x357aa
movq 0x10(%r14), %rax
xorl %ecx, %ecx
cmpq %rax, 0x10e3ca0(%rip)   # 0x11193f8
leaq 0x1(%rax), %rax
cmovaq %rax, %rcx
movq -0x68(%rbp), %rdi
movq %rcx, 0x10(%r14)
movq %r15, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x3577e
incl (%rax)
leaq -0x50(%rbp), %rbx
leaq -0x48(%rbp), %r12
movq %r14, %rsi
movl %r13d, %edx
movq %r15, %rcx
movq %rbx, %r8
movq %r12, %r9
callq 0x35d35
movl %eax, -0x38(%rbp)
movq %rdx, -0x70(%rbp)
movq (%r12), %r14
movq (%rbx), %rdi
jmp 0x357da
movq %r15, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x357c0
incl (%rax)
movq -0x68(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movl %r13d, -0x2c(%rbp)
movq %r15, -0x40(%rbp)
movq 0x10(%r14), %rsi
leaq -0x60(%rbp), %rdx
callq 0x3540e
testb %al, %al
je 0x357f4
movq -0x60(%rbp), %r12
jmp 0x35897
movq 0x10(%r14), %r12
cmpq $0x0, 0x10e3f60(%rip)   # 0x1119760
jne 0x35831
movl $0x1d, %edi
callq 0xf9f7
movq $0x1d, 0x10(%rax)
movups 0xb34ef(%rip), %xmm0    # 0xe8d0a
movups %xmm0, 0x18(%rax)
movups 0xb34f1(%rip), %xmm0    # 0xe8d17
movups %xmm0, 0x25(%rax)
movq %rax, 0x10e3f2f(%rip)   # 0x1119760
movq %r13, -0x88(%rbp)
movq 0x10e3f21(%rip), %rbx   # 0x1119760
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x3585e
incl (%rax)
movq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %r13
movq %r12, %rsi
movq %r13, %rdx
callq 0x1b861
movq (%r13), %rdi
leaq -0x50(%rbp), %r12
movq %rax, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
movq %r12, %r8
callq 0x1bf3a
movq (%r12), %r12
movq -0x88(%rbp), %r13
movl -0x2c(%rbp), %edi
movq -0x40(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x58(%rbp), %rcx
callq 0x2072e
movl %eax, %edi
movq %rdx, %rsi
movl -0x38(%rbp), %edx
movq -0x70(%rbp), %rcx
callq 0x210ca
movq %rax, %rbx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r15, %rdx
sete %al
testb $0x3, %r15b
setne %cl
orb %al, %cl
jne 0x358f3
decl (%rdx)
jne 0x358f3
shlq $0x30, %r13
orq %r15, %r13
movq %r13, %rdi
leaq 0xe02d3(%rip), %rsi     # 0x115bc1
callq 0xd4e3
movq -0x90(%rbp), %rax
movq %r14, (%rax)
movq -0x98(%rbp), %rax
movq %r12, (%rax)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq