// File: /workspace/github_c_makefile_star2_O3/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 0x3e6ec
cmpl $0x1, %eax
jne 0x3e35b
movq %r12, -0x60(%rbp)
movq %r13, -0x80(%rbp)
movq %rdx, %rdi
callq 0xd745
movq %rax, %r13
movq -0x78(%rbp), %rdi
movq 0x10(%r15), %rsi
leaq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x28324
movq %rax, %r12
movq 0x10(%r15), %rsi
movq (%rbx), %rdi
leaq -0x30(%rbp), %rbx
movq %rbx, %rdx
callq 0x32512
movq %rax, 0x10(%r15)
movq (%rbx), %rdi
leaq -0x40(%rbp), %rdx
movq %r13, %rsi
callq 0x40106
testb %al, %al
je 0x3e3cc
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x40161
movl %eax, %edi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x3e09b
movq (%r14), %r15
movq (%rbx), %rbx
movl $0x3, %eax
jmp 0x3e3fe
movq 0x10(%r15), %rsi
movq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x3e86a
cmpl $0x1, %eax
jne 0x3e40c
movq %rdx, %rdi
callq 0xd745
movq %rax, %rbx
movq -0x40(%rbp), %r14
movl $0x1, %edi
callq 0x1eb4d
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 0x356a5
movl %eax, %edi
movq %rdx, %rsi
callq 0x40931
movq (%r14), %r15
movq (%rbx), %rbx
movl %eax, %edi
movq %rdx, %rsi
callq 0x201a2
jmp 0x3e468
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x40496
movl %eax, %edi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x3e02a
movq (%r14), %r15
movq (%rbx), %rbx
movl $0x1, %eax
movq %r12, 0x10(%r15)
movq -0x80(%rbp), %r13
movq -0x60(%rbp), %r12
jmp 0x3e46a
movq 0x10(%r15), %rsi
movq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x3e8c2
cmpl $0x1, %eax
jne 0x3e481
movq %rdx, %rdi
callq 0xd745
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 0x3e9db
movl %eax, %edi
movq %rdx, %rsi
callq 0x201a2
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 0x3f7e4
cmpl $0x1, %eax
jne 0x3e4db
movq %rdx, %rdi
callq 0xd745
movq %rax, %rbx
movq -0x50(%rbp), %r14
movl $0x3, %edi
callq 0x1eb4d
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 0x356a5
movl %eax, %edi
movq %rdx, %rsi
callq 0x40931
jmp 0x3e527
movq 0x10(%r15), %rsi
movq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x3f8cb
cmpl $0x1, %eax
jne 0x3e541
movq %rdx, %rdi
callq 0xd745
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 0x3e9db
movq (%r14), %r15
movq (%rbx), %rbx
movl %eax, %edi
movq %rdx, %rsi
callq 0x3dfc9
movl $0x2, %eax
jmp 0x3e46a
movq 0x10(%r15), %rsi
movq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x3f9ba
testb %al, %al
je 0x3e579
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rbx
leaq -0x48(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x3fa84
movl %eax, %edi
xorl %esi, %esi
jmp 0x3e45d
movq 0x10(%r15), %rsi
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x3fb8d
cmpl $0x1, %eax
jne 0x3e5b9
movq %rdx, %rdi
callq 0xd745
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 0x3fcee
jmp 0x3e458
movq %r12, -0x60(%rbp)
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
movq 0x10(%r15), %rsi
movq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x33d79
movl %eax, %r12d
movq %rdx, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x3e60a
decl (%rax)
jne 0x3e60a
movq %r12, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xd2cbc(%rip), %rsi     # 0x1112c1
callq 0xd13d
movq %r12, %rdi
callq 0xe024
movl $0x1, %esi
movq %rax, %rdi
callq 0xe83a
testl %eax, %eax
je 0x3e652
movq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rbx
leaq -0x88(%rbp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x3fe07
movl %eax, %edi
movq %rdx, %rsi
callq 0x201a2
movq (%r14), %r15
jmp 0x3e6e0
movq 0x10(%r15), %r12
movq 0x10d72cb(%rip), %rdx   # 0x1115928
testq %rdx, %rdx
jne 0x3e698
movl $0x21, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x21, 0x10(%rax)
movups 0xa6cf2(%rip), %xmm0    # 0xe5370
movups %xmm0, 0x18(%rax)
movups 0xa6cf7(%rip), %xmm0    # 0xe5380
movups %xmm0, 0x28(%rax)
movb $0x2e, 0x38(%rax)
movq %rax, 0x10d7290(%rip)   # 0x1115928
andq %rdx, %rbx
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x3e6aa
incl (%rbx)
movq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rbx
movq %r12, %rsi
movq %rbx, %rcx
callq 0x2f6a8
movq 0x10(%r15), %rsi
movq (%rbx), %rdi
leaq -0x88(%rbp), %rbx
movq %rbx, %rdx
callq 0x28324
movq %rax, 0x10(%r15)
xorl %edi, %edi
xorl %esi, %esi
callq 0x201a2
movq (%rbx), %rbx
movq -0x60(%rbp), %r12
jmp 0x3e468