// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaTypeElab_elabzestackzetypezepartzx
static struct mirth_type_StackTypePart mw_mirth_elab_zaTypeElab_elabzestackzetypezepartzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_elab_zaTypeElab* in_zaTypeElab_2, struct mirth_mirth_zaMirth* *out_zaMirth_3, struct mirth_elab_zaTypeElab* *out_zaTypeElab_4) {
	uint64_t v6 = in_zaTypeElab_2->mtoken;
	struct mirth_mirth_zaMirth* v7;
	struct std_maybe_Maybe_1 v8 = mw_mirth_token_Token_sigzelabelzy(in_zaMirth_1, v6, &v7);
	struct mirth_mirth_zaMirth* branch_zaMirth_9;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_10;
	struct mirth_type_StackTypePart branch_StackTypePart_11;
	switch ((v8).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v12 = mtp_std_maybe_Maybe_1_Some(v8);
			struct mirth_mirth_zaMirth* v13;
			struct mirth_elab_zaTypeElab* v14;
			struct mirth_type_StackTypePart v15 = mw_mirth_elab_zaTypeElab_elabzestackzelabelzx(v7, in_zaTypeElab_2, V_mirth_label_Label(v12), &v13, &v14);
			branch_StackTypePart_11 = v15;
			branch_zaTypeElab_10 = v14;
			branch_zaMirth_9 = v13;
		} break;
		case std_maybe_Maybe_1_None: {
			uint64_t v16 = in_zaTypeElab_2->mtoken;
			struct mirth_mirth_zaMirth* v17;
			struct std_maybe_Maybe_1 v18 = mw_mirth_token_Token_sigzetypezevarzy(v7, v16, &v17);
			struct mirth_mirth_zaMirth* branch_zaMirth_19;
			struct mirth_elab_zaTypeElab* branch_zaTypeElab_20;
			struct mirth_type_StackTypePart branch_StackTypePart_21;
			switch ((v18).tag) {
				case std_maybe_Maybe_1_Some: {
					VAL v22 = mtp_std_maybe_Maybe_1_Some(v18);
					struct mirth_mirth_zaMirth* v23;
					struct mirth_elab_zaTypeElab* v24;
					struct mirth_type_Type v25 = mw_mirth_elab_zaTypeElab_elabzetypezevarzx(v17, in_zaTypeElab_2, V_mirth_name_Name(v22), &v23, &v24);
					struct mirth_type_StackTypePart v26 = mtw_mirth_type_StackTypePart_Cons(v25);
					branch_StackTypePart_21 = v26;
					branch_zaTypeElab_20 = v24;
					branch_zaMirth_19 = v23;
				} break;
				case std_maybe_Maybe_1_None: {
					uint64_t v27 = in_zaTypeElab_2->mtoken;
					struct mirth_mirth_zaMirth* v28;
					struct std_maybe_Maybe_1 v29 = mw_mirth_token_Token_sigzetypezeconzy(v17, v27, &v28);
					struct mirth_mirth_zaMirth* branch_zaMirth_30;
					struct mirth_elab_zaTypeElab* branch_zaTypeElab_31;
					struct mirth_type_StackTypePart branch_StackTypePart_32;
					switch ((v29).tag) {
						case std_maybe_Maybe_1_Some: {
							VAL v33 = mtp_std_maybe_Maybe_1_Some(v29);
							struct mirth_mirth_zaMirth* v34;
							struct mirth_elab_zaTypeElab* v35;
							struct mirth_type_Type v36 = mw_mirth_elab_zaTypeElab_elabzetypezeconzx(v28, in_zaTypeElab_2, V_std_either_Either_2(v33), &v34, &v35);
							struct mirth_type_StackTypePart v37 = mtw_mirth_type_StackTypePart_Cons(v36);
							branch_StackTypePart_32 = v37;
							branch_zaTypeElab_31 = v35;
							branch_zaMirth_30 = v34;
						} break;
						case std_maybe_Maybe_1_None: {
							uint64_t v38 = in_zaTypeElab_2->mtoken;
							struct mirth_mirth_zaMirth* v39;
							struct std_maybe_Maybe_1 v40 = mw_mirth_token_Token_sigzeresourcezevarzy(v28, v38, &v39);
							struct mirth_mirth_zaMirth* branch_zaMirth_41;
							struct mirth_elab_zaTypeElab* branch_zaTypeElab_42;
							struct mirth_type_StackTypePart branch_StackTypePart_43;
							switch ((v40).tag) {
								case std_maybe_Maybe_1_Some: {
									VAL v44 = mtp_std_maybe_Maybe_1_Some(v40);
									struct mirth_mirth_zaMirth* v45;
									struct mirth_elab_zaTypeElab* v46;
									struct mirth_type_Type v47 = mw_mirth_elab_zaTypeElab_elabzeresourcezevarzx(v39, in_zaTypeElab_2, V_mirth_name_Name(v44), &v45, &v46);
									struct mirth_type_StackTypePart v48 = mtw_mirth_type_StackTypePart_With(v47);
									branch_StackTypePart_43 = v48;
									branch_zaTypeElab_42 = v46;
									branch_zaMirth_41 = v45;
								} break;
								case std_maybe_Maybe_1_None: {
									uint64_t v49 = in_zaTypeElab_2->mtoken;
									struct mirth_mirth_zaMirth* v50;
									struct std_maybe_Maybe_1 v51 = mw_mirth_token_Token_sigzeresourcezeconzy(v39, v49, &v50);
									struct mirth_mirth_zaMirth* branch_zaMirth_52;
									struct mirth_elab_zaTypeElab* branch_zaTypeElab_53;
									struct mirth_type_StackTypePart branch_StackTypePart_54;
									switch ((v51).tag) {
										case std_maybe_Maybe_1_Some: {
											VAL v55 = mtp_std_maybe_Maybe_1_Some(v51);
											struct mirth_mirth_zaMirth* v56;
											struct mirth_elab_zaTypeElab* v57;
											struct mirth_type_Type v58 = mw_mirth_elab_zaTypeElab_elabzeresourcezeconzx(v50, in_zaTypeElab_2, V_std_either_Either_2(v55), &v56, &v57);
											struct mirth_type_StackTypePart v59 = mtw_mirth_type_StackTypePart_With(v58);
											branch_StackTypePart_54 = v59;
											branch_zaTypeElab_53 = v57;
											branch_zaMirth_52 = v56;
										} break;
										case std_maybe_Maybe_1_None: {
											uint64_t v60 = in_zaTypeElab_2->mtoken;
											struct mirth_mirth_zaMirth* v61;
											bool v62 = mw_mirth_token_Token_patzeunderscorezy(v50, v60, &v61);
											struct mirth_mirth_zaMirth* branch_zaMirth_63;
											struct mirth_elab_zaTypeElab* branch_zaTypeElab_64;
											struct mirth_type_StackTypePart branch_StackTypePart_65;
											if (v62) {
												struct mirth_mirth_zaMirth* v66;
												struct mirth_elab_zaTypeElab* v67;
												struct mirth_type_Type v68 = mw_mirth_elab_zaTypeElab_elabzetypezedontzecarezx(v61, in_zaTypeElab_2, &v66, &v67);
												struct mirth_type_StackTypePart v69 = mtw_mirth_type_StackTypePart_Cons(v68);
												branch_StackTypePart_65 = v69;
												branch_zaTypeElab_64 = v67;
												branch_zaMirth_63 = v66;
											} else {
												uint64_t v70 = in_zaTypeElab_2->mtoken;
												struct mirth_mirth_zaMirth* v71;
												struct std_maybe_Maybe_1 v72 = mw_mirth_token_Token_sigzetypezeholezy(v61, v70, &v71);
												struct mirth_mirth_zaMirth* branch_zaMirth_73;
												struct mirth_elab_zaTypeElab* branch_zaTypeElab_74;
												struct mirth_type_StackTypePart branch_StackTypePart_75;
												switch ((v72).tag) {
													case std_maybe_Maybe_1_Some: {
														VAL v76 = mtp_std_maybe_Maybe_1_Some(v72);
														struct mirth_mirth_zaMirth* v77;
														struct mirth_elab_zaTypeElab* v78;
														struct mirth_type_Type v79 = mw_mirth_elab_zaTypeElab_elabzetypezeholezx(v71, in_zaTypeElab_2, V_mirth_name_Name(v76), &v77, &v78);
														struct mirth_type_StackTypePart v80 = mtw_mirth_type_StackTypePart_Cons(v79);
														branch_StackTypePart_75 = v80;
														branch_zaTypeElab_74 = v78;
														branch_zaMirth_73 = v77;
													} break;
													case std_maybe_Maybe_1_None: {
														uint64_t v81 = in_zaTypeElab_2->mtoken;
														struct mirth_mirth_zaMirth* v82;
														struct std_maybe_Maybe_1 v83 = mw_mirth_token_Token_lsquarezy(v71, v81, &v82);
														int64_t v84 = (v83).tag;
														decref(MK_std_maybe_Maybe_1(v83));
														INT v85 = WRAP_I63(0LL);
														INT v86 = v85;
														INT v87 = i64_to_int(v84);
														bool v88 = int_eq(v87, v86);
														bool v89 = !v88;
														struct mirth_mirth_zaMirth* branch_zaMirth_90;
														struct mirth_elab_zaTypeElab* branch_zaTypeElab_91;
														struct mirth_type_StackTypePart branch_StackTypePart_92;
														if (v89) {
															struct mirth_mirth_zaMirth* v93;
															struct mirth_elab_zaTypeElab* v94;
															struct mirth_type_Type v95 = mw_mirth_elab_zaTypeElab_elabzetypezequotezx(v82, in_zaTypeElab_2, &v93, &v94);
															struct mirth_type_StackTypePart v96 = mtw_mirth_type_StackTypePart_Cons(v95);
															branch_StackTypePart_92 = v96;
															branch_zaTypeElab_91 = v94;
															branch_zaMirth_90 = v93;
														} else {
															uint64_t v97 = in_zaTypeElab_2->mtoken;
															STR* v98;
															STRLIT(v98, "Expected type, got unknown token.", 33);
															struct mirth_mirth_zaMirth* v99;
															mw_mirth_mirth_zaMirth_emitzeerrorzx(v82, v97, v98, &v99);
															uint64_t v100 = in_zaTypeElab_2->mtoken;
															struct mirth_mirth_zaMirth* v101;
															uint64_t v102 = mw_mirth_token_Token_next(v99, v100, &v101);
															in_zaTypeElab_2->mtoken = v102;
															struct mirth_type_Type v103 = { .tag=mirth_type_Type_Error };
															struct mirth_type_StackTypePart v104 = mtw_mirth_type_StackTypePart_Cons(v103);
															branch_StackTypePart_92 = v104;
															branch_zaTypeElab_91 = in_zaTypeElab_2;
															branch_zaMirth_90 = v101;
														}
														branch_StackTypePart_75 = branch_StackTypePart_92;
														branch_zaTypeElab_74 = branch_zaTypeElab_91;
														branch_zaMirth_73 = branch_zaMirth_90;
													} break;
													default: {
														do_panic(str_make("unexpected fallthrough in match\n", 32));
													}
												}
												branch_StackTypePart_65 = branch_StackTypePart_75;
												branch_zaTypeElab_64 = branch_zaTypeElab_74;
												branch_zaMirth_63 = branch_zaMirth_73;
											}
											branch_StackTypePart_54 = branch_StackTypePart_65;
											branch_zaTypeElab_53 = branch_zaTypeElab_64;
											branch_zaMirth_52 = branch_zaMirth_63;
										} break;
										default: {
											do_panic(str_make("unexpected fallthrough in match\n", 32));
										}
									}
									branch_StackTypePart_43 = branch_StackTypePart_54;
									branch_zaTypeElab_42 = branch_zaTypeElab_53;
									branch_zaMirth_41 = branch_zaMirth_52;
								} break;
								default: {
									do_panic(str_make("unexpected fallthrough in match\n", 32));
								}
							}
							branch_StackTypePart_32 = branch_StackTypePart_43;
							branch_zaTypeElab_31 = branch_zaTypeElab_42;
							branch_zaMirth_30 = branch_zaMirth_41;
						} break;
						default: {
							do_panic(str_make("unexpected fallthrough in match\n", 32));
						}
					}
					branch_StackTypePart_21 = branch_StackTypePart_32;
					branch_zaTypeElab_20 = branch_zaTypeElab_31;
					branch_zaMirth_19 = branch_zaMirth_30;
				} break;
				default: {
					do_panic(str_make("unexpected fallthrough in match\n", 32));
				}
			}
			branch_StackTypePart_11 = branch_StackTypePart_21;
			branch_zaTypeElab_10 = branch_zaTypeElab_20;
			branch_zaMirth_9 = branch_zaMirth_19;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaTypeElab_4 = branch_zaTypeElab_10;
	*out_zaMirth_3 = branch_zaMirth_9;
	return branch_StackTypePart_11;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq 0x10(%rsi), %rsi
leaq -0x78(%rbp), %rdx
callq 0x3fa35
cmpl $0x1, %eax
jne 0x3f6a2
movq %r12, -0x60(%rbp)
movq %r13, -0x80(%rbp)
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %r13
movq -0x78(%rbp), %rdi
movq 0x10(%r15), %rsi
leaq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x28928
movq %rax, %r12
movq 0x10(%r15), %rsi
movq (%rbx), %rdi
leaq -0x30(%rbp), %rbx
movq %rbx, %rdx
callq 0x335a4
movq %rax, 0x10(%r15)
movq (%rbx), %rdi
leaq -0x40(%rbp), %rdx
movq %r13, %rsi
callq 0x414a5
testb %al, %al
je 0x3f713
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x41500
movl %eax, %edi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x3f3e2
movq (%r14), %r15
movq (%rbx), %rbx
movl $0x3, %eax
jmp 0x3f745
movq 0x10(%r15), %rsi
movq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x3fbcd
cmpl $0x1, %eax
jne 0x3f753
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %rbx
movq -0x40(%rbp), %r14
movl $0x1, %edi
callq 0x1ef8a
movq %rdx, %rcx
leaq -0x38(%rbp), %r8
leaq -0x30(%rbp), %r9
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r8, %rbx
movq %r9, %r14
callq 0x36854
movl %eax, %edi
movq %rdx, %rsi
callq 0x41cd5
movq (%r14), %r15
movq (%rbx), %rbx
movl %eax, %edi
movq %rdx, %rsi
callq 0x206d0
jmp 0x3f7af
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x41838
movl %eax, %edi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x3f371
movq (%r14), %r15
movq (%rbx), %rbx
movl $0x1, %eax
movq %r12, 0x10(%r15)
movq -0x80(%rbp), %r13
movq -0x60(%rbp), %r12
jmp 0x3f7b1
movq 0x10(%r15), %rsi
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x3fc25
cmpl $0x1, %eax
jne 0x3f7c8
movq %rdx, %rdi
callq 0xdaeb
movq -0x58(%rbp), %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
movq %rax, %rdx
shrq $0x30, %rdx
leaq -0x38(%rbp), %rbx
leaq -0x30(%rbp), %r14
movq %r15, %rsi
movq %rbx, %r8
movq %r14, %r9
callq 0x3fd43
movl %eax, %edi
movq %rdx, %rsi
callq 0x206d0
movq (%r14), %r15
movq (%rbx), %rbx
xorl %eax, %eax
movq %r15, (%r12)
movq %rbx, (%r13)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rsi
movq -0x58(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x40b9d
cmpl $0x1, %eax
jne 0x3f822
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %rbx
movq -0x50(%rbp), %r14
movl $0x3, %edi
callq 0x1ef8a
movq %rdx, %rcx
leaq -0x38(%rbp), %r8
leaq -0x30(%rbp), %r9
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r8, %rbx
movq %r9, %r14
callq 0x36854
movl %eax, %edi
movq %rdx, %rsi
callq 0x41cd5
jmp 0x3f86e
movq 0x10(%r15), %rsi
movq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x40c7e
cmpl $0x1, %eax
jne 0x3f888
movq %rdx, %rdi
callq 0xdaeb
movq -0x70(%rbp), %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
movq %rax, %rdx
shrq $0x30, %rdx
leaq -0x38(%rbp), %rbx
leaq -0x30(%rbp), %r14
movq %r15, %rsi
movq %rbx, %r8
movq %r14, %r9
callq 0x3fd43
movq (%r14), %r15
movq (%rbx), %rbx
movl %eax, %edi
movq %rdx, %rsi
callq 0x3f310
movl $0x2, %eax
jmp 0x3f7b1
movq 0x10(%r15), %rsi
movq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x40d6f
testb %al, %al
je 0x3f8c0
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rbx
leaq -0x48(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x40e35
movl %eax, %edi
xorl %esi, %esi
jmp 0x3f7a4
movq 0x10(%r15), %rsi
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x40f40
cmpl $0x1, %eax
jne 0x3f900
movq %rdx, %rdi
callq 0xdaeb
movq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rbx
leaq -0x68(%rbp), %r14
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x410a1
jmp 0x3f79f
movq %r12, -0x60(%rbp)
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq 0x10(%r15), %rsi
movq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x34ebd
movl %eax, %r12d
movq %rdx, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x3f951
decl (%rax)
jne 0x3f951
movq %r12, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xd5975(%rip), %rsi     # 0x1152c1
callq 0xd4e3
movq %r12, %rdi
callq 0xe3f7
movl $0x1, %esi
movq %rax, %rdi
callq 0xec04
testl %eax, %eax
je 0x3f999
movq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rbx
leaq -0x88(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x411bc
movl %eax, %edi
movq %rdx, %rsi
callq 0x206d0
movq (%r14), %r15
jmp 0x3fa29
movq 0x10(%r15), %r12
cmpq $0x0, 0x10d9f83(%rip)   # 0x1119928
jne 0x3f9da
movl $0x21, %edi
callq 0xf9f7
movq $0x21, 0x10(%rax)
movups 0xa9ae1(%rip), %xmm0    # 0xe94a1
movups %xmm0, 0x18(%rax)
movups 0xa9ae6(%rip), %xmm0    # 0xe94b1
movups %xmm0, 0x28(%rax)
movb $0x2e, 0x38(%rax)
movq %rax, 0x10d9f4e(%rip)   # 0x1119928
movq 0x10d9f47(%rip), %rdx   # 0x1119928
andq %rdx, %rbx
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x3f9f3
incl (%rbx)
movq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rbx
movq %r12, %rsi
movq %rbx, %rcx
callq 0x305a5
movq 0x10(%r15), %rsi
movq (%rbx), %rdi
leaq -0x88(%rbp), %rbx
movq %rbx, %rdx
callq 0x28928
movq %rax, 0x10(%r15)
xorl %edi, %edi
xorl %esi, %esi
callq 0x206d0
movq (%rbx), %rbx
movq -0x60(%rbp), %r12
jmp 0x3f7af