// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_table_StateOwner_ctx
static struct std_list_List_1 mw_mirth_table_StateOwner_ctx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_table_StateOwner in_StateOwner_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* branch_zaMirth_5;
	struct std_list_List_1 branch_Ctx_6;
	switch ((in_StateOwner_2).tag) {
		case mirth_table_StateOwner_Error: {
			struct std_list_List_1 v7 = mw_mirth_var_Ctx_L0();
			branch_Ctx_6 = v7;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_table_StateOwner_Default: {
			struct std_list_List_1 v8 = mw_mirth_var_Ctx_L0();
			branch_Ctx_6 = v8;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		case mirth_table_StateOwner_Resource: {
			struct mirth_type_Type v9;
			struct std_list_List_1 v10 = mtp_mirth_table_StateOwner_Resource(in_StateOwner_2, &v9);
			decref(MK_mirth_type_Type(v9));
			branch_Ctx_6 = v10;
			branch_zaMirth_5 = in_zaMirth_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_5;
	return branch_Ctx_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %esi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0xcc(%rbp)
testl %eax, %eax
je 0x18af66
jmp 0x18af49
movl -0xcc(%rbp), %eax
subl $0x1, %eax
je 0x18af8f
jmp 0x18af56
movl -0xcc(%rbp), %eax
subl $0x2, %eax
je 0x18afb8
jmp 0x18b0da
callq 0xae770
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x18b0f3
callq 0xae770
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x18b0f3
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x14eb20
movl %eax, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x6e780
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x80(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x18b0be
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x6e780
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x98(%rbp), %rax
cmpq $0x0, %rax
je 0x18b0be
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x6e780
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x18b0be
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x6e780
movq %rax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0xb8(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x18b0bc
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x6e780
movq %rax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x127c0
jmp 0x18b0be
jmp 0x18b0c0
movq -0x78(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x18b0f3
leaq 0x1c8da0(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0xd0, %rsp
popq %rbp
retq
nop