// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_data_Tag_numzetypezeinputszefromzesig
static INT mw_mirth_data_Tag_numzetypezeinputszefromzesig (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;
			INT v11 = mw_mirth_token_Token_sigzestackzelength(v5, V_mirth_token_Token(v9), &v10);
			struct mirth_mirth_zaMirth* v12;
			INT v13 = mw_mirth_data_Tag_numzeresourcezeinputszefromzesig(v10, in_Tag_2, &v12);
			INT v14 = v11;
			INT v15 = v13;
			INT v16 = int_sub(v14, v15);
			incref(MKINT(v16));
			INT v17 = WRAP_I63(0LL);
			INT v18 = v17;
			bool v19 = int_le(v18, v16);
			INT branch_Nat_20;
			if (v19) {
				INT v21 = v16;
				branch_Nat_20 = v21;
			} else {
				decref(MKINT(v16));
				INT v22 = WRAP_I63(0LL);
				branch_Nat_20 = v22;
			}
			struct mirth_mirth_zaMirth* v23;
			struct std_list_List_1 v24 = mw_mirth_data_Tag_labelzeinputszefromzesig(v12, in_Tag_2, &v23);
			INT v25 = mw_std_list_List_1_len(v24);
			INT v26 = branch_Nat_20;
			INT v27 = v25;
			INT v28 = int_sub(v26, v27);
			incref(MKINT(v28));
			INT v29 = WRAP_I63(0LL);
			INT v30 = v29;
			bool v31 = int_le(v30, v28);
			INT branch_Nat_32;
			if (v31) {
				INT v33 = v28;
				branch_Nat_32 = v33;
			} else {
				decref(MKINT(v28));
				INT v34 = WRAP_I63(0LL);
				branch_Nat_32 = v34;
			}
			branch_Nat_8 = branch_Nat_32;
			branch_zaMirth_7 = v23;
		} break;
		case std_maybe_Maybe_1_None: {
			INT v35 = WRAP_I63(0LL);
			branch_Nat_8 = v35;
			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
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x606e0
movl %eax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x24c(%rbp)
testl %eax, %eax
je 0x1a6b83
jmp 0x1a65b2
movl -0x24c(%rbp), %eax
subl $0x1, %eax
jne 0x1a6ba6
jmp 0x1a65c3
movl -0x38(%rbp), %edi
movq -0x30(%rbp), %rsi
callq 0x174a0
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x1a6be0
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x1a6c40
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x1c670
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x1eadee(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1a66fa
movq -0x88(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x1eadb9(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0xa0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xa8(%rbp), %rax
cmpq $0x0, %rax
je 0x1a66fa
movq -0x88(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x1ead82(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1a66fa
movq -0x88(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq 0x1ead51(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0xc0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xc8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1a66fc
movq 0x1c834d(%rip), %rax    # 0x36ea50
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x1c1b0
andb $0x1, %al
movb %al, -0xd9(%rbp)
testb $0x1, -0xd9(%rbp)
je 0x1a675d
movq -0x88(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xe8(%rbp)
jmp 0x1a6890
jmp 0x1a675f
movq -0x88(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq 0x1eacb4(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1a6872
movq -0x88(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq 0x1eac7f(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x108(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x110(%rbp), %rax
cmpq $0x0, %rax
je 0x1a6872
movq -0x88(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq 0x1eac44(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x118(%rbp)
movq -0x120(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1a6872
movq -0x88(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq 0x1eac13(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x128(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x130(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1a6870
movq -0x88(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq 0x1eabd6(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x138(%rbp)
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x127c0
jmp 0x1a6872
jmp 0x1a6874
movq 0x1c81d5(%rip), %rax    # 0x36ea50
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x1a6070
movl %eax, -0x160(%rbp)
movq %rdx, -0x158(%rbp)
movl -0x160(%rbp), %edi
movq -0x158(%rbp), %rsi
callq 0x33100
movq %rax, -0x168(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x170(%rbp), %rdi
movq -0x178(%rbp), %rsi
callq 0x1c670
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq 0x1eab13(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1a69d5
movq -0x180(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq 0x1eaade(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x198(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x1a0(%rbp), %rax
cmpq $0x0, %rax
je 0x1a69d5
movq -0x180(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x1eaaa7(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x1a8(%rbp)
movq -0x1b0(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1a69d5
movq -0x180(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq 0x1eaa76(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x1b8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x1c0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1a69d7
movq 0x1c8072(%rip), %rax    # 0x36ea50
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rdi
movq -0x180(%rbp), %rsi
callq 0x1c1b0
andb $0x1, %al
movb %al, -0x1d1(%rbp)
testb $0x1, -0x1d1(%rbp)
je 0x1a6a38
movq -0x180(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
jmp 0x1a6b6b
jmp 0x1a6a3a
movq -0x180(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq 0x1ea9d9(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1a6b4d
movq -0x180(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq 0x1ea9a4(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x200(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x208(%rbp), %rax
cmpq $0x0, %rax
je 0x1a6b4d
movq -0x180(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq 0x1ea969(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x210(%rbp)
movq -0x218(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1a6b4d
movq -0x180(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq 0x1ea938(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x220(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x228(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1a6b4b
movq -0x180(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq 0x1ea8fb(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rdi
movq -0x230(%rbp), %rsi
callq 0x127c0
jmp 0x1a6b4d
jmp 0x1a6b4f
movq 0x1c7efa(%rip), %rax    # 0x36ea50
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x1a6bbf
movq 0x1c7ec6(%rip), %rax    # 0x36ea50
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x1a6bbf
leaq 0x1ad2d4(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopw (%rax,%rax)