// File: /workspace/github_c_makefile_star2_O2/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 $0x68, %rsp
movq %r8, -0x40(%rbp)
movq %rcx, -0x48(%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 0xaacc6
incl (%rdx)
movl 0x18(%r14), %eax
movl %eax, -0x2c(%rbp)
movq 0x20(%r14), %rcx
movq %rcx, %r13
andq %r12, %r13
setne %al
movq %rcx, -0x38(%rbp)
testb $0x3, %cl
sete %bl
andb %al, %bl
cmpb $0x1, %bl
jne 0xaacef
incl (%r13)
leaq 0x5f39b(%rip), %r8      # 0x10a091
testb %r15b, %r15b
je 0xaad29
decl (%rdx)
jne 0xaad29
movq %rdi, -0x78(%rbp)
movq %r14, %rdi
movq %rsi, -0x80(%rbp)
movq %r8, %rsi
movq %rdx, -0x70(%rbp)
callq 0xce94
leaq 0x5f374(%rip), %r8      # 0x10a091
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
testb %bl, %bl
je 0xaad31
incl (%r13)
movl 0x8(%r14), %ebx
movq 0x10(%r14), %r13
andq %r13, %r12
sete %al
testb $0x3, %r13b
setne %cl
orb %al, %cl
jne 0xaad4e
incl (%r12)
testb %r15b, %r15b
je 0xaad6e
decl (%rdx)
jne 0xaad6e
movq %rdi, %r15
movq %r14, %rdi
movq %rsi, %r14
movq %r8, %rsi
callq 0xce94
movq %r15, %rdi
movq %r14, %rsi
cmpl $0x3, %ebx
ja 0xaaf16
movl %ebx, %eax
leaq 0x29310(%rip), %rcx     # 0xd4090
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
subq $0x8, %rsp
leaq -0x58(%rbp), %rbx
leaq -0x68(%rbp), %r14
leaq -0x60(%rbp), %r13
movl -0x2c(%rbp), %r12d
movl %r12d, %edx
movq -0x38(%rbp), %r15
movq %r15, %rcx
movq %r14, %r8
movq %r13, %r9
pushq %rbx
callq 0xa638d
popq %rax
popq %rcx
movq (%r14), %rdi
movq (%rbx), %rcx
leaq -0x50(%rbp), %rbx
movl %r12d, %esi
movq %r15, %rdx
movq %rbx, %r8
callq 0xa906a
movq (%rbx), %rcx
movq (%r13), %rdx
jmp 0xaaef9
subq $0x8, %rsp
leaq -0x58(%rbp), %rbx
leaq -0x68(%rbp), %r13
leaq -0x60(%rbp), %r14
movl -0x2c(%rbp), %r12d
movl %r12d, %edx
movq -0x38(%rbp), %r15
movq %r15, %rcx
movq %r13, %r8
movq %r14, %r9
pushq %rbx
callq 0xa68c2
popq %rax
popq %rcx
movq (%rbx), %rdi
leaq -0x50(%rbp), %rbx
movq %rbx, %rsi
callq 0xa9c5b
movq (%r13), %rdi
movq (%rbx), %rcx
leaq -0x88(%rbp), %rbx
movl %r12d, %esi
movq %r15, %rdx
movq %rbx, %r8
callq 0xa906a
movq (%rbx), %rcx
movq (%r14), %rdx
jmp 0xaaef9
movq %rdi, %r15
movq %r13, %rdi
movq %rsi, %r12
callq 0xa4b08
leaq -0x58(%rbp), %rbx
leaq -0x60(%rbp), %r10
leaq -0x68(%rbp), %r14
movq %r15, %rdi
movq %r12, %rsi
movl -0x2c(%rbp), %r13d
movl %r13d, %edx
movq -0x38(%rbp), %r12
movq %r12, %rcx
movq %rax, %r8
movq %r14, %r9
pushq %rbx
pushq %r10
movq %r10, %r15
callq 0xa5f3e
popq %rax
popq %rcx
movq (%rbx), %rdi
leaq -0x50(%rbp), %rbx
movq %rbx, %rsi
callq 0xa9c5b
movq (%r14), %rdi
movq (%rbx), %rcx
leaq -0x88(%rbp), %rbx
jmp 0xaaee5
movq %rdi, %r15
movq %r13, %rdi
movq %rsi, %r12
callq 0xa2f51
leaq -0x58(%rbp), %rbx
leaq -0x60(%rbp), %r10
leaq -0x68(%rbp), %r14
movq %r15, %rdi
movq %r12, %rsi
movl -0x2c(%rbp), %r13d
movl %r13d, %edx
movq -0x38(%rbp), %r12
movq %r12, %rcx
movq %rax, %r8
movq %r14, %r9
pushq %rbx
pushq %r10
movq %r10, %r15
callq 0xa5b19
popq %rax
popq %rcx
movq (%r14), %rdi
movq (%rbx), %rcx
leaq -0x50(%rbp), %rbx
movl %r13d, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0xa906a
movq (%rbx), %rcx
movq (%r15), %rdx
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq %rdx, (%rdi)
movq %rcx, (%rsi)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x298f0(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6