// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_c99_C99APIArg_popzeconsumezx
static STR* mw_mirth_c99_C99APIArg_popzeconsumezx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_c99_zaC99Branch* in_zaC99Branch_2, struct mirth_c99_C99APIArg* in_C99APIArg_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_c99_zaC99Branch* *out_zaC99Branch_5) {
	incref(MK_mirth_c99_C99APIArg(in_C99APIArg_3));
	struct mirth_c99_C99ReprType v7 = in_C99APIArg_3->margzerepr;
	incref(MK_mirth_c99_C99ReprType(v7));
	decref(MK_mirth_c99_C99APIArg(in_C99APIArg_3));
	incref(MK_mirth_c99_C99ReprType(v7));
	struct mirth_c99_C99APIArgSource v8 = in_C99APIArg_3->margzesource;
	incref(MK_mirth_c99_C99APIArgSource(v8));
	decref(MK_mirth_c99_C99APIArg(in_C99APIArg_3));
	struct mirth_c99_zaC99Branch* branch_zaC99Branch_9;
	struct mirth_mirth_zaMirth* branch_zaMirth_10;
	STR* branch_Str_11;
	switch ((v8).tag) {
		case mirth_c99_C99APIArgSource_Value: {
			struct mirth_mirth_zaMirth* v12;
			struct mirth_c99_zaC99Branch* v13;
			struct mirth_c99_zaC99Value* v14;
			mw_mirth_c99_zaC99Branch_popzevaluezx(in_zaMirth_1, in_zaC99Branch_2, v7, &v12, &v13, &v14);
			struct mirth_mirth_zaMirth* v15;
			STR* v16 = mw_mirth_c99_zaC99Value_consumezeas(v12, v7, v14, &v15);
			branch_Str_11 = v16;
			branch_zaMirth_10 = v15;
			branch_zaC99Branch_9 = v13;
		} break;
		case mirth_c99_C99APIArgSource_Resource: {
			struct mirth_mirth_zaMirth* v17;
			struct mirth_c99_zaC99Branch* v18;
			struct mirth_c99_zaC99Resource* v19;
			mw_mirth_c99_zaC99Branch_popzeresourcezx(in_zaMirth_1, in_zaC99Branch_2, v7, &v17, &v18, &v19);
			struct mirth_c99_zaC99Value* v20;
			mw_mirth_c99_zaC99Resource_turnzeintozevaluezx(v19, &v20);
			struct mirth_mirth_zaMirth* v21;
			STR* v22 = mw_mirth_c99_zaC99Value_consumezeas(v17, v7, v20, &v21);
			branch_Str_11 = v22;
			branch_zaMirth_10 = v21;
			branch_zaC99Branch_9 = v18;
		} break;
		case mirth_c99_C99APIArgSource_ValueLabel: {
			uint64_t v23 = mtp_mirth_c99_C99APIArgSource_ValueLabel(v8);
			struct mirth_mirth_zaMirth* v24;
			struct mirth_c99_zaC99Branch* v25;
			struct mirth_c99_zaC99Value* v26;
			mw_mirth_c99_zaC99Branch_popzevaluezelabelzx(in_zaMirth_1, in_zaC99Branch_2, v7, v23, &v24, &v25, &v26);
			struct mirth_mirth_zaMirth* v27;
			STR* v28 = mw_mirth_c99_zaC99Value_consumezeas(v24, v7, v26, &v27);
			branch_Str_11 = v28;
			branch_zaMirth_10 = v27;
			branch_zaC99Branch_9 = v25;
		} break;
		case mirth_c99_C99APIArgSource_ResourceLabel: {
			uint64_t v29 = mtp_mirth_c99_C99APIArgSource_ResourceLabel(v8);
			struct mirth_mirth_zaMirth* v30;
			struct mirth_c99_zaC99Branch* v31;
			struct mirth_c99_zaC99Resource* v32;
			mw_mirth_c99_zaC99Branch_popzeresourcezelabelzx(in_zaMirth_1, in_zaC99Branch_2, v7, v29, &v30, &v31, &v32);
			struct mirth_c99_zaC99Value* v33;
			mw_mirth_c99_zaC99Resource_turnzeintozevaluezx(v32, &v33);
			struct mirth_mirth_zaMirth* v34;
			STR* v35 = mw_mirth_c99_zaC99Value_consumezeas(v30, v7, v33, &v34);
			branch_Str_11 = v35;
			branch_zaMirth_10 = v34;
			branch_zaC99Branch_9 = v31;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaC99Branch_5 = branch_zaC99Branch_9;
	*out_zaMirth_4 = branch_zaMirth_10;
	return branch_Str_11;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x78(%rbp)
movq %rcx, -0x80(%rbp)
movq %rdx, %r14
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %rdx
setne %al
testb $0x3, %r14b
sete %r15b
andb %al, %r15b
cmpb $0x1, %r15b
jne 0xb50bc
incl (%rdx)
movl 0x18(%r14), %eax
movl %eax, -0x2c(%rbp)
movq 0x20(%r14), %rcx
movq %rcx, %r13
andq %r12, %r13
setne %al
movq %rcx, -0x50(%rbp)
testb $0x3, %cl
sete %bl
andb %al, %bl
cmpb $0x1, %bl
jne 0xb50e5
incl (%r13)
leaq 0x5dfa5(%rip), %r8      # 0x113091
testb %r15b, %r15b
je 0xb511f
decl (%rdx)
jne 0xb511f
movq %rdi, -0x68(%rbp)
movq %r14, %rdi
movq %rsi, -0x70(%rbp)
movq %r8, %rsi
movq %rdx, -0x60(%rbp)
callq 0xd13d
leaq 0x5df7e(%rip), %r8      # 0x113091
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
testb %bl, %bl
je 0xb5127
incl (%r13)
movl 0x8(%r14), %ebx
movq 0x10(%r14), %r13
andq %r13, %r12
sete %al
testb $0x3, %r13b
setne %cl
orb %al, %cl
jne 0xb5144
incl (%r12)
testb %r15b, %r15b
je 0xb5164
decl (%rdx)
jne 0xb5164
movq %rdi, %r15
movq %r14, %rdi
movq %rsi, %r14
movq %r8, %rsi
callq 0xd13d
movq %r15, %rdi
movq %r14, %rsi
cmpl $0x3, %ebx
ja 0xb5354
movl %ebx, %eax
leaq 0x2aebe(%rip), %rcx     # 0xe0034
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
subq $0x8, %rsp
leaq -0x38(%rbp), %rbx
leaq -0x48(%rbp), %r14
leaq -0x40(%rbp), %r13
movl -0x2c(%rbp), %r12d
movl %r12d, %edx
movq -0x50(%rbp), %r15
movq %r15, %rcx
movq %r14, %r8
movq %r13, %r9
pushq %rbx
callq 0xaff57
addq $0x10, %rsp
movq (%r14), %rdi
movq (%rbx), %rcx
leaq -0x58(%rbp), %rbx
movl %r12d, %esi
movq %r15, %rdx
movq %rbx, %r8
callq 0xb32da
movq (%rbx), %rcx
movq (%r13), %rdx
jmp 0xb5337
subq $0x8, %rsp
leaq -0x58(%rbp), %rbx
leaq -0x40(%rbp), %r8
leaq -0x38(%rbp), %r9
movl -0x2c(%rbp), %r12d
movl %r12d, %edx
movq -0x50(%rbp), %r15
movq %r15, %rcx
pushq %rbx
callq 0xb0549
addq $0x10, %rsp
movq (%rbx), %rdi
movl (%rdi), %ebx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r13
callq 0x5030
leaq -0x48(%rbp), %rcx
movl %ebx, %edi
movq %r14, %rsi
movq %r13, %rdx
movq %rcx, %rbx
callq 0xae5e3
movq (%rbx), %rcx
leaq -0x40(%rbp), %rax
movq (%rax), %rdi
leaq -0x48(%rbp), %rbx
movl %r12d, %esi
movq %r15, %rdx
jmp 0xb52b8
movq 0x8(%r13), %r14
decl (%r13)
jne 0xb5256
movq %rdi, %r15
movq %r13, %rdi
movq %rsi, %rbx
callq 0x5030
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x58(%rbp), %rbx
leaq -0x38(%rbp), %rax
leaq -0x40(%rbp), %r9
movl -0x2c(%rbp), %r15d
movl %r15d, %edx
movq -0x50(%rbp), %r12
movq %r12, %rcx
movq %r14, %r8
pushq %rbx
pushq %rax
callq 0xafaf2
addq $0x10, %rsp
movq (%rbx), %rdi
movl (%rdi), %ebx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r13
callq 0x5030
leaq -0x48(%rbp), %rcx
movl %ebx, %edi
movq %r14, %rsi
movq %r13, %rdx
movq %rcx, %rbx
callq 0xae5e3
movq (%rbx), %rcx
leaq -0x40(%rbp), %rax
movq (%rax), %rdi
leaq -0x48(%rbp), %rbx
movl %r15d, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0xb32da
movq (%rbx), %rcx
leaq -0x38(%rbp), %rdx
movq (%rdx), %rdx
jmp 0xb5337
movq 0x8(%r13), %r14
decl (%r13)
jne 0xb52ea
movq %rdi, %r15
movq %r13, %rdi
movq %rsi, %rbx
callq 0x5030
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x38(%rbp), %rbx
leaq -0x40(%rbp), %rax
leaq -0x48(%rbp), %r13
movl -0x2c(%rbp), %r15d
movl %r15d, %edx
movq -0x50(%rbp), %r12
movq %r12, %rcx
movq %r14, %r8
movq %r13, %r9
pushq %rbx
pushq %rax
movq %rax, %r14
callq 0xaf68d
addq $0x10, %rsp
movq (%r13), %rdi
movq (%rbx), %rcx
leaq -0x58(%rbp), %rbx
movl %r15d, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0xb32da
movq (%rbx), %rcx
movq (%r14), %rdx
movq -0x78(%rbp), %rsi
movq %rdx, (%rsi)
movq -0x80(%rbp), %rdx
movq %rcx, (%rdx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x2b360(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x2b365(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302