// File: /workspace/github_c_makefile_star2_O2/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, %r14   # imm = 0xFFFFFFFFFFFC
movq $0x0, -0x30(%rbp)
movb $0x1, %r12b
leaq -0x48(%rbp), %rbx
movq $0x0, -0x38(%rbp)
testb $0x1, %r12b
je 0x3e573
movl %esi, %edi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x1075d
testl %eax, %eax
je 0x3e52a
cmpl $0x1, %eax
jne 0x3e5b6
movq %rdx, %rdi
callq 0xd491
movq %rax, %r13
movq %rdx, %r12
movq %rax, %r15
testb $0x1, %r12b
je 0x3e440
movq %r13, %rax
andq %r14, %rax
sete %cl
testb $0x3, %r15b
setne %dl
orb %cl, %dl
jne 0x3e440
incl (%rax)
movq 0x8(%r15), %rbx
testb $0x1, 0x10(%r15)
je 0x3e460
movq %rbx, %rax
andq %r14, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x3e460
incl (%rax)
andq %r14, %r13
sete %al
testb $0x3, %r15b
setne %r14b
orb %al, %r14b
jne 0x3e488
decl (%r13)
jne 0x3e488
movq %r15, %rdi
leaq 0xcb03e(%rip), %rsi     # 0x1094c1
callq 0xce94
cmpq -0x50(%rbp), %rbx
jne 0x3e539
movq %r15, %rdi
movq %r12, %rsi
callq 0x8d0c
movq %rdx, %r15
movq -0x40(%rbp), %rax
movq %rax, %rcx
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
andq %r14, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
leaq -0x48(%rbp), %rbx
jne 0x3e4e0
movl -0x48(%rbp), %edi
decl (%rcx)
jne 0x3e4e0
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0xc9d9e(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x38(%rbp), %rsi
movq %rsi, %rax
andq %r14, %rax
sete %cl
testb $0x3, %sil
setne %dl
movb $0x1, %r12b
orb %cl, %dl
jne 0x3e516
decl (%rax)
jne 0x3e516
movq -0x30(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0xc9db0(%rip), %rsi     # 0x1082c1
callq 0xce94
xorl %esi, %esi
pushq $0x1
popq %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
xorl %edx, %edx
jmp 0x3e3eb
movl -0x48(%rbp), %esi
movq -0x40(%rbp), %rdx
xorl %r12d, %r12d
jmp 0x3e3eb
testb $0x1, %r12b
sete %al
orb %r14b, %al
leaq -0x48(%rbp), %rbx
jne 0x3e55a
decl (%r13)
jne 0x3e55a
movq %r15, %rdi
movq %r12, %rsi
callq 0xce94
movl -0x48(%rbp), %esi
movb $0x1, %r12b
movq -0x40(%rbp), %rdx
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
jmp 0x3e3eb
andq %rdx, %r14
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x3e59e
decl (%r14)
jne 0x3e59e
shlq $0x30, %rsi
orq %rdx, %rsi
movq %rsi, %rdi
leaq 0xc9ce0(%rip), %rsi     # 0x108279
callq 0xce94
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3e5cd
leaq 0x96250(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6