// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_def_Def_typecheckzx
static void mw_mirth_def_Def_typecheckzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_def_Def in_Def_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* branch_zaMirth_4;
	switch ((in_Def_2).tag) {
		case mirth_def_Def_Package: {
			uint64_t v5 = mtp_mirth_def_Def_Package(in_Def_2);
			branch_zaMirth_4 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Module: {
			uint64_t v6 = mtp_mirth_def_Def_Module(in_Def_2);
			branch_zaMirth_4 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Alias: {
			uint64_t v7 = mtp_mirth_def_Def_Alias(in_Def_2);
			struct mirth_mirth_zaMirth* v8;
			struct mirth_def_Def v9 = mw_mirth_alias_Alias_target(in_zaMirth_1, v7, &v8);
			struct mirth_mirth_zaMirth* v10;
			mw_mirth_def_Def_typecheckzx(v8, v9, &v10);
			branch_zaMirth_4 = v10;
		} break;
		case mirth_def_Def_Data: {
			uint64_t v11 = mtp_mirth_def_Def_Data(in_Def_2);
			branch_zaMirth_4 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Table: {
			uint64_t v12 = mtp_mirth_def_Def_Table(in_Def_2);
			struct mirth_mirth_zaMirth* v13;
			struct mirth_table_StateOwner v14 = mw_mirth_table_Table_owner(in_zaMirth_1, v12, &v13);
			decref(MK_mirth_table_StateOwner(v14));
			branch_zaMirth_4 = v13;
		} break;
		case mirth_def_Def_Type: {
			uint64_t v15 = mtp_mirth_def_Def_Type(in_Def_2);
			struct mirth_mirth_zaMirth* v16;
			struct mirth_type_Type v17 = mw_mirth_typedef_TypeDef_target(in_zaMirth_1, v15, &v16);
			decref(MK_mirth_type_Type(v17));
			branch_zaMirth_4 = v16;
		} break;
		case mirth_def_Def_Tag: {
			uint64_t v18 = mtp_mirth_def_Def_Tag(in_Def_2);
			struct mirth_mirth_zaMirth* v19;
			struct mirth_type_ArrowType* v20 = mw_mirth_data_Tag_type(in_zaMirth_1, v18, &v19);
			decref(MK_mirth_type_ArrowType(v20));
			branch_zaMirth_4 = v19;
		} break;
		case mirth_def_Def_Prim: {
			enum mirth_prim_Prim v21 = mtp_mirth_def_Def_Prim(in_Def_2);
			branch_zaMirth_4 = in_zaMirth_1;
		} break;
		case mirth_def_Def_Word: {
			uint64_t v22 = mtp_mirth_def_Def_Word(in_Def_2);
			struct mirth_mirth_zaMirth* v23;
			struct mirth_type_ArrowType* v24 = mw_mirth_word_Word_type(in_zaMirth_1, v22, &v23);
			decref(MK_mirth_type_ArrowType(v24));
			struct mirth_mirth_zaMirth* v25;
			struct mirth_arrow_Arrow* v26 = mw_mirth_word_Word_arrow(v23, v22, &v25);
			decref(MK_mirth_arrow_Arrow(v26));
			branch_zaMirth_4 = v25;
		} break;
		case mirth_def_Def_Buffer: {
			uint64_t v27 = mtp_mirth_def_Def_Buffer(in_Def_2);
			branch_zaMirth_4 = in_zaMirth_1;
		} break;
		case mirth_def_Def_External: {
			uint64_t v28 = mtp_mirth_def_Def_External(in_Def_2);
			struct mirth_mirth_zaMirth* v29;
			struct mirth_type_ArrowType* v30 = mw_mirth_external_External_type(in_zaMirth_1, v28, &v29);
			decref(MK_mirth_type_ArrowType(v30));
			branch_zaMirth_4 = v29;
		} break;
		case mirth_def_Def_Field: {
			uint64_t v31 = mtp_mirth_def_Def_Field(in_Def_2);
			struct mirth_mirth_zaMirth* v32;
			struct mirth_type_ArrowType* v33 = mw_mirth_table_Field_type(in_zaMirth_1, v31, &v32);
			decref(MK_mirth_type_ArrowType(v33));
			branch_zaMirth_4 = v32;
		} break;
		case mirth_def_Def_Macro: {
			uint64_t v34 = mtp_mirth_def_Def_Macro(in_Def_2);
			branch_zaMirth_4 = in_zaMirth_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0xc, %esi
ja 0x8baae
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0x57d3b(%rip), %rcx     # 0xe3578
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl (%rdx)
jne 0x8ba9e
movq %rdx, %rdi
callq 0x5030
jmp 0x8ba9e
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8b86b
movq %rdx, %rdi
callq 0x5030
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x59204
jmp 0x8b8bc
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8b88c
movq %rdx, %rdi
callq 0x5030
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x592bb
jmp 0x8b8bc
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8b8ad
movq %rdx, %rdi
callq 0x5030
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x5117e
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x8b8ea
decl (%rcx)
jne 0x8b8ea
leaq 0x8a297(%rip), %rsi     # 0x115b79
movq %rax, %rdi
callq 0xd4e3
movq -0x28(%rbp), %r14
jmp 0x8ba9e
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8b903
movq %rdx, %rdi
callq 0x5030
leaq 0x108e706(%rip), %rdi   # 0x111a010
movq %r15, %rsi
callq 0x13ff0
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a972
movq (%r15), %r14
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
je 0x8ba9e
decl (%rcx)
jne 0x8ba9e
andq $-0x4, %rax
leaq 0x8b15c(%rip), %rsi     # 0x116aa9
jmp 0x8ba96
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8b962
movq %rdx, %rdi
callq 0x5030
leaq 0x108daaf(%rip), %rdi   # 0x1119418
movq %r15, %rsi
callq 0x13ff0
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a972
movq (%r15), %rdi
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rdx
movq %rax, %rsi
shrq $0x30, %rsi
leaq -0x28(%rbp), %r14
movq %r14, %rcx
callq 0x8b816
movq (%r14), %r14
jmp 0x8ba9e
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8b9be
movq %rdx, %rdi
callq 0x5030
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
leaq -0x30(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x43709
movq %rax, %rcx
andq %r12, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x8b9fe
decl (%rcx)
jne 0x8b9fe
leaq 0x8a183(%rip), %rsi     # 0x115b79
movq %rax, %rdi
callq 0xd4e3
movq -0x30(%rbp), %r14
leaq 0x108dcc7(%rip), %rdi   # 0x11196d0
movq %r15, %rsi
callq 0x13ff0
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a972
movq (%r15), %r14
andq %rax, %r12
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x8ba9e
decl (%r12)
jne 0x8ba9e
leaq 0x8a95f(%rip), %rsi     # 0x1163a1
jmp 0x8ba96
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8ba54
movq %rdx, %rdi
callq 0x5030
leaq 0x108d5cd(%rip), %rdi   # 0x1119028
movq %r15, %rsi
callq 0x13ff0
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a972
movq (%r15), %r14
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
je 0x8ba9e
decl (%rcx)
jne 0x8ba9e
andq $-0x4, %rax
leaq 0x8a053(%rip), %rsi     # 0x115ae9
movq %rax, %rdi
callq 0xd4e3
movq %r14, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x58c86(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x58c8b(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5