// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_output_zaOutput_put
static void mw_std_output_zaOutput_put (STR* in_Str_1, struct std_output_zaOutput* in_zaOutput_2, struct std_output_zaOutput* *out_zaOutput_3) {
	incref(MKSTR(in_Str_1));
	uint64_t v4 = str_size(in_Str_1);
	INT v5 = u64_to_int(v4);
	struct std_output_zaOutput* v6;
	INT v7 = mw_std_output_zaOutput_capacityzeremaining(in_zaOutput_2, &v6);
	bool v8 = int_lt(v7, v5);
	struct std_output_zaOutput* branch_zaOutput_9;
	if (v8) {
		struct std_output_zaOutput* v10;
		mw_std_output_zaOutput_flushzx(v6, &v10);
		incref(MKSTR(in_Str_1));
		uint64_t v11 = str_size(in_Str_1);
		INT v12 = u64_to_int(v11);
		struct std_output_zaOutput* v13;
		INT v14 = mw_std_output_zaOutput_capacityzetotal(v10, &v13);
		bool v15 = int_le(v14, v12);
		struct std_output_zaOutput* branch_zaOutput_16;
		if (v15) {
			incref(MKSTR(in_Str_1));
			incref(MKSTR(in_Str_1));
			void* v17 = str_base(in_Str_1);
			uint64_t v18 = str_size(in_Str_1);
			INT v19 = u64_to_int(v18);
			struct std_file_zaFile* r20 = v13->mzafile;
			struct std_file_zaFile* v21;
			struct std_result_Result_2 v22 = mw_std_prelude_unsafe_1_sp2(r20, v17, v19, &v21);
			v13->mzafile = v21;
			decref(MK_std_result_Result_2(v22));
			decref(MKSTR(in_Str_1));
			branch_zaOutput_16 = v13;
		} else {
			struct std_output_zaOutput* v23;
			mw_std_output_zaOutput_put(in_Str_1, v13, &v23);
			branch_zaOutput_16 = v23;
		}
		branch_zaOutput_9 = branch_zaOutput_16;
	} else {
		incref(MKSTR(in_Str_1));
		struct std_output_zaOutput* v24;
		INT v25 = mw_std_output_zaOutput_offset(v6, &v24);
		ARR* r26 = v24->mzabuffer;
		ARR* v27;
		mw_std_buffer_zaBuffer_strzx(r26, in_Str_1, v25, &v27);
		v24->mzabuffer = v27;
		uint64_t v28 = str_size(in_Str_1);
		INT v29 = u64_to_int(v28);
		INT v30 = v24->msizze;
		incref(MKINT(v30));
		INT v31 = int_add(v29, v30);
		INT v32 = v24->msizze;
		decref(MKINT(v32));
		v24->msizze = v31;
		branch_zaOutput_9 = v24;
	}
	*out_zaOutput_3 = branch_zaOutput_9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, %r15
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq %rdi, %r13
andq %r12, %r13
setne %al
testb $0x3, %dil
sete %r14b
andb %al, %r14b
cmpb $0x1, %r14b
jne 0x922de
incl (%r13)
movq %rdi, -0x30(%rbp)
callq 0xe36d
movq %rax, %rdi
callq 0xe3d6
movq %rax, %rbx
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x92598
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe83a
testl %eax, %eax
movq %r13, -0x38(%rbp)
js 0x9246f
testb %r14b, %r14b
je 0x9231e
incl (%r13)
movq -0x58(%rbp), %r15
movq (%r15), %r13
movq %r13, %rax
andq %r12, %rax
sete %cl
testb $0x3, %r13b
setne %dl
orb %cl, %dl
jne 0x9233b
incl (%rax)
movq 0x10(%r15), %rbx
testb %r14b, %r14b
je 0x9234a
movq -0x38(%rbp), %rax
incl (%rax)
movq -0x30(%rbp), %rdi
callq 0xe36d
movq %rax, %rdi
callq 0xe3d6
leaq -0x50(%rbp), %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x11c46
movq (%r12), %rdi
leaq -0x48(%rbp), %rsi
callq 0x11814
movq %rax, %r12
movq %r13, %rdi
callq 0xe445
movq %rax, -0x60(%rbp)
testb %r14b, %r14b
je 0x92398
movq -0x38(%rbp), %rax
addl $0x2, (%rax)
movq -0x30(%rbp), %r13
movq %r13, %rdi
callq 0xe7f9
movq %rax, %rbx
movq %r13, %rdi
callq 0xe36d
movq %rax, %rdi
callq 0xe3d6
movq %rax, %rdi
callq 0xe445
testq %rax, %rax
je 0x923d6
addq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x50e0
testb %r14b, %r14b
movq -0x30(%rbp), %rbx
movq -0x38(%rbp), %rax
je 0x923f6
decl (%rax)
jne 0x923f6
movq %rbx, %rdi
leaq 0x7ed68(%rip), %rsi     # 0x111159
callq 0xd13d
movq -0x48(%rbp), %rax
movq %rax, 0x10(%r15)
movq %rbx, %rdi
callq 0xe36d
movq %rax, %rdi
callq 0xe3d6
movq (%r15), %rsi
movq %rsi, %rcx
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
andq %r14, %rcx
sete %dl
testb $0x3, %sil
setne %dil
orb %dl, %dil
movq -0x40(%rbp), %r12
jne 0x92437
incl (%rcx)
movq %rax, %rdi
callq 0xe50f
movq %rax, %rbx
movq (%r15), %rdi
andq %rdi, %r14
sete %al
testb $0x3, %dil
setne %cl
orb %al, %cl
jne 0x92467
decl (%r14)
jne 0x92467
leaq 0x7efc7(%rip), %rsi     # 0x111429
callq 0xd13d
movq %rbx, (%r15)
jmp 0x92585
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x925f7
testb %r14b, %r14b
je 0x92485
incl (%r13)
movq -0x30(%rbp), %r13
movq %r13, %rdi
callq 0xe36d
movq %rax, %rdi
callq 0xe3d6
movq %rax, %rbx
movq -0x48(%rbp), %r15
movq 0x10(%r15), %rdi
leaq -0x50(%rbp), %r12
movq %r12, %rsi
callq 0x126ce
movq (%r12), %rcx
movq %rcx, 0x10(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe83a
testl %eax, %eax
jle 0x924e5
leaq -0x50(%rbp), %rbx
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x9229e
movq (%rbx), %r15
movq -0x40(%rbp), %r12
jmp 0x92585
testb %r14b, %r14b
movq -0x38(%rbp), %r13
je 0x924f3
addl $0x2, (%r13)
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0xe7f9
movq %rax, %rbx
movq %r12, %rdi
callq 0xe36d
movq %rax, %rdi
callq 0xe3d6
movq 0x8(%r15), %rdi
leaq -0x50(%rbp), %r12
movq %rbx, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x926cf
movq (%r12), %rcx
movq %rcx, 0x8(%r15)
movabsq $0xfffffffffffc, %rdi   # imm = 0xFFFFFFFFFFFC
andq %rdx, %rdi
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x92566
decl (%rdi)
jne 0x92566
shlq $0x30, %rax
orq %rdx, %rax
leaq 0x806fb(%rip), %rsi     # 0x112c59
movq %rax, %rdi
callq 0xd13d
testb %r14b, %r14b
movq -0x40(%rbp), %r12
je 0x92585
decl (%r13)
jne 0x92585
movq -0x30(%rbp), %rdi
leaq 0x7ebd9(%rip), %rsi     # 0x111159
callq 0xd13d
movq %r15, (%r12)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq