// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_map_Map_2_lookup_sp3
static struct std_maybe_Maybe_1 mw_std_map_Map_2_lookup_sp3 (uint64_t in_Var_1, struct std_list_List_1 in_Map_2) {
	struct std_maybe_Maybe_1 v4 = { .tag=std_maybe_Maybe_1_None };
	bool v5 = true;
	uint64_t v6 = in_Var_1;
	struct std_maybe_Maybe_1 v7 = v4;
	struct std_list_List_1 v8 = in_Map_2;
	bool v9 = v5;
	bool v10 = v5;
	while (v10) {
		uint64_t v11 = v6;
		struct std_maybe_Maybe_1 v12 = v7;
		struct std_list_List_1 v13 = v8;
		bool v14 = v9;
		struct std_list_List_1 v15;
		struct std_maybe_Maybe_1 v16 = mw_std_list_List_1_uncons(v13, &v15);
		uint64_t branch_Var_17;
		struct std_maybe_Maybe_1 branch_Maybe_18;
		struct std_list_List_1 branch_List_19;
		bool branch_Bool_20;
		switch ((v16).tag) {
			case std_maybe_Maybe_1_Some: {
				VAL v21 = mtp_std_maybe_Maybe_1_Some(v16);
				incref(v21);
				VAL v22 = V_std_map_KeyValuePair_2(v21)->mkey;
				incref(v22);
				decref(MK_std_map_KeyValuePair_2(V_std_map_KeyValuePair_2(v21)));
				uint64_t v23 = V_mirth_var_Var(v22);
				uint64_t v24 = v11;
				bool v25 = (v23 == v24);
				uint64_t branch_Var_26;
				struct std_maybe_Maybe_1 branch_Maybe_27;
				if (v25) {
					struct std_maybe_Maybe_1 v28 = mtw_std_maybe_Maybe_1_Some(v21);
					branch_Maybe_27 = v28;
					branch_Var_26 = v11;
				} else {
					decref(v21);
					struct std_maybe_Maybe_1 v29 = { .tag=std_maybe_Maybe_1_None };
					branch_Maybe_27 = v29;
					branch_Var_26 = v11;
				}
				uint64_t branch_Var_30;
				struct std_maybe_Maybe_1 branch_Maybe_31;
				struct std_list_List_1 branch_List_32;
				switch ((branch_Maybe_27).tag) {
					case std_maybe_Maybe_1_None: {
						branch_List_32 = v15;
						branch_Maybe_31 = v12;
						branch_Var_30 = branch_Var_26;
					} break;
					default: {
						decref(MK_std_list_List_1(v15));
						decref(MK_std_maybe_Maybe_1(v12));
						struct std_list_List_1 v33 = { .tag=std_list_List_1_Nil };
						branch_List_32 = v33;
						branch_Maybe_31 = branch_Maybe_27;
						branch_Var_30 = branch_Var_26;
					} break;
				}
				bool v34 = true;
				branch_Bool_20 = v34;
				branch_List_19 = branch_List_32;
				branch_Maybe_18 = branch_Maybe_31;
				branch_Var_17 = branch_Var_30;
			} break;
			case std_maybe_Maybe_1_None: {
				bool v35 = false;
				branch_Bool_20 = v35;
				branch_List_19 = v15;
				branch_Maybe_18 = v12;
				branch_Var_17 = v11;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v10 = branch_Bool_20;
		v9 = branch_Bool_20;
		v8 = branch_List_19;
		v7 = branch_Maybe_18;
		v6 = branch_Var_17;
	}
	decref(MK_std_list_List_1(v8));
	struct std_maybe_Maybe_1 v36 = mw_std_maybe_Maybe_1_map_1_sp18(v7);
	return v36;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x50(%rbp)
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl %esi, %edi
movq %rdx, %rsi
leaq -0x48(%rbp), %rdx
callq 0x111eb
cmpl $0x1, %eax
jne 0x420f2
movq %rdx, %rdi
callq 0xd745
movq %rax, %rbx
movq %rdx, %r13
movq %rax, %r15
testb $0x1, %r13b
je 0x41fdd
movq %rbx, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x41fdd
incl (%rax)
movq 0x8(%r15), %r14
testb $0x1, 0x10(%r15)
je 0x41ffe
movq %r14, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r14b
setne %dl
orb %cl, %dl
jne 0x41ffe
incl (%rax)
andq %r12, %rbx
sete %al
testb $0x3, %r15b
setne %r12b
orb %al, %r12b
jne 0x42024
decl (%rbx)
jne 0x42024
movq %r15, %rdi
leaq 0xd04a2(%rip), %rsi     # 0x1124c1
callq 0xd13d
cmpq -0x50(%rbp), %r14
jne 0x420c1
movq %r15, %rdi
movq %r13, %rsi
callq 0x9353
movq %rdx, %rbx
movq -0x40(%rbp), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
andq %r12, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x42078
movl -0x48(%rbp), %edi
decl (%rcx)
jne 0x42078
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xcf206(%rip), %rsi     # 0x111279
callq 0xd13d
movq -0x30(%rbp), %rsi
movq %rsi, %rax
andq %r12, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x420ab
decl (%rax)
jne 0x420ab
movq -0x38(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xcf21b(%rip), %rsi     # 0x1112c1
callq 0xd13d
xorl %esi, %esi
movl $0x1, %eax
movq %rax, -0x38(%rbp)
movq %rbx, -0x30(%rbp)
xorl %edx, %edx
jmp 0x41f99
testb $0x1, %r13b
sete %al
orb %r12b, %al
jne 0x420dc
decl (%rbx)
jne 0x420dc
movq %r15, %rdi
movq %r13, %rsi
callq 0xd13d
movl -0x48(%rbp), %esi
movq -0x40(%rbp), %rdx
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
jmp 0x41f99
testl %eax, %eax
jne 0x42141
movq -0x40(%rbp), %rax
andq %rax, %r12
sete %cl
testb $0x3, %al
setne %dl
orb %cl, %dl
movq -0x30(%rbp), %rsi
jne 0x4212d
movl -0x48(%rbp), %edi
decl (%r12)
jne 0x4212d
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xcf155(%rip), %rsi     # 0x111279
callq 0xd13d
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42171
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x9e573(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x9e578(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302