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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x21fc90
movl %eax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x364(%rbp)
testl %eax, %eax
je 0x2186d8
jmp 0x217df2
movl -0x364(%rbp), %eax
subl $0x1, %eax
jne 0x218740
jmp 0x217e03
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x174a0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x179332(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x217eb8
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x17930d(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x58(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x60(%rbp), %rax
cmpq $0x0, %rax
je 0x217eb8
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x1792e2(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x217eb8
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x1792bd(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x78(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x80(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x217eba
movq 0x156c3f(%rip), %rax    # 0x36eb00
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0xc6c0
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0x17926b(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x217fa4
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq 0x179239(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xa8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xb0(%rbp), %rax
cmpq $0x0, %rax
je 0x217fa4
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq 0x179205(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x217fa4
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq 0x1791d7(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xc8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xd0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x217fa6
jmp 0x217fa8
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq 0x17919e(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x218071
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq 0x17916c(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xe8(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xf0(%rbp), %rax
cmpq $0x0, %rax
je 0x218071
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq 0x179138(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xf8(%rbp)
movq -0x100(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x218071
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq 0x17910a(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x108(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x110(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x218073
movq -0x8(%rbp), %rdi
callq 0x1be20
movq %rax, -0x118(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1b3f0
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
callq 0x1b520
movq %rax, -0x128(%rbp)
movq -0x118(%rbp), %rsi
movq -0x128(%rbp), %rdi
callq 0x1b0ed0
movb %al, -0x129(%rbp)
movq 0x15698a(%rip), %rax    # 0x36ea50
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x140(%rbp)
movzbl -0x129(%rbp), %eax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
callq 0x1b520
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rdi
movq -0x140(%rbp), %rsi
callq 0x194b0
andb $0x1, %al
movb %al, -0x151(%rbp)
testb $0x1, -0x151(%rbp)
je 0x218125
jmp 0x21823c
jmp 0x218127
cmpq $0x0, 0x117e8a9(%rip)   # 0x13969d8
jne 0x218149
leaq 0x143827(%rip), %rdi    # 0x35b95f
movl $0x38, %esi
callq 0xb6c0
movq %rax, 0x117e88f(%rip)   # 0x13969d8
jmp 0x21814b
movq 0x117e886(%rip), %rax   # 0x13969d8
movq %rax, -0x170(%rbp)
leaq 0x178ff8(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x218220
movq 0x117e851(%rip), %rax   # 0x13969d8
movq %rax, -0x180(%rbp)
leaq 0x178fc3(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x178(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x180(%rbp), %rax
cmpq $0x0, %rax
je 0x218220
movq 0x117e81a(%rip), %rax   # 0x13969d8
movq %rax, -0x190(%rbp)
leaq 0x178f8c(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x188(%rbp)
movq -0x190(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x218220
movq 0x117e7e9(%rip), %rax   # 0x13969d8
movq %rax, -0x1a0(%rbp)
leaq 0x178f5b(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x198(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x1a0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x218222
movq 0x117e7af(%rip), %rax   # 0x13969d8
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
callq 0xc620
movq -0x118(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1b10e0
movq -0x370(%rbp), %rdi
movq %rax, %rsi
movq -0x90(%rbp), %rdx
callq 0x1b0f10
movq %rax, -0x1a8(%rbp)
movq 0x1567d5(%rip), %rax    # 0x36ea50
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1a8(%rbp), %rdi
callq 0x1a290
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
callq 0xae20
andb $0x1, %al
movb %al, -0x1c1(%rbp)
testb $0x1, -0x1c1(%rbp)
je 0x2182f8
leaq -0x1e8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0x1e8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x21834a
movq -0x1a8(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq 0x178dab(%rip), %rax    # 0x3910b8
movq %rax, -0x200(%rbp)
movq -0x208(%rbp), %rdi
movq -0x200(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
callq 0x1b0f60
movq -0x1f8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x21834c
movq -0x8(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq 0x178dfa(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x218450
movq -0x8(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq 0x178dc8(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x220(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x228(%rbp), %rax
cmpq $0x0, %rax
je 0x218450
movq -0x8(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq 0x178d90(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x218450
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq 0x178d62(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x240(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x248(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x21844e
movq -0x8(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq 0x178d28(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x250(%rbp)
movq -0x258(%rbp), %rdi
movq -0x250(%rbp), %rsi
callq 0x127c0
jmp 0x218450
jmp 0x218452
movl -0x1d8(%rbp), %eax
movl %eax, -0x374(%rbp)
testl %eax, %eax
je 0x218623
jmp 0x218468
movl -0x374(%rbp), %eax
subl $0x1, %eax
jne 0x2186a4
jmp 0x218479
movl -0x1d8(%rbp), %edi
movq -0x1d0(%rbp), %rsi
leaq -0x278(%rbp), %rdx
callq 0x1b1000
movq -0x8(%rbp), %rax
movq %rax, -0x288(%rbp)
leaq 0x178cb4(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x218596
movq -0x8(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq 0x178c82(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x290(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x298(%rbp), %rax
cmpq $0x0, %rax
je 0x218596
movq -0x8(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq 0x178c4a(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x2a0(%rbp)
movq -0x2a8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x218596
movq -0x8(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq 0x178c1c(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x2b0(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x2b8(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x218594
movq -0x8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
leaq 0x178be2(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x2c0(%rbp)
movq -0x2c8(%rbp), %rdi
movq -0x2c0(%rbp), %rsi
callq 0x127c0
jmp 0x218596
jmp 0x218598
movb $0x1, -0x2c9(%rbp)
movq -0x278(%rbp), %rdi
movq -0x270(%rbp), %rsi
callq 0x1b10e0
movq %rax, %rdi
movb -0x2c9(%rbp), %al
leaq -0x2d8(%rbp), %rdx
andb $0x1, %al
movzbl %al, %esi
callq 0x1b1050
movq -0x2d8(%rbp), %rax
movq %rax, -0x2f8(%rbp)
leaq 0x17a677(%rip), %rax    # 0x392c58
movq %rax, -0x2f0(%rbp)
movq -0x2f8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
leaq -0x2e8(%rbp), %rdx
callq 0x1b1140
movq -0x2e8(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x2e0(%rbp), %rax
movq %rax, -0x260(%rbp)
jmp 0x2186bd
callq 0x1b11e0
movq %rax, -0x300(%rbp)
movq -0x8(%rbp), %rdi
movq -0x300(%rbp), %rsi
callq 0x21fe50
movl %eax, -0x310(%rbp)
movq %rdx, -0x308(%rbp)
movl -0x310(%rbp), %edi
movq -0x308(%rbp), %rsi
callq 0x1b1340
movq %rax, -0x330(%rbp)
movq %rdx, -0x328(%rbp)
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rsi
leaq -0x320(%rbp), %rdx
callq 0x1b12a0
movq -0x320(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x318(%rbp), %rax
movq %rax, -0x260(%rbp)
jmp 0x2186bd
leaq 0x13b7d6(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x268(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x260(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x218759
movq -0x8(%rbp), %rdi
callq 0x21fef0
movl %eax, -0x340(%rbp)
movq %rdx, -0x338(%rbp)
movl -0x340(%rbp), %edi
movq -0x338(%rbp), %rsi
callq 0x1b1340
movq %rax, -0x360(%rbp)
movq %rdx, -0x358(%rbp)
movq -0x360(%rbp), %rdi
movq -0x358(%rbp), %rsi
leaq -0x350(%rbp), %rdx
callq 0x1b12a0
movq -0x350(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x218759
leaq 0x13b73a(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
nopw %cs:(%rax,%rax)