// File: /workspace/github_c_makefile_star2_O2/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 0x81f42
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0x518d9(%rip), %rcx     # 0xd35e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rdi
callq 0x13ef6
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4f9e7
movq (%r15), %rdi
leaq -0x30(%rbp), %r14
movl %eax, %esi
movq %r14, %rcx
callq 0x81ce0
movq (%r14), %r14
jmp 0x81eaa
movq %rdx, %rdi
callq 0x14121
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x53306
jmp 0x81e78
movq %rdx, %rdi
callq 0x140ad
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x66d79
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x81ea6
decl (%rcx)
jne 0x81ea6
shlq $0x30, %rax
orq %rdx, %rax
leaq 0x87cfc(%rip), %rsi     # 0x109aa9
jmp 0x81e9e
movq %rdx, %rdi
callq 0x141c7
jmp 0x81eaa
movq %rdx, %rdi
callq 0x13fe7
jmp 0x81eaa
movq %rdx, %rdi
callq 0x13f13
jmp 0x81eaa
movq %rdx, %rdi
callq 0x14090
jmp 0x81eaa
movq %rdx, %rdi
callq 0x14004
jmp 0x81eaa
movq %rdx, %rdi
callq 0x13f68
jmp 0x81eaa
movq %rdx, %rdi
callq 0x140ca
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2a620
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %sil
testb $0x3, %dl
setne %dil
orb %sil, %dil
jne 0x81ea6
decl (%rcx)
jne 0x81ea6
shlq $0x30, %rax
orq %rdx, %rax
leaq 0x86ca3(%rip), %rsi     # 0x108ae9
jmp 0x81e9e
movq %rdx, %rdi
callq 0x1413e
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4b310
jmp 0x81e78
movq %rdx, %rdi
callq 0x140e7
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x53232
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x81ea6
decl (%rcx)
jne 0x81ea6
leaq 0x86cdb(%rip), %rsi     # 0x108b79
movq %rax, %rdi
callq 0xce94
movq -0x28(%rbp), %r14
movq %r14, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rdx, %rdi
callq 0x14104
movq %rax, %r15
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3e71c
movq %rax, %rcx
andq %r12, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x81f05
decl (%rcx)
jne 0x81f05
leaq 0x86c7c(%rip), %rsi     # 0x108b79
movq %rax, %rdi
callq 0xce94
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rdx
movq %r15, %rsi
callq 0x31be4
andq %rax, %r12
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x81f39
decl (%r12)
jne 0x81f39
leaq 0x87470(%rip), %rsi     # 0x1093a1
movq %rax, %rdi
callq 0xce94
movq -0x30(%rbp), %r14
jmp 0x81eaa
leaq 0x528c4(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6