// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaTypeElab_elabzestackzetypezebasezx
static struct mirth_type_StackType mw_mirth_elab_zaTypeElab_elabzestackzetypezebasezx (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_sigzestackzevarzy(in_zaMirth_1, v7, &v8);
	struct mirth_type_StackType branch_StackType_10;
	struct mirth_mirth_zaMirth* branch_zaMirth_11;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_12;
	switch ((v9).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v13 = mtp_std_maybe_Maybe_1_Some(v9);
			struct mirth_mirth_zaMirth* v14;
			struct mirth_elab_zaTypeElab* v15;
			struct mirth_type_StackType v16 = mw_mirth_elab_zaTypeElab_elabzestackzetypezevarzx(v8, in_zaTypeElab_2, V_mirth_name_Name(v13), &v14, &v15);
			struct mirth_mirth_zaMirth* v17;
			struct std_list_List_1 v18;
			struct mirth_type_StackTypeBase v19 = mw_mirth_type_StackType_splitzeparts(v14, in_StackType_3, &v17, &v18);
			struct mirth_mirth_zaMirth* v20;
			bool v21 = mw_mirth_type_StackTypeBase_unitzy(v17, v19, &v20);
			struct mirth_mirth_zaMirth* branch_zaMirth_22;
			struct mirth_elab_zaTypeElab* branch_zaTypeElab_23;
			if (v21) {
				branch_zaTypeElab_23 = v15;
				branch_zaMirth_22 = v20;
			} else {
				uint64_t v24 = v15->mtoken;
				STR* v25;
				STRLIT(v25, "Duplicate stack base, context already provided a stack base.", 60);
				struct mirth_mirth_zaMirth* v26;
				mw_mirth_mirth_zaMirth_emitzeerrorzx(v20, v24, v25, &v26);
				branch_zaTypeElab_23 = v15;
				branch_zaMirth_22 = v26;
			}
			bool v27 = true;
			struct mirth_type_StackType v28 = v16;
			struct std_list_List_1 v29 = v18;
			bool v30 = v27;
			bool v31 = v27;
			while (v31) {
				struct mirth_type_StackType v32 = v28;
				struct std_list_List_1 v33 = v29;
				bool v34 = v30;
				struct mirth_type_StackType branch_StackType_35;
				struct std_list_List_1 branch_List_36;
				bool branch_Bool_37;
				switch ((v33).tag) {
					case std_list_List_1_Cons: {
						struct std_list_List_1 v38;
						VAL v39 = mtp_std_list_List_1_Cons(v33, &v38);
						struct mirth_type_StackType v40 = mw_mirth_type_StackTypePart_cons(v32, V_mirth_type_StackTypePart(v39));
						bool v41 = true;
						branch_Bool_37 = v41;
						branch_List_36 = v38;
						branch_StackType_35 = v40;
					} break;
					case std_list_List_1_Nil: {
						struct std_list_List_1 v42 = { .tag=std_list_List_1_Nil };
						bool v43 = false;
						branch_Bool_37 = v43;
						branch_List_36 = v42;
						branch_StackType_35 = v32;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				v31 = branch_Bool_37;
				v30 = branch_Bool_37;
				v29 = branch_List_36;
				v28 = branch_StackType_35;
			}
			decref(MK_std_list_List_1(v29));
			branch_zaTypeElab_12 = branch_zaTypeElab_23;
			branch_zaMirth_11 = branch_zaMirth_22;
			branch_StackType_10 = v28;
		} break;
		case std_maybe_Maybe_1_None: {
			branch_zaTypeElab_12 = in_zaTypeElab_2;
			branch_zaMirth_11 = v8;
			branch_StackType_10 = in_StackType_3;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaTypeElab_5 = branch_zaTypeElab_12;
	*out_zaMirth_4 = branch_zaMirth_11;
	return branch_StackType_10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movl %edx, -0x20(%rbp)
movq %rcx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0xafc30
movl %eax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x274(%rbp)
testl %eax, %eax
je 0xafa26
jmp 0xaf469
movl -0x274(%rbp), %eax
subl $0x1, %eax
jne 0xafa48
jmp 0xaf47a
movl -0x60(%rbp), %edi
movq -0x58(%rbp), %rsi
callq 0x174a0
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x88(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0xafc90
movl %eax, -0xa0(%rbp)
movq %rdx, -0x98(%rbp)
movq -0x88(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0xa8(%rbp), %rcx
leaq -0xb8(%rbp), %r8
callq 0xafdb0
movl %eax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq -0xa8(%rbp), %rdi
movl -0xc8(%rbp), %esi
movq -0xc0(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
callq 0xb0b50
andb $0x1, %al
movb %al, -0xd1(%rbp)
testb $0x1, -0xd1(%rbp)
je 0xaf53a
movq -0x90(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0xaf692
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xf0(%rbp)
cmpq $0x0, 0x12e6354(%rip)   # 0x13958a8
jne 0xaf56e
leaq 0x2a912b(%rip), %rdi    # 0x358688
movl $0x3c, %esi
callq 0xb6c0
movq %rax, 0x12e633a(%rip)   # 0x13958a8
jmp 0xaf570
movq 0x12e6331(%rip), %rax   # 0x13958a8
movq %rax, -0x108(%rbp)
leaq 0x2e1bd3(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xaf645
movq 0x12e62fc(%rip), %rax   # 0x13958a8
movq %rax, -0x118(%rbp)
leaq 0x2e1b9e(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x110(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x118(%rbp), %rax
cmpq $0x0, %rax
je 0xaf645
movq 0x12e62c5(%rip), %rax   # 0x13958a8
movq %rax, -0x128(%rbp)
leaq 0x2e1b67(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x120(%rbp)
movq -0x128(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0xaf645
movq 0x12e6294(%rip), %rax   # 0x13958a8
movq %rax, -0x138(%rbp)
leaq 0x2e1b36(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x130(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x138(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xaf647
movq 0x12e625a(%rip), %rax   # 0x13958a8
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq -0xf8(%rbp), %rdx
leaq -0x140(%rbp), %rcx
callq 0x98c50
movq -0x90(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0xe0(%rbp)
movb $0x1, -0x141(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x160(%rbp)
movb -0x141(%rbp), %al
andb $0x1, %al
movb %al, -0x169(%rbp)
movb -0x141(%rbp), %al
andb $0x1, %al
movb %al, -0x16a(%rbp)
testb $0x1, -0x16a(%rbp)
je 0xaf8e1
movups -0x158(%rbp), %xmm0
movaps %xmm0, -0x180(%rbp)
movups -0x168(%rbp), %xmm0
movaps %xmm0, -0x190(%rbp)
movb -0x169(%rbp), %al
andb $0x1, %al
movb %al, -0x191(%rbp)
movl -0x190(%rbp), %eax
movl %eax, -0x278(%rbp)
testl %eax, %eax
je 0xaf80d
jmp 0xaf73a
movl -0x278(%rbp), %eax
subl $0x1, %eax
jne 0xaf86f
jmp 0xaf74b
movl -0x190(%rbp), %edi
movq -0x188(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
callq 0x125e0
movq %rax, -0x1e0(%rbp)
movq %rdx, -0x1d8(%rbp)
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x73d70
movl %eax, -0x200(%rbp)
movq %rdx, -0x1f8(%rbp)
movl -0x180(%rbp), %edi
movq -0x178(%rbp), %rsi
movl -0x200(%rbp), %edx
movq -0x1f8(%rbp), %rcx
callq 0xb0cf0
movl %eax, -0x1f0(%rbp)
movq %rdx, -0x1e8(%rbp)
movb $0x1, -0x201(%rbp)
movb -0x201(%rbp), %al
andb $0x1, %al
movb %al, -0x1b9(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
jmp 0xaf888
leaq -0x218(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movb $0x0, -0x219(%rbp)
movb -0x219(%rbp), %al
andb $0x1, %al
movb %al, -0x1b9(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x1a0(%rbp)
jmp 0xaf888
leaq 0x2a460b(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movb -0x1b9(%rbp), %al
andb $0x1, %al
movb %al, -0x16a(%rbp)
movb -0x1b9(%rbp), %al
andb $0x1, %al
movb %al, -0x169(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0xaf6ed
jmp 0xaf8e3
movl -0x168(%rbp), %edi
movq -0x160(%rbp), %rsi
callq 0x12780
movq %rax, -0x230(%rbp)
movq %rdx, -0x228(%rbp)
movq -0x228(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xaf9f6
movl -0x168(%rbp), %edi
movq -0x160(%rbp), %rsi
callq 0x12780
movq %rax, -0x240(%rbp)
movq %rdx, -0x238(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x240(%rbp), %rax
cmpq $0x0, %rax
je 0xaf9f6
movl -0x168(%rbp), %edi
movq -0x160(%rbp), %rsi
callq 0x12780
movq %rax, -0x250(%rbp)
movq %rdx, -0x248(%rbp)
movq -0x250(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0xaf9f6
movl -0x168(%rbp), %edi
movq -0x160(%rbp), %rsi
callq 0x12780
movq %rax, -0x260(%rbp)
movq %rdx, -0x258(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x260(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0xaf9f4
movl -0x168(%rbp), %edi
movq -0x160(%rbp), %rsi
callq 0x12780
movq %rax, -0x270(%rbp)
movq %rdx, -0x268(%rbp)
movq -0x270(%rbp), %rdi
movq -0x268(%rbp), %rsi
callq 0x127c0
jmp 0xaf9f6
jmp 0xaf9f8
movq -0xe8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xafa61
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xafa61
leaq 0x2a4432(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
nopw (%rax,%rax)