// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaTypeElab_elabzeselfzeresourcezx
static struct mirth_type_Type mw_mirth_elab_zaTypeElab_elabzeselfzeresourcezx (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 mirth_elab_zaTypeElab* v8;
	struct std_list_List_1 v9;
	struct std_either_Either_2 v10 = mw_mirth_elab_zaTypeElab_elabzeselfzx(in_zaMirth_1, in_zaTypeElab_2, &v7, &v8, &v9);
	struct mirth_type_Type branch_Resource_11;
	struct mirth_mirth_zaMirth* branch_zaMirth_12;
	struct mirth_elab_zaTypeElab* branch_zaTypeElab_13;
	switch ((v10).tag) {
		case std_either_Either_2_Left: {
			VAL v14 = mtp_std_either_Either_2_Left(v10);
			uint64_t v15 = v8->mtoken;
			STR* v16;
			STRLIT(v16, "Enclosing type block is a value type, must use Self instead of +Self.", 69);
			struct mirth_mirth_zaMirth* v17;
			mw_mirth_mirth_zaMirth_emitzeerrorzx(v7, v15, v16, &v17);
			decref(v14);
			struct mirth_type_Type v18 = mw_mirth_type_Resource_Error();
			branch_zaTypeElab_13 = v8;
			branch_zaMirth_12 = v17;
			branch_Resource_11 = v18;
		} break;
		case std_either_Either_2_Right: {
			VAL v19 = mtp_std_either_Either_2_Right(v10);
			branch_zaTypeElab_13 = v8;
			branch_zaMirth_12 = v7;
			branch_Resource_11 = V_mirth_type_Type(v19);
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_List_6 = v9;
	*out_zaTypeElab_4 = branch_zaTypeElab_13;
	*out_zaMirth_3 = branch_zaMirth_12;
	return branch_Resource_11;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0x58(%rbp), %r8
callq 0x1b54e0
movl %eax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x114(%rbp)
testl %eax, %eax
je 0x1b68b2
jmp 0x1b689e
movl -0x114(%rbp), %eax
subl $0x1, %eax
je 0x1b6aa3
jmp 0x1b6b05
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x74840
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, 0x11dfc50(%rip)   # 0x1396530
jne 0x1b68fa
leaq 0x1a5480(%rip), %rdi    # 0x35bd69
movl $0x45, %esi
callq 0xb6c0
movq %rax, 0x11dfc36(%rip)   # 0x1396530
jmp 0x1b68fc
movq 0x11dfc2d(%rip), %rax   # 0x1396530
movq %rax, -0xa8(%rbp)
leaq 0x1da847(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b69d1
movq 0x11dfbf8(%rip), %rax   # 0x1396530
movq %rax, -0xb8(%rbp)
leaq 0x1da812(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xb0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xb8(%rbp), %rax
cmpq $0x0, %rax
je 0x1b69d1
movq 0x11dfbc1(%rip), %rax   # 0x1396530
movq %rax, -0xc8(%rbp)
leaq 0x1da7db(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b69d1
movq 0x11dfb90(%rip), %rax   # 0x1396530
movq %rax, -0xd8(%rbp)
leaq 0x1da7aa(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xd0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xd8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b69d3
movq 0x11dfb56(%rip), %rax   # 0x1396530
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
callq 0x98c50
movq -0x80(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b6a64
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x1b6a64
movq -0x88(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b6a64
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b6a62
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x127c0
jmp 0x1b6a64
jmp 0x1b6a66
callq 0x1b5ee0
movl %eax, -0xf0(%rbp)
movq %rdx, -0xe8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b6b1e
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x748f0
movq %rax, -0x100(%rbp)
movq %rdx, -0xf8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x6f100
movl %eax, -0x110(%rbp)
movq %rdx, -0x108(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b6b1e
leaq 0x19d375(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x38(%rbp), %rax
movups -0x58(%rbp), %xmm0
movups %xmm0, (%rax)
movq -0x78(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop