// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaTypeElab_elabzeselfzx
static struct std_either_Either_2 mw_mirth_elab_zaTypeElab_elabzeselfzx (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, struct std_list_List_1 *out_List_6) {
	struct mirth_mirth_zaMirth* v7;
	struct std_maybe_Maybe_1 v8 = mw_mirth_mirth_zaMirth_definingzetyconzy(in_zaMirth_1, &v7);
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_9;
	struct std_either_Either_2 branch_Either_10;
	struct mirth_mirth_zaMirth* branch_zaMirth_11;
	struct std_list_List_1 branch_List_12;
	switch ((v8).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v13 = mtp_std_maybe_Maybe_1_Some(v8);
			incref(v13);
			struct mirth_mirth_zaMirth* v14;
			struct std_either_Either_2 v15 = mw_mirth_tycon_Tycon_fullzetype(v7, V_mirth_tycon_Tycon(v13), &v14);
			struct mirth_mirth_zaMirth* v16;
			struct std_list_List_1 v17 = mw_mirth_tycon_Tycon_params(v14, V_mirth_tycon_Tycon(v13), &v16);
			branch_List_12 = v17;
			branch_zaMirth_11 = v16;
			branch_Either_10 = v15;
			branch_zaTypeElab_9 = in_zaTypeElab_2;
		} break;
		case std_maybe_Maybe_1_None: {
			uint64_t v18 = in_zaTypeElab_2->mtoken;
			struct mirth_mirth_zaMirth* v19;
			struct std_maybe_Maybe_1 v20 = mw_mirth_token_Token_sigzeresourcezeconzy(v7, v18, &v19);
			int64_t v21 = (v20).tag;
			decref(MK_std_maybe_Maybe_1(v20));
			INT v22 = WRAP_I63(0LL);
			INT v23 = v22;
			INT v24 = i64_to_int(v21);
			bool v25 = int_eq(v24, v23);
			bool v26 = !v25;
			struct mirth_elab_zaTypeElab* branch_zaTypeElab_27;
			struct mirth_mirth_zaMirth* branch_zaMirth_28;
			struct std_either_Either_2 branch_Either_29;
			if (v26) {
				uint64_t v30 = in_zaTypeElab_2->mtoken;
				STR* v31;
				STRLIT(v31, "Not currently inside a type block, +Self is not bound.", 54);
				struct mirth_mirth_zaMirth* v32;
				mw_mirth_mirth_zaMirth_emitzeerrorzx(v19, v30, v31, &v32);
				struct mirth_type_Type v33 = mw_mirth_type_Resource_Error();
				struct std_either_Either_2 v34 = mtw_std_either_Either_2_Right(MK_mirth_type_Type(v33));
				branch_Either_29 = v34;
				branch_zaMirth_28 = v32;
				branch_zaTypeElab_27 = in_zaTypeElab_2;
			} else {
				uint64_t v35 = in_zaTypeElab_2->mtoken;
				STR* v36;
				STRLIT(v36, "Not currently inside a type block, Self is not bound.", 53);
				struct mirth_mirth_zaMirth* v37;
				mw_mirth_mirth_zaMirth_emitzeerrorzx(v19, v35, v36, &v37);
				struct mirth_type_Type v38 = { .tag=mirth_type_Type_Error };
				struct std_either_Either_2 v39 = mtw_std_either_Either_2_Left(MK_mirth_type_Type(v38));
				branch_Either_29 = v39;
				branch_zaMirth_28 = v37;
				branch_zaTypeElab_27 = in_zaTypeElab_2;
			}
			struct std_list_List_1 v40 = { .tag=std_list_List_1_Nil };
			branch_List_12 = v40;
			branch_zaMirth_11 = branch_zaMirth_28;
			branch_Either_10 = branch_Either_29;
			branch_zaTypeElab_9 = branch_zaTypeElab_27;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_List_6 = branch_List_12;
	*out_zaTypeElab_4 = branch_zaTypeElab_9;
	*out_zaMirth_3 = branch_zaMirth_11;
	return branch_Either_10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %rdx, -0x68(%rbp)
movq %rsi, -0x58(%rbp)
movq %rdi, %rbx
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
movq 0x48(%rdi), %r14
movq %r14, %rax
andq %rcx, %rax
setne %dl
testb $0x3, %r14b
sete %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x7b827
addl $0x2, (%rax)
movl 0x18(%r14), %r15d
movq 0x20(%r14), %r12
movq %r12, %rdx
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rdx
sete %sil
testb $0x3, %r12b
setne %dil
orb %sil, %dil
jne 0x7b852
incl (%rdx)
leaq 0x9a008(%rip), %r13     # 0x115861
testb %cl, %cl
je 0x7b86c
decl (%rax)
jne 0x7b86c
movq %r14, %rdi
movq %r13, %rsi
callq 0xd4e3
testl %r15d, %r15d
je 0x7b8bf
cmpl $0x1, %r15d
jne 0x7bc6a
movq %r12, %rdi
callq 0xdaeb
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %r13
movq %rbx, %rdi
movq %rax, %rsi
movq %rdx, %rbx
movq %r13, %rcx
callq 0x331d1
movl %eax, %r12d
movq %rdx, -0x50(%rbp)
movq (%r13), %rdi
leaq 0x99f23(%rip), %rsi     # 0x1157d1
callq 0x95f6
movq (%rbx), %rbx
leaq 0x99fa4(%rip), %r13     # 0x115861
jmp 0x7b8cc
xorl %edx, %edx
movl %r15d, %r12d
movq $0x0, -0x50(%rbp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x27dec
movq %rax, %r14
movq 0x48(%rbx), %rdi
movq %rdi, %rax
movabsq $0xfffffffffffc, %r15   # imm = 0xFFFFFFFFFFFC
andq %r15, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x7b908
decl (%rax)
jne 0x7b908
movq %r13, %rsi
callq 0xd4e3
movq %r14, 0x48(%rbx)
testl %r12d, %r12d
je 0x7b948
cmpl $0x1, %r12d
jne 0x7bc6a
movq -0x50(%rbp), %rdi
callq 0xdaeb
movq %rax, %rsi
shrq $0x30, %rsi
andq %r15, %rax
leaq -0x40(%rbp), %r14
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x7bc9a
movl %eax, %r12d
movq (%r14), %rbx
jmp 0x7b94a
xorl %edx, %edx
testl %r12d, %r12d
je 0x7ba18
cmpl $0x1, %r12d
jne 0x7bc6a
movq %rdx, %rdi
callq 0xdaeb
movq %rax, %r12
testb $0x1, %dl
je 0x7b983
movq %r12, %rax
andq %r15, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x7b983
incl (%rax)
movq %r15, %rax
movq %r12, %r15
shrq $0x30, %r15
andq %rax, %r12
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4af4b
movl %eax, %r13d
movq %rdx, %rbx
movq (%r14), %r14
cmpq $0x2, %r15
je 0x7bc09
cmpl $0x1, %r15d
je 0x7bbf5
testl %r15d, %r15d
jne 0x7bc6a
movq 0x8(%r12), %r15
decl (%r12)
jne 0x7b9de
movq %r12, %rdi
callq 0x5030
leaq 0x109d853(%rip), %rdi   # 0x1119238
movq %r15, %rsi
callq 0x13ff0
leaq -0x40(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a972
movq (%r15), %r14
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
shrq $0x30, %rax
jmp 0x7bc32
movq -0x58(%rbp), %r12
movq 0x10(%r12), %rsi
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x40c7e
movl %eax, %ebx
movq %rdx, %rax
andq %r15, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x7ba5e
decl (%rax)
jne 0x7ba5e
movq %rbx, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0x99868(%rip), %rsi     # 0x1152c1
callq 0xd4e3
leaq 0x1(,%rbx,2), %rdi
movl $0x1, %esi
callq 0xec04
movq 0x10(%r12), %rbx
testl %eax, %eax
je 0x7bb36
cmpq $0x0, 0x109e95b(%rip)   # 0x111a3e0
jne 0x7bacf
movl $0x36, %edi
callq 0xf9f7
movq $0x36, 0x10(%rax)
movabsq $0x2e646e756f622074, %rcx # imm = 0x2E646E756F622074
movq %rcx, 0x46(%rax)
movups 0x7088c(%rip), %xmm0    # 0xec33a
movups %xmm0, 0x18(%rax)
movups 0x70891(%rip), %xmm0    # 0xec34a
movups %xmm0, 0x28(%rax)
movups 0x70896(%rip), %xmm0    # 0xec35a
movups %xmm0, 0x38(%rax)
movq %rax, 0x109e911(%rip)   # 0x111a3e0
movq 0x109e90a(%rip), %r14   # 0x111a3e0
andq %r14, %r15
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x7baea
incl (%r15)
movq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %r15
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1b861
movq (%r15), %rdi
leaq -0x40(%rbp), %rbx
movq %rax, %rsi
movq %r14, %rdx
movl $0x2, %ecx
movq %rbx, %r8
callq 0x1bf3a
movq (%rbx), %r14
leaq 0x99fc8(%rip), %rsi     # 0x115ae9
xorl %edi, %edi
callq 0x20c67
movq %rdx, %rbx
movl $0x1, %r13d
jmp 0x7bbe7
cmpq $0x0, 0x109e8aa(%rip)   # 0x111a3e8
jne 0x7bb88
movl $0x35, %edi
callq 0xf9f7
movq $0x35, 0x10(%rax)
movabsq $0x2e646e756f622074, %rcx # imm = 0x2E646E756F622074
movq %rcx, 0x45(%rax)
movups 0x7080a(%rip), %xmm0    # 0xec371
movups %xmm0, 0x18(%rax)
movups 0x7080f(%rip), %xmm0    # 0xec381
movups %xmm0, 0x28(%rax)
movups 0x70814(%rip), %xmm0    # 0xec391
movups %xmm0, 0x38(%rax)
movq %rax, 0x109e860(%rip)   # 0x111a3e8
movq 0x109e859(%rip), %r14   # 0x111a3e8
andq %r14, %r15
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x7bba3
incl (%r15)
movq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %r15
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1b861
movq (%r15), %rdi
leaq -0x40(%rbp), %rbx
movq %rax, %rsi
movq %r14, %rdx
movl $0x2, %ecx
movq %rbx, %r8
callq 0x1bf3a
movq (%rbx), %r14
leaq 0x99f0f(%rip), %rsi     # 0x115ae9
xorl %r13d, %r13d
xorl %edi, %edi
callq 0x20c09
movq %rdx, %rbx
xorl %eax, %eax
xorl %edx, %edx
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rsi
jmp 0x7bc3e
decl (%r12)
jne 0x7bc03
movq %r12, %rdi
callq 0x5030
xorl %eax, %eax
xorl %edx, %edx
jmp 0x7bc32
movl 0x4(%r12), %r15d
decl (%r12)
jne 0x7bc1c
movq %r12, %rdi
callq 0x5030
leaq -0x40(%rbp), %r12
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x4b6e6
movq (%r12), %r14
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x58(%rbp), %r12
movl %eax, (%rsi)
movl $0x0, 0x4(%rsi)
movq %rdx, 0x8(%rsi)
movq %r12, (%rcx)
movq -0x68(%rbp), %rax
movq %r14, (%rax)
movl %r13d, %eax
movq %rbx, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x68aca(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x68acf(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5