// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_match_Match_scrutineezedatazy
static struct std_maybe_Maybe_1 mw_mirth_match_Match_scrutineezedatazy (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_match_Match* in_Match_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct std_list_List_1 v5 = in_Match_2->mcases;
	incref(MK_std_list_List_1(v5));
	decref(MK_mirth_match_Match(in_Match_2));
	struct std_list_List_1 v6 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v7;
	mw_std_list_List_1_buildzx(v6, &v7);
	bool v8 = true;
	struct mirth_mirth_zaMirth* r9 = in_zaMirth_1;
	struct std_list_List_1 r10 = v7;
	struct std_list_List_1 v11 = v5;
	bool v12 = v8;
	bool v13 = v8;
	while (v13) {
		struct mirth_mirth_zaMirth* r14 = r9;
		struct std_list_List_1 r15 = r10;
		struct std_list_List_1 v16 = v11;
		bool v17 = v12;
		struct mirth_mirth_zaMirth* branch_zaMirth_18;
		struct std_list_List_1 branch_zaLister_19;
		struct std_list_List_1 branch_List_20;
		bool branch_Bool_21;
		switch ((v16).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v22;
				VAL v23 = mtp_std_list_List_1_Cons(v16, &v22);
				incref(v23);
				struct mirth_mirth_zaMirth* v24;
				bool v25 = mw_mirth_match_Case_iszedefaultzecasezy(r14, V_mirth_match_Case(v23), &v24);
				bool v26 = !v25;
				struct mirth_mirth_zaMirth* branch_zaMirth_27;
				struct std_list_List_1 branch_zaLister_28;
				if (v26) {
					struct std_list_List_1 v29;
					mw_std_list_zaLister_1_pushzx(v23, r15, &v29);
					branch_zaLister_28 = v29;
					branch_zaMirth_27 = v24;
				} else {
					decref(v23);
					branch_zaLister_28 = r15;
					branch_zaMirth_27 = v24;
				}
				bool v30 = true;
				branch_Bool_21 = v30;
				branch_List_20 = v22;
				branch_zaLister_19 = branch_zaLister_28;
				branch_zaMirth_18 = branch_zaMirth_27;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v31 = { .tag=std_list_List_1_Nil };
				bool v32 = false;
				branch_Bool_21 = v32;
				branch_List_20 = v31;
				branch_zaLister_19 = r15;
				branch_zaMirth_18 = r14;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v13 = branch_Bool_21;
		v12 = branch_Bool_21;
		v11 = branch_List_20;
		r10 = branch_zaLister_19;
		r9 = branch_zaMirth_18;
	}
	decref(MK_std_list_List_1(v11));
	struct std_list_List_1 v33 = mw_std_list_zaLister_1_donezx(r10);
	incref(MK_std_list_List_1(v33));
	struct std_maybe_Maybe_1 v34 = mw_std_list_List_1_first(v33);
	struct std_maybe_Maybe_1 branch_Maybe_35;
	switch ((v34).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v36 = mtp_std_maybe_Maybe_1_Some(v34);
			struct mirth_match_Pattern* v37 = V_mirth_match_Case(v36)->mpattern;
			incref(MK_mirth_match_Pattern(v37));
			decref(MK_mirth_match_Case(V_mirth_match_Case(v36)));
			struct std_maybe_Maybe_1 v38 = mw_mirth_match_Pattern_singlezetagzy(v37);
			branch_Maybe_35 = v38;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v39 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_35 = v39;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* branch_zaMirth_40;
	struct std_maybe_Maybe_1 branch_Maybe_41;
	switch ((branch_Maybe_35).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v42 = mtp_std_maybe_Maybe_1_Some(branch_Maybe_35);
			struct mirth_mirth_zaMirth* v43;
			uint64_t v44 = mw_mirth_data_Tag_data(r9, V_mirth_data_Tag(v42), &v43);
			struct std_maybe_Maybe_1 v45 = mtw_std_maybe_Maybe_1_Some(MK_mirth_data_Data(v44));
			branch_Maybe_41 = v45;
			branch_zaMirth_40 = v43;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v46 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_41 = v46;
			branch_zaMirth_40 = r9;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* branch_zaMirth_47;
	struct std_maybe_Maybe_1 branch_Maybe_48;
	switch ((branch_Maybe_41).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v49 = mtp_std_maybe_Maybe_1_Some(branch_Maybe_41);
			struct std_maybe_Maybe_1 v50 = { .tag=std_maybe_Maybe_1_None };
			bool v51 = true;
			struct mirth_mirth_zaMirth* r52 = branch_zaMirth_40;
			VAL v53 = v49;
			struct std_maybe_Maybe_1 v54 = v50;
			struct std_list_List_1 v55 = v33;
			bool v56 = v51;
			bool v57 = v51;
			while (v57) {
				struct mirth_mirth_zaMirth* r58 = r52;
				VAL v59 = v53;
				struct std_maybe_Maybe_1 v60 = v54;
				struct std_list_List_1 v61 = v55;
				bool v62 = v56;
				struct std_list_List_1 v63;
				struct std_maybe_Maybe_1 v64 = mw_std_list_List_1_uncons(v61, &v63);
				uint64_t branch_Data_65;
				struct mirth_mirth_zaMirth* branch_zaMirth_66;
				struct std_maybe_Maybe_1 branch_Maybe_67;
				struct std_list_List_1 branch_List_68;
				bool branch_Bool_69;
				switch ((v64).tag) {
					case std_maybe_Maybe_1_Some: {
						VAL v70 = mtp_std_maybe_Maybe_1_Some(v64);
						incref(v70);
						struct mirth_match_Pattern* v71 = V_mirth_match_Case(v70)->mpattern;
						incref(MK_mirth_match_Pattern(v71));
						decref(MK_mirth_match_Case(V_mirth_match_Case(v70)));
						struct std_maybe_Maybe_1 v72 = mw_mirth_match_Pattern_singlezetagzy(v71);
						uint64_t branch_Data_73;
						struct mirth_mirth_zaMirth* branch_zaMirth_74;
						bool branch_Bool_75;
						switch ((v72).tag) {
							case std_maybe_Maybe_1_Some: {
								VAL v76 = mtp_std_maybe_Maybe_1_Some(v72);
								incref(v59);
								struct mirth_mirth_zaMirth* v77;
								uint64_t v78 = mw_mirth_data_Tag_data(r58, V_mirth_data_Tag(v76), &v77);
								uint64_t v79 = v78;
								uint64_t v80 = V_mirth_data_Data(v59);
								bool v81 = (v79 == v80);
								branch_Bool_75 = v81;
								branch_zaMirth_74 = v77;
								branch_Data_73 = V_mirth_data_Data(v59);
							} break;
							case std_maybe_Maybe_1_None: {
								bool v82 = false;
								branch_Bool_75 = v82;
								branch_zaMirth_74 = r58;
								branch_Data_73 = V_mirth_data_Data(v59);
							} break;
							default: {
								do_panic(str_make("unexpected fallthrough in match\n", 32));
							}
						}
						bool v83 = !branch_Bool_75;
						uint64_t branch_Data_84;
						struct mirth_mirth_zaMirth* branch_zaMirth_85;
						struct std_maybe_Maybe_1 branch_Maybe_86;
						if (v83) {
							struct std_maybe_Maybe_1 v87 = mtw_std_maybe_Maybe_1_Some(v70);
							branch_Maybe_86 = v87;
							branch_zaMirth_85 = branch_zaMirth_74;
							branch_Data_84 = branch_Data_73;
						} else {
							decref(v70);
							struct std_maybe_Maybe_1 v88 = { .tag=std_maybe_Maybe_1_None };
							branch_Maybe_86 = v88;
							branch_zaMirth_85 = branch_zaMirth_74;
							branch_Data_84 = branch_Data_73;
						}
						uint64_t branch_Data_89;
						struct mirth_mirth_zaMirth* branch_zaMirth_90;
						struct std_maybe_Maybe_1 branch_Maybe_91;
						struct std_list_List_1 branch_List_92;
						switch ((branch_Maybe_86).tag) {
							case std_maybe_Maybe_1_None: {
								branch_List_92 = v63;
								branch_Maybe_91 = v60;
								branch_zaMirth_90 = branch_zaMirth_85;
								branch_Data_89 = branch_Data_84;
							} break;
							default: {
								decref(MK_std_list_List_1(v63));
								decref(MK_std_maybe_Maybe_1(v60));
								struct std_list_List_1 v93 = { .tag=std_list_List_1_Nil };
								branch_List_92 = v93;
								branch_Maybe_91 = branch_Maybe_86;
								branch_zaMirth_90 = branch_zaMirth_85;
								branch_Data_89 = branch_Data_84;
							} break;
						}
						bool v94 = true;
						branch_Bool_69 = v94;
						branch_List_68 = branch_List_92;
						branch_Maybe_67 = branch_Maybe_91;
						branch_zaMirth_66 = branch_zaMirth_90;
						branch_Data_65 = branch_Data_89;
					} break;
					case std_maybe_Maybe_1_None: {
						bool v95 = false;
						branch_Bool_69 = v95;
						branch_List_68 = v63;
						branch_Maybe_67 = v60;
						branch_zaMirth_66 = r58;
						branch_Data_65 = V_mirth_data_Data(v59);
					} break;
					default: {
						do_panic(str_make("unexpected fallthrough in match\n", 32));
					}
				}
				v57 = branch_Bool_69;
				v56 = branch_Bool_69;
				v55 = branch_List_68;
				v54 = branch_Maybe_67;
				v53 = MK_mirth_data_Data(branch_Data_65);
				r52 = branch_zaMirth_66;
			}
			decref(MK_std_list_List_1(v55));
			int64_t v96 = (v54).tag;
			decref(MK_std_maybe_Maybe_1(v54));
			INT v97 = WRAP_I63(0LL);
			INT v98 = v97;
			INT v99 = i64_to_int(v96);
			bool v100 = int_eq(v99, v98);
			struct mirth_mirth_zaMirth* branch_zaMirth_101;
			struct std_maybe_Maybe_1 branch_Maybe_102;
			if (v100) {
				struct std_maybe_Maybe_1 v103 = mtw_std_maybe_Maybe_1_Some(v53);
				branch_Maybe_102 = v103;
				branch_zaMirth_101 = r52;
			} else {
				decref(v53);
				struct std_maybe_Maybe_1 v104 = { .tag=std_maybe_Maybe_1_None };
				branch_Maybe_102 = v104;
				branch_zaMirth_101 = r52;
			}
			branch_Maybe_48 = branch_Maybe_102;
			branch_zaMirth_47 = branch_zaMirth_101;
		} break;
		case std_maybe_Maybe_1_None: {
			decref(MK_std_list_List_1(v33));
			struct std_maybe_Maybe_1 v105 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_48 = v105;
			branch_zaMirth_47 = branch_zaMirth_40;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaMirth_3 = branch_zaMirth_47;
	return branch_Maybe_48;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, -0x50(%rbp)
movq %rdi, %r13
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
movl 0x58(%rsi), %r12d
movq 0x60(%rsi), %r14
movq %r14, %rax
andq %rdi, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x50b38
incl (%rax)
movq %rsi, %rax
andq %rdi, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x50b62
decl (%rax)
jne 0x50b62
leaq 0xc1b1a(%rip), %rax     # 0x112671
movq %rsi, %rdi
movq %rax, %rsi
callq 0xd13d
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd01b
movl %eax, %ebx
movq %rdx, %r15
cmpl $0x1, %r12d
jne 0x50c20
movq %r14, %rdi
leaq -0x68(%rbp), %rsi
callq 0xd0aa
movq %rax, %r12
movq %rdx, %r14
movq %r13, %rdi
testb $0x1, %r14b
je 0x50bde
movq %r12, %r13
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r13
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x50bde
incl (%r13)
movq %r12, %rsi
leaq -0x58(%rbp), %rdx
callq 0x510a9
testb %al, %al
je 0x50bee
decl (%r13)
jne 0x50c0f
movq %r12, %rdi
movq %r14, %rsi
callq 0xd13d
jmp 0x50c0f
movq %r12, %rsi
leaq -0x58(%rbp), %rdx
callq 0x510a9
testb %al, %al
jne 0x50c0f
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r15, %rcx
leaq -0x88(%rbp), %r8
callq 0x949e
movl -0x88(%rbp), %ebx
movq -0x80(%rbp), %r15
movq -0x58(%rbp), %r13
movl -0x68(%rbp), %r12d
movq -0x60(%rbp), %r14
jmp 0x50b74
movq %r13, -0x48(%rbp)
testl %r12d, %r12d
jne 0x51079
xorl %edi, %edi
xorl %esi, %esi
movl %ebx, %edx
movq %r15, %rcx
callq 0xd01b
movl %eax, %r13d
movq %rdx, %r12
movq %rdx, %r15
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %rax, %r15
setne %al
testb $0x3, %r12b
sete %r14b
andb %al, %r14b
cmpb $0x1, %r14b
jne 0x50c68
incl (%r15)
movl %r13d, %edi
movq %r12, %rsi
callq 0x2cae6
testl %eax, %eax
je 0x50f84
cmpl $0x1, %eax
jne 0x51079
movq %rdx, %rdi
callq 0xd745
movq %rax, %rdi
movq 0x8(%rax), %rbx
movq 0x10(%rax), %r8
testb $0x1, %r8b
je 0x50cbe
movq %rbx, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %bl
setne %sil
orb %dl, %sil
jne 0x50cbe
incl (%rcx)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x50cf1
decl (%rax)
jne 0x50cf1
leaq 0xc11ad(%rip), %rsi     # 0x111e91
movq %r8, -0x38(%rbp)
callq 0xd13d
movq -0x38(%rbp), %r8
movq %rbx, %rdi
movq %r8, %rsi
callq 0x9353
movq %rdx, %rdi
callq 0xd745
movq 0x8(%rax), %rbx
movq %rbx, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %bl
setne %sil
orb %dl, %sil
jne 0x50d29
incl (%rcx)
movq %rax, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x50d5a
decl (%rcx)
jne 0x50d5a
movq %rax, %rdi
leaq 0xc18d4(%rip), %rsi     # 0x112629
callq 0xd13d
movq %rbx, %rdi
callq 0x513f9
testl %eax, %eax
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
je 0x50f84
cmpl $0x1, %eax
jne 0x51079
movq %rdx, %rdi
callq 0xd745
leaq 0x10c3e54(%rip), %rdi   # 0x1114be0
movq %rax, %rsi
callq 0x13c85
movq %rax, %rdi
callq 0x13d82
leaq 0xc0ef5(%rip), %rsi     # 0x111c98
movq %rax, %rdi
callq 0x9353
movq %rdx, %rdi
callq 0xd745
movq %rax, %rcx
andq %rbx, %rcx
movq %rcx, -0x78(%rbp)
sete %cl
movq %rax, -0x70(%rbp)
testb $0x3, %al
setne %al
orb %cl, %al
movb %al, -0x29(%rbp)
testb $0x1, %dl
sete %r14b
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movl %r13d, %edi
movq %r12, %rsi
leaq -0x68(%rbp), %rdx
callq 0x111eb
cmpl $0x1, %eax
jne 0x50fc2
movb %r14b, -0x2a(%rbp)
movq %rdx, %rdi
callq 0xd745
movq %rax, %r13
movq %rdx, %r12
movq %rax, %r15
testb $0x1, %r12b
je 0x50e2e
movq %r13, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x50e2e
incl (%rax)
movq 0x8(%r15), %r14
movq %r14, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x50e48
incl (%rax)
andq %rbx, %r13
sete %al
testb $0x3, %r15b
setne %bl
orb %al, %bl
jne 0x50e6e
decl (%r13)
jne 0x50e6e
movq %r15, %rdi
leaq 0xc17c0(%rip), %rsi     # 0x112629
callq 0xd13d
movq %r14, %rdi
callq 0x513f9
testl %eax, %eax
je 0x50eec
cmpl $0x1, %eax
jne 0x51079
movq %rdx, %rdi
callq 0xd745
movb -0x2a(%rbp), %cl
orb -0x29(%rbp), %cl
testb $0x1, %cl
jne 0x50e9c
movq -0x78(%rbp), %rcx
incl (%rcx)
leaq 0x10c3d3d(%rip), %rdi   # 0x1114be0
movq %rax, %rsi
callq 0x13c85
movq %rax, %rdi
callq 0x13d82
cmpq -0x70(%rbp), %rax
jne 0x50eec
testb $0x1, %r12b
sete %al
orb %bl, %al
jne 0x50ed5
decl (%r13)
jne 0x50ed5
movq %r15, %rdi
movq %r12, %rsi
callq 0xd13d
movl -0x68(%rbp), %r13d
movq -0x60(%rbp), %r12
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
jmp 0x50f7c
movq %r15, %rdi
movq %r12, %rsi
callq 0x9353
movq %rdx, %r14
movq -0x60(%rbp), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
andq %rbx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x50f36
movl -0x68(%rbp), %edi
decl (%rcx)
jne 0x50f36
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc0348(%rip), %rsi     # 0x111279
callq 0xd13d
movq -0x38(%rbp), %rsi
movq %rsi, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x50f69
decl (%rax)
jne 0x50f69
movq -0x40(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xc035d(%rip), %rsi     # 0x1112c1
callq 0xd13d
xorl %r13d, %r13d
movl $0x1, %eax
movq %rax, -0x40(%rbp)
movq %r14, -0x38(%rbp)
xorl %r12d, %r12d
movb $0x1, %r14b
jmp 0x50de5
testb %r14b, %r14b
je 0x50fa4
decl (%r15)
jne 0x50fa4
shlq $0x30, %r13
orq %r12, %r13
movq %r13, %rdi
leaq 0xc02da(%rip), %rsi     # 0x111279
callq 0xd13d
xorl %eax, %eax
xorl %edx, %edx
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %r15
movq %r15, (%r14)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x51079
movq -0x60(%rbp), %rax
movq %rax, %rcx
andq %rbx, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %r15
movq -0x38(%rbp), %r12
jne 0x51008
movl -0x68(%rbp), %edi
decl (%rcx)
jne 0x51008
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc0276(%rip), %rsi     # 0x111279
callq 0xd13d
movl -0x40(%rbp), %ebx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %r12, %rdx
sete %al
testb $0x3, %r12b
setne %cl
orb %al, %cl
jne 0x51040
decl (%rdx)
jne 0x51040
movq %rbx, %rdi
shlq $0x30, %rdi
orq %r12, %rdi
leaq 0xc0286(%rip), %rsi     # 0x1112c1
callq 0xd13d
leaq 0x1(,%rbx,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x5105f
xorl %eax, %eax
xorl %edx, %edx
jmp 0x50fb0
leaq 0xc0c32(%rip), %rsi     # 0x111c98
movq -0x70(%rbp), %rdi
callq 0x9353
movl $0x1, %eax
jmp 0x50fb0
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x8f63b(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x8f640(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302