// File: /workspace/github_c_makefile_star2_O3/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 0x895e8
movq %rcx, %rbx
movq %rdi, %r14
movl %esi, %eax
leaq 0x56249(%rip), %rcx     # 0xdf5c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl (%rdx)
jne 0x895d8
movq %rdx, %rdi
callq 0x5030
jmp 0x895d8
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x893a5
movq %rdx, %rdi
callq 0x5030
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x579dc
jmp 0x893f6
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x893c6
movq %rdx, %rdi
callq 0x5030
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x57a93
jmp 0x893f6
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x893e7
movq %rdx, %rdi
callq 0x5030
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4fa43
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x89424
decl (%rcx)
jne 0x89424
leaq 0x8875d(%rip), %rsi     # 0x111b79
movq %rax, %rdi
callq 0xd13d
movq -0x28(%rbp), %r14
jmp 0x895d8
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8943d
movq %rdx, %rdi
callq 0x5030
leaq 0x108cbcc(%rip), %rdi   # 0x1116010
movq %r15, %rsi
callq 0x13c85
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a6db
movq (%r15), %r14
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
je 0x895d8
decl (%rcx)
jne 0x895d8
andq $-0x4, %rax
leaq 0x89622(%rip), %rsi     # 0x112aa9
jmp 0x895d0
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8949c
movq %rdx, %rdi
callq 0x5030
leaq 0x108bf75(%rip), %rdi   # 0x1115418
movq %r15, %rsi
callq 0x13c85
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a6db
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 0x89350
movq (%r14), %r14
jmp 0x895d8
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x894f8
movq %rdx, %rdi
callq 0x5030
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
leaq -0x30(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x42295
movq %rax, %rcx
andq %r12, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x89538
decl (%rcx)
jne 0x89538
leaq 0x88649(%rip), %rsi     # 0x111b79
movq %rax, %rdi
callq 0xd13d
movq -0x30(%rbp), %r14
leaq 0x108c18d(%rip), %rdi   # 0x11156d0
movq %r15, %rsi
callq 0x13c85
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a6db
movq (%r15), %r14
andq %rax, %r12
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
jne 0x895d8
decl (%r12)
jne 0x895d8
leaq 0x88e25(%rip), %rsi     # 0x1123a1
jmp 0x895d0
movq 0x8(%rdx), %r15
decl (%rdx)
jne 0x8958e
movq %rdx, %rdi
callq 0x5030
leaq 0x108ba93(%rip), %rdi   # 0x1115028
movq %r15, %rsi
callq 0x13c85
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1a6db
movq (%r15), %r14
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rax, %rcx
je 0x895d8
decl (%rcx)
jne 0x895d8
andq $-0x4, %rax
leaq 0x88519(%rip), %rsi     # 0x111ae9
movq %rax, %rdi
callq 0xd13d
movq %r14, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x570cc(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x570d1(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302