// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_zaAB_elabzemacrozx
static void mw_mirth_elab_zaAB_elabzemacrozx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_arrow_Arrow* in_zaAB_2, uint64_t in_Macro_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_arrow_Arrow* *out_zaAB_5) {
	struct mirth_mirth_zaMirth* v6;
	struct mirth_macro_MacroAction v7 = mw_mirth_macro_Macro_action(in_zaMirth_1, in_Macro_3, &v6);
	struct std_maybe_Maybe_1 v8 = mw_mirth_macro_MacroAction_arrowzy(v7);
	struct mirth_mirth_zaMirth* branch_zaMirth_9;
	struct mirth_arrow_Arrow* branch_zaAB_10;
	switch ((v8).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v11 = mtp_std_maybe_Maybe_1_Some(v8);
			push_resource(MK_mirth_mirth_zaMirth(v6));
			push_resource(MK_mirth_arrow_Arrow(in_zaAB_2));
			run_value(v11);
			struct mirth_arrow_Arrow* r12 = V_mirth_arrow_Arrow(pop_resource());
			branch_zaAB_10 = r12;
			struct mirth_mirth_zaMirth* r13 = V_mirth_mirth_zaMirth(pop_resource());
			branch_zaMirth_9 = r13;
		} break;
		case std_maybe_Maybe_1_None: {
			struct mirth_arrow_Arrow* v14;
			uint64_t v15 = mw_mirth_elab_zaAB_abzetokenzo(in_zaAB_2, &v14);
			STR* v16;
			STRLIT(v16, "macro cannot be invoked here", 28);
			struct mirth_mirth_zaMirth* v17;
			mw_mirth_mirth_zaMirth_emitzeerrorzx(v6, v15, v16, &v17);
			struct mirth_type_StackType v18 = { .tag=mirth_type_StackType_Error };
			struct mirth_arrow_Arrow* v19;
			mw_mirth_elab_zaAB_abzetypezx(v14, v18, &v19);
			branch_zaAB_10 = v19;
			branch_zaMirth_9 = v17;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaAB_5 = branch_zaAB_10;
	*out_zaMirth_4 = branch_zaMirth_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x9feb0
movl %eax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movl -0x40(%rbp), %edi
movq -0x38(%rbp), %rsi
callq 0x1137e0
movl %eax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x13c(%rbp)
testl %eax, %eax
je 0x11565c
jmp 0x11557d
movl -0x13c(%rbp), %eax
subl $0x1, %eax
jne 0x1157e5
jmp 0x11558e
movl -0x50(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x174a0
movq %rax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x27c3cf(%rip), %rax    # 0x391980
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x5b40
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x27ce5c(%rip), %rax    # 0x392430
orq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x5b40
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x276b0
callq 0x13920
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x60(%rbp)
callq 0x13920
movq %rax, -0xc0(%rbp)
movq %rdx, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1157fe
movq -0x10(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xe0b80
movq %rax, -0xd0(%rbp)
cmpq $0x0, 0x1280565(%rip)   # 0x1395be0
jne 0x115695
leaq 0x24444f(%rip), %rdi    # 0x359ad3
movl $0x1c, %esi
callq 0xb6c0
movq %rax, 0x128054b(%rip)   # 0x1395be0
jmp 0x115697
movq 0x1280542(%rip), %rax   # 0x1395be0
movq %rax, -0xe8(%rbp)
leaq 0x27baac(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x11576c
movq 0x128050d(%rip), %rax   # 0x1395be0
movq %rax, -0xf8(%rbp)
leaq 0x27ba77(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xf0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xf8(%rbp), %rax
cmpq $0x0, %rax
je 0x11576c
movq 0x12804d6(%rip), %rax   # 0x1395be0
movq %rax, -0x108(%rbp)
leaq 0x27ba40(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x100(%rbp)
movq -0x108(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x11576c
movq 0x12804a5(%rip), %rax   # 0x1395be0
movq %rax, -0x118(%rbp)
leaq 0x27ba0f(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x110(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x118(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x11576e
movq 0x128046b(%rip), %rax   # 0x1395be0
movq %rax, -0xd8(%rbp)
movq -0x30(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
leaq -0x120(%rbp), %rcx
callq 0x98c50
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0xc8(%rbp), %rdi
movl -0x130(%rbp), %esi
movq -0x128(%rbp), %rdx
leaq -0x138(%rbp), %rcx
callq 0x113a00
movq -0x138(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1157fe
leaq 0x23e695(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x60(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax)