// File: /workspace/github_c_makefile_star2_O1/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_data_Tag_numzeresourcezeinputszefromzesig
static INT mw_mirth_data_Tag_numzeresourcezeinputszefromzesig (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Tag_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* v5;
	struct std_maybe_Maybe_1 v6 = mw_mirth_data_Tag_sigzy(in_zaMirth_1, in_Tag_2, &v5);
	struct mirth_mirth_zaMirth* branch_zaMirth_7;
	INT branch_Nat_8;
	switch ((v6).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v9 = mtp_std_maybe_Maybe_1_Some(v6);
			struct mirth_mirth_zaMirth* v10;
			struct std_list_List_1 v11 = mw_mirth_token_Token_sigzestackzetokens(v5, V_mirth_token_Token(v9), &v10);
			struct std_list_List_1 v12 = { .tag=std_list_List_1_Nil };
			struct std_list_List_1 v13;
			mw_std_list_List_1_buildzx(v12, &v13);
			bool v14 = true;
			struct mirth_mirth_zaMirth* r15 = v10;
			struct std_list_List_1 r16 = v13;
			struct std_list_List_1 v17 = v11;
			bool v18 = v14;
			bool v19 = v14;
			while (v19) {
				struct mirth_mirth_zaMirth* r20 = r15;
				struct std_list_List_1 r21 = r16;
				struct std_list_List_1 v22 = v17;
				bool v23 = v18;
				struct mirth_mirth_zaMirth* branch_zaMirth_24;
				struct std_list_List_1 branch_zaLister_25;
				struct std_list_List_1 branch_List_26;
				bool branch_Bool_27;
				switch ((v22).tag) {
					case std_list_List_1_Cons: {
						struct std_list_List_1 v28;
						VAL v29 = mtp_std_list_List_1_Cons(v22, &v28);
						incref(v29);
						struct mirth_mirth_zaMirth* v30;
						bool v31 = mw_mirth_token_Token_couldzebezesigzelabelzy(r20, V_mirth_token_Token(v29), &v30);
						bool v32 = !v31;
						struct mirth_mirth_zaMirth* branch_zaMirth_33;
						struct std_list_List_1 branch_zaLister_34;
						if (v32) {
							struct std_list_List_1 v35;
							mw_std_list_zaLister_1_pushzx(v29, r21, &v35);
							branch_zaLister_34 = v35;
							branch_zaMirth_33 = v30;
						} else {
							decref(v29);
							branch_zaLister_34 = r21;
							branch_zaMirth_33 = v30;
						}
						bool v36 = true;
						branch_Bool_27 = v36;
						branch_List_26 = v28;
						branch_zaLister_25 = branch_zaLister_34;
						branch_zaMirth_24 = branch_zaMirth_33;
					} break;
					case std_list_List_1_Nil: {
						struct std_list_List_1 v37 = { .tag=std_list_List_1_Nil };
						bool v38 = false;
						branch_Bool_27 = v38;
						branch_List_26 = v37;
						branch_zaLister_25 = r21;
						branch_zaMirth_24 = r20;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				v19 = branch_Bool_27;
				v18 = branch_Bool_27;
				v17 = branch_List_26;
				r16 = branch_zaLister_25;
				r15 = branch_zaMirth_24;
			}
			decref(MK_std_list_List_1(v17));
			struct std_list_List_1 v39 = mw_std_list_zaLister_1_donezx(r16);
			struct std_list_List_1 v40 = { .tag=std_list_List_1_Nil };
			struct std_list_List_1 v41;
			mw_std_list_List_1_buildzx(v40, &v41);
			bool v42 = true;
			struct mirth_mirth_zaMirth* r43 = r15;
			struct std_list_List_1 r44 = v41;
			struct std_list_List_1 v45 = v39;
			bool v46 = v42;
			bool v47 = v42;
			while (v47) {
				struct mirth_mirth_zaMirth* r48 = r43;
				struct std_list_List_1 r49 = r44;
				struct std_list_List_1 v50 = v45;
				bool v51 = v46;
				struct mirth_mirth_zaMirth* branch_zaMirth_52;
				struct std_list_List_1 branch_zaLister_53;
				struct std_list_List_1 branch_List_54;
				bool branch_Bool_55;
				switch ((v50).tag) {
					case std_list_List_1_Cons: {
						struct std_list_List_1 v56;
						VAL v57 = mtp_std_list_List_1_Cons(v50, &v56);
						struct mirth_mirth_zaMirth* v58;
						struct std_maybe_Maybe_1 v59 = mw_mirth_token_Token_lastzenamezy(r48, V_mirth_token_Token(v57), &v58);
						struct std_list_List_1 v60;
						mw_std_maybe_Maybe_1_for_1_sp2(r49, v59, &v60);
						bool v61 = true;
						branch_Bool_55 = v61;
						branch_List_54 = v56;
						branch_zaLister_53 = v60;
						branch_zaMirth_52 = v58;
					} break;
					case std_list_List_1_Nil: {
						struct std_list_List_1 v62 = { .tag=std_list_List_1_Nil };
						bool v63 = false;
						branch_Bool_55 = v63;
						branch_List_54 = v62;
						branch_zaLister_53 = r49;
						branch_zaMirth_52 = r48;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				v47 = branch_Bool_55;
				v46 = branch_Bool_55;
				v45 = branch_List_54;
				r44 = branch_zaLister_53;
				r43 = branch_zaMirth_52;
			}
			decref(MK_std_list_List_1(v45));
			struct std_list_List_1 v64 = mw_std_list_zaLister_1_donezx(r44);
			struct std_list_List_1 v65 = { .tag=std_list_List_1_Nil };
			struct std_list_List_1 v66;
			mw_std_list_List_1_buildzx(v65, &v66);
			bool v67 = true;
			struct mirth_mirth_zaMirth* r68 = r43;
			struct std_list_List_1 r69 = v66;
			struct std_list_List_1 v70 = v64;
			bool v71 = v67;
			bool v72 = v67;
			while (v72) {
				struct mirth_mirth_zaMirth* r73 = r68;
				struct std_list_List_1 r74 = r69;
				struct std_list_List_1 v75 = v70;
				bool v76 = v71;
				struct mirth_mirth_zaMirth* branch_zaMirth_77;
				struct std_list_List_1 branch_zaLister_78;
				struct std_list_List_1 branch_List_79;
				bool branch_Bool_80;
				switch ((v75).tag) {
					case std_list_List_1_Cons: {
						struct std_list_List_1 v81;
						VAL v82 = mtp_std_list_List_1_Cons(v75, &v81);
						incref(v82);
						incref(v82);
						struct mirth_mirth_zaMirth* v83;
						bool v84 = mw_mirth_name_Name_couldzebezeresourcezevar(r73, V_mirth_name_Name(v82), &v83);
						struct mirth_mirth_zaMirth* branch_zaMirth_85;
						bool branch_Bool_86;
						if (v84) {
							decref(v82);
							bool v87 = true;
							branch_Bool_86 = v87;
							branch_zaMirth_85 = v83;
						} else {
							struct mirth_mirth_zaMirth* v88;
							bool v89 = mw_mirth_name_Name_couldzebezeresourcezecon(v83, V_mirth_name_Name(v82), &v88);
							branch_Bool_86 = v89;
							branch_zaMirth_85 = v88;
						}
						struct mirth_mirth_zaMirth* branch_zaMirth_90;
						struct std_list_List_1 branch_zaLister_91;
						if (branch_Bool_86) {
							struct std_list_List_1 v92;
							mw_std_list_zaLister_1_pushzx(v82, r74, &v92);
							branch_zaLister_91 = v92;
							branch_zaMirth_90 = branch_zaMirth_85;
						} else {
							decref(v82);
							branch_zaLister_91 = r74;
							branch_zaMirth_90 = branch_zaMirth_85;
						}
						bool v93 = true;
						branch_Bool_80 = v93;
						branch_List_79 = v81;
						branch_zaLister_78 = branch_zaLister_91;
						branch_zaMirth_77 = branch_zaMirth_90;
					} break;
					case std_list_List_1_Nil: {
						struct std_list_List_1 v94 = { .tag=std_list_List_1_Nil };
						bool v95 = false;
						branch_Bool_80 = v95;
						branch_List_79 = v94;
						branch_zaLister_78 = r74;
						branch_zaMirth_77 = r73;
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				v72 = branch_Bool_80;
				v71 = branch_Bool_80;
				v70 = branch_List_79;
				r69 = branch_zaLister_78;
				r68 = branch_zaMirth_77;
			}
			decref(MK_std_list_List_1(v70));
			struct std_list_List_1 v96 = mw_std_list_zaLister_1_donezx(r69);
			INT v97 = mw_std_list_List_1_len(v96);
			branch_Nat_8 = v97;
			branch_zaMirth_7 = r68;
		} break;
		case std_maybe_Maybe_1_None: {
			INT v98 = WRAP_I63(0LL);
			branch_Nat_8 = v98;
			branch_zaMirth_7 = v5;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_7;
	return branch_Nat_8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x10a137f(%rip), %rdi   # 0x1118d20
callq 0x13ff0
movq %rax, %rdi
callq 0x140f0
movq %rax, %rdx
shrq $0x30, %rdx
movl $0x1, %ecx
je 0x77e35
movq %rbx, -0x58(%rbp)
cmpl $0x1, %edx
jne 0x77e4a
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %rax
movq %rax, %rdi
callq 0xdaeb
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rdx, %r14
callq 0x758ae
movl %eax, %ebx
movq %rdx, %r15
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd37c
movq %r12, %rsi
movl %eax, %r13d
movq %rdx, %r12
movq (%r14), %r14
testl %ebx, %ebx
je 0x77a88
cmpl $0x1, %ebx
jne 0x77e4a
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd450
movq %rax, %rbx
movq %rdx, %r15
testb $0x1, %r15b
je 0x77a56
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x77a56
incl (%rax)
movq %r14, %rdi
movq %rbx, %rsi
leaq -0x40(%rbp), %rdx
callq 0x3176f
cmpl $0x1, %eax
jne 0x77a92
movq %rdx, %rdi
callq 0xdaeb
movq -0x40(%rbp), %rdi
movq %rax, %rsi
leaq -0x30(%rbp), %rdx
callq 0x412b5
movq -0x30(%rbp), %r14
jmp 0x77a98
xorl %eax, %eax
xorl %r15d, %r15d
jmp 0x77b7f
movq -0x40(%rbp), %r14
xorl %eax, %eax
testb %al, %al
je 0x77b15
cmpq %rbx, 0x10a1955(%rip)   # 0x11193f8
leaq 0x1(%rbx), %rsi
movl $0x0, %eax
cmovbeq %rax, %rsi
movq %r14, %rdi
leaq -0x30(%rbp), %rdx
callq 0x4137f
movl %eax, %r14d
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x77af8
decl (%rax)
jne 0x77af8
movq %r14, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0x9d7ce(%rip), %rsi     # 0x1152c1
callq 0xd4e3
leaq 0x1(,%r14,2), %rdi
movl $0x1, %esi
callq 0xec04
testl %eax, %eax
setne %al
movq -0x30(%rbp), %r14
jmp 0x77b17
xorl %eax, %eax
testb %al, %al
je 0x77b4f
testb $0x1, %r15b
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
je 0x77b76
movq %rbx, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x77b76
decl (%rax)
jne 0x77b76
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd4e3
jmp 0x77b6c
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
leaq -0x40(%rbp), %r8
callq 0x9741
movl -0x40(%rbp), %r13d
movq -0x38(%rbp), %r12
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movl -0x50(%rbp), %ebx
movq -0x48(%rbp), %r15
movb $0x1, %al
testb %al, %al
jne 0x77a12
movq %r15, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x77bb5
decl (%rax)
jne 0x77bb5
shlq $0x30, %rbx
orq %r15, %rbx
movq %rbx, %rdi
leaq 0x9d6c9(%rip), %rsi     # 0x115279
callq 0xd4e3
xorl %edi, %edi
xorl %esi, %esi
movl %r13d, %edx
movq %r12, %rcx
callq 0xd37c
movl %eax, %r12d
movq %rdx, %r13
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd37c
movl %eax, %r15d
movq %rdx, %rbx
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
testl %r12d, %r12d
je 0x77c47
cmpl $0x1, %r12d
jne 0x77e4a
movq %r13, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd450
movq %r14, %rdi
movq %rax, %rsi
leaq -0x30(%rbp), %rdx
callq 0x72af8
movq %rdx, %rcx
movl %r15d, %edi
movq %rbx, %rsi
movl %eax, %edx
leaq -0x40(%rbp), %r8
callq 0x3043a
movl -0x50(%rbp), %r12d
movq -0x48(%rbp), %r13
movl -0x40(%rbp), %r15d
movq -0x38(%rbp), %rbx
movq -0x30(%rbp), %r14
movb $0x1, %al
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
jmp 0x77c4c
xorl %eax, %eax
xorl %r13d, %r13d
testb %al, %al
jne 0x77be7
movq %r13, %rax
andq %rcx, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x77c7e
decl (%rax)
jne 0x77c7e
shlq $0x30, %r12
orq %r13, %r12
movq %r12, %rdi
leaq 0x9d600(%rip), %rsi     # 0x115279
callq 0xd4e3
xorl %edi, %edi
xorl %esi, %esi
movl %r15d, %edx
movq %rbx, %rcx
callq 0xd37c
movl %eax, %r15d
movq %rdx, %r13
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd37c
movl %eax, %ebx
movq %rdx, %r12
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
testl %r15d, %r15d
je 0x77d53
cmpl $0x1, %r15d
jne 0x77e4a
movq %r13, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd450
movq %rax, %r13
movq %rdx, %r15
testb $0x1, %r15b
je 0x77cfb
movq %r13, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x77cfb
addl $0x2, (%rax)
movq %r14, %rdi
movq %r13, %rsi
leaq -0x30(%rbp), %rdx
callq 0x1eefb
testb %al, %al
je 0x77d5d
testb $0x1, %r15b
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
je 0x77d4b
movq %r13, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x77d4b
decl (%rax)
jne 0x77d4b
movq %r13, %rdi
movq %r15, %rsi
callq 0xd4e3
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movb $0x1, %al
movq -0x30(%rbp), %r14
jmp 0x77d7b
xorl %r13d, %r13d
xorl %eax, %eax
jmp 0x77de3
movq -0x30(%rbp), %rdi
movq %r13, %rsi
leaq -0x40(%rbp), %rdx
callq 0x20e10
movq -0x40(%rbp), %r14
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
testb %al, %al
je 0x77da6
movq %r13, %rdi
movq %r15, %rsi
movl %ebx, %edx
movq %r12, %rcx
leaq -0x40(%rbp), %r8
callq 0x9741
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movl -0x40(%rbp), %ebx
movq -0x38(%rbp), %r12
jmp 0x77dd9
testb $0x1, %r15b
je 0x77dd9
movq %r13, %rax
andq %rsi, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x77dd9
decl (%rax)
jne 0x77dd9
movq %r13, %rdi
movq %r15, %rsi
callq 0xd4e3
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
movl -0x50(%rbp), %r15d
movq -0x48(%rbp), %r13
movb $0x1, %al
testb %al, %al
jne 0x77caf
andq %r13, %rsi
sete %al
testb $0x3, %r13b
setne %cl
orb %al, %cl
jne 0x77e16
decl (%rsi)
jne 0x77e16
shlq $0x30, %r15
orq %r13, %r15
movq %r15, %rdi
leaq 0x9d468(%rip), %rsi     # 0x115279
callq 0xd4e3
xorl %edi, %edi
xorl %esi, %esi
movl %ebx, %edx
movq %r12, %rcx
callq 0xd37c
movl %eax, %edi
movq %rdx, %rsi
callq 0x11a85
movq %rax, %rcx
movq -0x58(%rbp), %rbx
movq %r14, (%rbx)
movq %rcx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf9f7
movq $0x20, 0x10(%rax)
movups 0x6c8ea(%rip), %xmm0    # 0xe474d
movups %xmm0, 0x18(%rax)
movups 0x6c8ef(%rip), %xmm0    # 0xe475d
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x95a5