// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_prim_zaWorld_openzefilezx
static void mw_std_prim_zaWorld_openzefilezx (STR* in_Path_1, struct std_result_zaResult_2 *out_zaResult_2) {
	incref(MKSTR(in_Path_1));
	int64_t v5 = mw_std_posix_OpenFlags_None();
	INT v6 = WRAP_I63(0LL);
	int64_t v7 = int_to_i64(v6);
	incref(MKSTR(in_Path_1));
	incref(MKSTR(in_Path_1));
	void* v8 = str_base(in_Path_1);
	uint64_t v9 = str_size(in_Path_1);
	INT v10 = u64_to_int(v9);
	uint8_t v11 = mw_std_prelude_unsafe_1_sp12(v10, v8);
	INT v12 = WRAP_I63(0LL);
	INT v13 = v12;
	uint64_t v14 = (uint64_t)(v11);
	INT v15 = u64_to_int(v14);
	bool v16 = int_eq(v15, v13);
	if (v16) {
	} else {
		STR* v17;
		STRLIT(v17, "tried to use Str as CStr, but Str is not zero terminated", 56);
		do_panic(v17);
	}
	int64_t v18 = mext_std_prim_zaWorld_rawzeposixzeopenzx(v8, v5, v7);
	INT v19 = WRAP_I63(0LL);
	INT v20 = v19;
	INT v21 = i64_to_int(v18);
	bool v22 = int_lt(v21, v20);
	struct std_maybe_zaMaybe_1 branch_zaMaybe_23;
	if (v22) {
		struct std_maybe_zaMaybe_1 v24 = { .tag=std_maybe_zaMaybe_1_zaNone };
		branch_zaMaybe_23 = v24;
	} else {
		struct std_maybe_zaMaybe_1 v25;
		mtw_std_maybe_zaMaybe_1_zaSome(MKI64(v18), &v25);
		branch_zaMaybe_23 = v25;
	}
	decref(MKSTR(in_Path_1));
	struct std_result_zaResult_2 branch_zaResult_26;
	switch ((branch_zaMaybe_23).tag) {
		case std_maybe_zaMaybe_1_zaSome: {
			VAL v27;
			mtp_std_maybe_zaMaybe_1_zaSome(branch_zaMaybe_23, &v27);
			decref(MKSTR(in_Path_1));
			bool v28 = true;
			struct std_file_zaFile* v29;
			mtw_std_file_zaFile_zaFile(value_i64(v27), v28, &v29);
			struct std_result_zaResult_2 v30;
			mtw_std_result_zaResult_2_zaOk(MK_std_file_zaFile(v29), &v30);
			branch_zaResult_26 = v30;
		} break;
		case std_maybe_zaMaybe_1_zaNone: {
			int64_t v31 = mw_std_prelude_unsafe_1_sp1();
			struct std_file_IOError v32 = mtw_std_file_IOError_OpenFailed(in_Path_1, v31);
			struct std_result_zaResult_2 v33;
			mtw_std_result_zaResult_2_zaErr(MK_std_file_IOError(v32), &v33);
			branch_zaResult_26 = v33;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaResult_2 = branch_zaResult_26;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x1e0e16(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b03d4
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x1e0df1(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x28(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x30(%rbp), %rax
cmpq $0x0, %rax
je 0x1b03d4
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x1e0dc6(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b03d4
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x1e0da1(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x48(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x50(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b03d6
callq 0x1b0ea0
movq %rax, -0x58(%rbp)
movq 0x1be66a(%rip), %rax    # 0x36ea50
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc6c0
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq 0x1e0d52(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b04b4
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x1e0d26(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x80(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x1b04b4
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x1e0cf5(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b04b4
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x1e0cc7(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xa0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xa8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b04b6
jmp 0x1b04b8
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x1e0c8e(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b0581
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq 0x1e0c5c(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xc0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xc8(%rbp), %rax
cmpq $0x0, %rax
je 0x1b0581
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq 0x1e0c28(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xd0(%rbp)
movq -0xd8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b0581
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq 0x1e0bfa(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xe0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xe8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b0583
movq -0x8(%rbp), %rdi
callq 0x1be20
movq %rax, -0xf0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1b3f0
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x1b520
movq %rax, -0x100(%rbp)
movq -0xf0(%rbp), %rsi
movq -0x100(%rbp), %rdi
callq 0x1b0ed0
movb %al, -0x101(%rbp)
movq 0x1be47a(%rip), %rax    # 0x36ea50
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x118(%rbp)
movzbl -0x101(%rbp), %eax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
callq 0x1b520
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
movq -0x118(%rbp), %rsi
callq 0x194b0
andb $0x1, %al
movb %al, -0x129(%rbp)
testb $0x1, -0x129(%rbp)
je 0x1b0635
jmp 0x1b074c
jmp 0x1b0637
cmpq $0x0, 0x11e5e71(%rip)   # 0x13964b0
jne 0x1b0659
leaq 0x1ab317(%rip), %rdi    # 0x35b95f
movl $0x38, %esi
callq 0xb6c0
movq %rax, 0x11e5e57(%rip)   # 0x13964b0
jmp 0x1b065b
movq 0x11e5e4e(%rip), %rax   # 0x13964b0
movq %rax, -0x148(%rbp)
leaq 0x1e0ae8(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b0730
movq 0x11e5e19(%rip), %rax   # 0x13964b0
movq %rax, -0x158(%rbp)
leaq 0x1e0ab3(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x150(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x158(%rbp), %rax
cmpq $0x0, %rax
je 0x1b0730
movq 0x11e5de2(%rip), %rax   # 0x13964b0
movq %rax, -0x168(%rbp)
leaq 0x1e0a7c(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x160(%rbp)
movq -0x168(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b0730
movq 0x11e5db1(%rip), %rax   # 0x13964b0
movq %rax, -0x178(%rbp)
leaq 0x1e0a4b(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x170(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x178(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b0732
movq 0x11e5d77(%rip), %rax   # 0x13964b0
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
callq 0xc620
movq -0xf0(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x1b0f10
movq %rax, -0x180(%rbp)
movq 0x1be2e2(%rip), %rax    # 0x36ea50
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x180(%rbp), %rdi
callq 0x1a290
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rsi
callq 0xae20
andb $0x1, %al
movb %al, -0x199(%rbp)
testb $0x1, -0x199(%rbp)
je 0x1b07eb
leaq -0x1c0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x1c0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
jmp 0x1b083d
movq -0x180(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq 0x1e08b8(%rip), %rax    # 0x3910b8
movq %rax, -0x1d8(%rbp)
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
callq 0x1b0f60
movq -0x1d0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
jmp 0x1b083f
movq -0x8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq 0x1e0907(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b0943
movq -0x8(%rbp), %rax
movq %rax, -0x200(%rbp)
leaq 0x1e08d5(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x1f8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x200(%rbp), %rax
cmpq $0x0, %rax
je 0x1b0943
movq -0x8(%rbp), %rax
movq %rax, -0x210(%rbp)
leaq 0x1e089d(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x208(%rbp)
movq -0x210(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b0943
movq -0x8(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq 0x1e086f(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x218(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x220(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b0941
movq -0x8(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq 0x1e0835(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x228(%rbp)
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0x127c0
jmp 0x1b0943
jmp 0x1b0945
movl -0x1b0(%rbp), %eax
movl %eax, -0x30c(%rbp)
testl %eax, %eax
je 0x1b0b16
jmp 0x1b095b
movl -0x30c(%rbp), %eax
subl $0x1, %eax
jne 0x1b0b97
jmp 0x1b096c
movl -0x1b0(%rbp), %edi
movq -0x1a8(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0x1b1000
movq -0x8(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq 0x1e07c1(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b0a89
movq -0x8(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq 0x1e078f(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x268(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x270(%rbp), %rax
cmpq $0x0, %rax
je 0x1b0a89
movq -0x8(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq 0x1e0757(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x278(%rbp)
movq -0x280(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b0a89
movq -0x8(%rbp), %rax
movq %rax, -0x290(%rbp)
leaq 0x1e0729(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x288(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x290(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b0a87
movq -0x8(%rbp), %rax
movq %rax, -0x2a0(%rbp)
leaq 0x1e06ef(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x298(%rbp)
movq -0x2a0(%rbp), %rdi
movq -0x298(%rbp), %rsi
callq 0x127c0
jmp 0x1b0a89
jmp 0x1b0a8b
movb $0x1, -0x2a1(%rbp)
movq -0x250(%rbp), %rdi
movq -0x248(%rbp), %rsi
callq 0x1b10e0
movq %rax, %rdi
movb -0x2a1(%rbp), %al
leaq -0x2b0(%rbp), %rdx
andb $0x1, %al
movzbl %al, %esi
callq 0x1b1050
movq -0x2b0(%rbp), %rax
movq %rax, -0x2d0(%rbp)
leaq 0x1e2184(%rip), %rax    # 0x392c58
movq %rax, -0x2c8(%rbp)
movq -0x2d0(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
callq 0x1b1140
movq -0x2c0(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x238(%rbp)
jmp 0x1b0bb0
callq 0x1b11e0
movq %rax, -0x2d8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
callq 0x1b1200
movl %eax, -0x2e8(%rbp)
movq %rdx, -0x2e0(%rbp)
movl -0x2e8(%rbp), %edi
movq -0x2e0(%rbp), %rsi
callq 0x1b1340
movq %rax, -0x308(%rbp)
movq %rdx, -0x300(%rbp)
movq -0x308(%rbp), %rdi
movq -0x300(%rbp), %rsi
leaq -0x2f8(%rbp), %rdx
callq 0x1b12a0
movq -0x2f8(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x2f0(%rbp), %rax
movq %rax, -0x238(%rbp)
jmp 0x1b0bb0
leaq 0x1a32e3(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x10(%rbp), %rax
movq -0x240(%rbp), %rcx
movq %rcx, (%rax)
movq -0x238(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
nopw %cs:(%rax,%rax)