// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_file_zaFile_readzebyteszx
static struct std_result_Result_2 mw_std_file_zaFile_readzebyteszx (struct std_file_zaFile* in_zaFile_1, void* in_Ptr_2, INT in_Sizze_3, struct std_file_zaFile* *out_zaFile_4) {
	int64_t r8 = in_zaFile_1->mzafd;
	uint64_t v9 = int_to_u64(in_Sizze_3);
	int64_t v10;
	int64_t v11 = mext_std_prelude_zaUnsafe_rawzeposixzereadzx(r8, in_Ptr_2, v9, &v10);
	INT v12 = i64_to_int(v11);
	incref(MKINT(v12));
	INT v13 = WRAP_I63(0LL);
	INT v14 = v13;
	bool v15 = int_le(v14, v12);
	int64_t branch_zaFileDescriptor_16;
	struct std_result_Result_2 branch_Result_17;
	if (v15) {
		struct std_result_Result_2 v18 = mtw_std_result_Result_2_Ok(MKINT(v12));
		branch_Result_17 = v18;
		branch_zaFileDescriptor_16 = v10;
	} else {
		decref(MKINT(v12));
		int64_t v19 = mext_std_prelude_zaUnsafe_posixzeerrnozx();
		struct std_result_Result_2 v20 = mtw_std_result_Result_2_Err(MKI64(v19));
		branch_Result_17 = v20;
		branch_zaFileDescriptor_16 = v10;
	}
	in_zaFile_1->mzafd = branch_zaFileDescriptor_16;
	struct std_result_Result_2 branch_Result_21;
	switch ((branch_Result_17).tag) {
		case std_result_Result_2_Ok: {
			VAL v22 = mtp_std_result_Result_2_Ok(branch_Result_17);
			struct std_result_Result_2 v23 = mtw_std_result_Result_2_Ok(v22);
			branch_Result_21 = v23;
		} break;
		case std_result_Result_2_Err: {
			VAL v24 = mtp_std_result_Result_2_Err(branch_Result_17);
			struct std_file_IOError v25 = mtw_std_file_IOError_ReadFailed(value_i64(v24));
			struct std_result_Result_2 v26 = mtw_std_result_Result_2_Err(MK_std_file_IOError(v25));
			branch_Result_21 = v26;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaFile_4 = in_zaFile_1;
	return branch_Result_21;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdx, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1b680
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x1b4480
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1a290
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x1dd840(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b3c8d
movq -0x58(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq 0x1dd817(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x70(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x78(%rbp), %rax
cmpq $0x0, %rax
je 0x1b3c8d
movq -0x58(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x1dd7e9(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b3c8d
movq -0x58(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x1dd7be(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x90(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x98(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b3c8f
movq 0x1badba(%rip), %rax    # 0x36ea50
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x1c1b0
andb $0x1, %al
movb %al, -0xa9(%rbp)
testb $0x1, -0xa9(%rbp)
je 0x1b3d35
movq -0x58(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq 0x1dd74a(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0xe0(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0x29b40
movl %eax, -0xd8(%rbp)
movq %rdx, -0xd0(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x1b3eac
jmp 0x1b3d37
movq -0x58(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq 0x1dd6df(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b3e3b
movq -0x58(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq 0x1dd6ad(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x100(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x108(%rbp), %rax
cmpq $0x0, %rax
je 0x1b3e3b
movq -0x58(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq 0x1dd675(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x110(%rbp)
movq -0x118(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b3e3b
movq -0x58(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq 0x1dd647(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x120(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x128(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b3e39
movq -0x58(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq 0x1dd60d(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x130(%rbp)
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x127c0
jmp 0x1b3e3b
jmp 0x1b3e3d
callq 0x1b14d0
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq 0x1dd25a(%rip), %rax    # 0x3910b8
movq %rax, -0x158(%rbp)
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x29ab0
movl %eax, -0x150(%rbp)
movq %rdx, -0x148(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0xc8(%rbp), %eax
movl %eax, -0x1c4(%rbp)
testl %eax, %eax
je 0x1b3f38
jmp 0x1b3ecc
movl -0x1c4(%rbp), %eax
subl $0x1, %eax
jne 0x1b3fd8
jmp 0x1b3edd
movl -0xc8(%rbp), %edi
movq -0xc0(%rbp), %rsi
callq 0x7bf0
movq %rax, -0x170(%rbp)
movq %rdx, -0x168(%rbp)
movq -0x170(%rbp), %rdi
movq -0x168(%rbp), %rsi
callq 0x29b40
movl %eax, -0x180(%rbp)
movq %rdx, -0x178(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b3ff1
movl -0xc8(%rbp), %edi
movq -0xc0(%rbp), %rsi
callq 0xb610
movq %rax, -0x190(%rbp)
movq %rdx, -0x188(%rbp)
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x1b10e0
movq %rax, %rdi
callq 0x1b44e0
movl %eax, -0x1a0(%rbp)
movq %rdx, -0x198(%rbp)
movl -0x1a0(%rbp), %edi
movq -0x198(%rbp), %rsi
callq 0x1b1340
movq %rax, -0x1c0(%rbp)
movq %rdx, -0x1b8(%rbp)
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
callq 0x29ab0
movl %eax, -0x1b0(%rbp)
movq %rdx, -0x1a8(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b3ff1
leaq 0x19fea2(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax)