// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_input_zaInputOpenState_refillzebufferzx
static void mw_std_input_zaInputOpenState_refillzebufferzx (struct std_input_zaInputOpenState* in_zaInputOpenState_1, struct std_input_zaInput *out_zaInput_2) {
	ARR* r3 = in_zaInputOpenState_1->mzabuffer;
	ARR* v4;
	void* v5 = mw_std_buffer_zaBuffer_base(r3, &v4);
	ARR* v6;
	INT v7 = mw_std_buffer_zaBuffer_sizze(v4, &v6);
	in_zaInputOpenState_1->mzabuffer = v6;
	struct std_file_zaFile* r8 = in_zaInputOpenState_1->mzafile;
	struct std_file_zaFile* v9;
	struct std_result_Result_2 v10 = mw_std_file_zaFile_readzebyteszx(r8, v5, v7, &v9);
	in_zaInputOpenState_1->mzafile = v9;
	struct std_maybe_Maybe_1 v11 = mw_std_result_Result_2_okzy(v10);
	struct std_maybe_Maybe_1 branch_Maybe_12;
	switch ((v11).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v13 = mtp_std_maybe_Maybe_1_Some(v11);
			incref(v13);
			INT v14 = WRAP_I63(0LL);
			INT v15 = v14;
			bool v16 = int_lt(v15, value_int(v13));
			struct std_maybe_Maybe_1 branch_Maybe_17;
			if (v16) {
				struct std_maybe_Maybe_1 v18 = mtw_std_maybe_Maybe_1_Some(v13);
				branch_Maybe_17 = v18;
			} else {
				decref(v13);
				struct std_maybe_Maybe_1 v19 = { .tag=std_maybe_Maybe_1_None };
				branch_Maybe_17 = v19;
			}
			branch_Maybe_12 = branch_Maybe_17;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_maybe_Maybe_1 v20 = { .tag=std_maybe_Maybe_1_None };
			branch_Maybe_12 = v20;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct std_input_zaInput branch_zaInput_21;
	switch ((branch_Maybe_12).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v22 = mtp_std_maybe_Maybe_1_Some(branch_Maybe_12);
			INT v23 = in_zaInputOpenState_1->mlength;
			decref(MKINT(v23));
			in_zaInputOpenState_1->mlength = value_int(v22);
			INT v24 = WRAP_I63(0LL);
			INT v25 = in_zaInputOpenState_1->moffset;
			decref(MKINT(v25));
			in_zaInputOpenState_1->moffset = v24;
			struct std_input_zaInput v26;
			mtw_std_input_zaInput_Open(in_zaInputOpenState_1, &v26);
			branch_zaInput_21 = v26;
		} break;
		case std_maybe_Maybe_1_None: {
			struct std_file_zaFile* v27;
			mw_std_input_zaInputOpenState_endzx(in_zaInputOpenState_1, &v27);
			struct std_input_zaInput v28;
			mtw_std_input_zaInput_Done(v27, &v28);
			branch_zaInput_21 = v28;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_zaInput_2 = branch_zaInput_21;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x33730
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x33770
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x1b3b80
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
callq 0x1b4010
movl %eax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x1f4(%rbp)
testl %eax, %eax
je 0x1b37b4
jmp 0x1b35f7
movl -0x1f4(%rbp), %eax
subl $0x1, %eax
jne 0x1b37df
jmp 0x1b3608
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x174a0
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x80(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b366d
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x1b366d
movq -0x88(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b366d
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1b366f
movq 0x1bb3da(%rip), %rax    # 0x36ea50
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x2ac40
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0xae20
andb $0x1, %al
movb %al, -0x99(%rbp)
testb $0x1, -0x99(%rbp)
je 0x1b3704
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xca10
movl %eax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x1b379c
jmp 0x1b3706
movq -0x80(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b376b
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x1b376b
movq -0x88(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b376b
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x88(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b3769
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x127c0
jmp 0x1b376b
jmp 0x1b376d
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0xd8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x1b37f8
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
movq -0xe8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x1b37f8
leaq 0x1a069b(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movl -0x78(%rbp), %eax
movl %eax, -0x1f8(%rbp)
testl %eax, %eax
je 0x1b3b01
jmp 0x1b380b
movl -0x1f8(%rbp), %eax
subl $0x1, %eax
jne 0x1b3b42
jmp 0x1b381c
movl -0x78(%rbp), %edi
movq -0x70(%rbp), %rsi
callq 0x174a0
movq %rax, -0x108(%rbp)
movq %rdx, -0x100(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq 0x1ddbcf(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b3957
movq -0x110(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq 0x1ddb9a(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x128(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x130(%rbp), %rax
cmpq $0x0, %rax
je 0x1b3957
movq -0x110(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq 0x1ddb5f(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x138(%rbp)
movq -0x140(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b3957
movq -0x110(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq 0x1ddb2e(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x148(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x150(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b3955
movq -0x110(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq 0x1ddaf1(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x158(%rbp)
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x127c0
jmp 0x1b3957
jmp 0x1b3959
movq -0x8(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x2ac40
movq %rax, %rcx
movq -0x200(%rbp), %rax
movq %rcx, -0x168(%rbp)
movq -0x168(%rbp), %rcx
movq %rcx, (%rax)
movq 0x1bb0b7(%rip), %rax    # 0x36ea50
movq %rax, -0x170(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq 0x1dda64(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1b3ac2
movq -0x178(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq 0x1dda2f(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x190(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x198(%rbp), %rax
cmpq $0x0, %rax
je 0x1b3ac2
movq -0x178(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq 0x1dd9f4(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1b3ac2
movq -0x178(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x1dd9c3(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x1b0(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x1b8(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1b3ac0
movq -0x178(%rbp), %rax
movq %rax, -0x1c8(%rbp)
leaq 0x1dd986(%rip), %rax    # 0x391428
orq $0x1, %rax
movq %rax, -0x1c0(%rbp)
movq -0x1c8(%rbp), %rdi
movq -0x1c0(%rbp), %rsi
callq 0x127c0
jmp 0x1b3ac2
jmp 0x1b3ac4
movq -0x8(%rbp), %rax
movq -0x170(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x1b4130
movq -0x1d8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x1b3b5b
movq -0x8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x1b41c0
movq -0x1e0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x1b43f0
movq -0x1f0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x1b3b5b
leaq 0x1a0338(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x10(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xf0(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
nopl (%rax)