	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_char
_write_char:                            ## @write_char
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rsi), %rax
	movq	(%rax), %rax
	movq	_MODE_TEXT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	%rsi, %rdi
	callq	_get_writing_buffer
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%rax), %rcx
	movq	(%rbx), %rdx
	movq	8(%rdx), %rsi
	movq	16(%rdx), %rdx
	movq	(%rcx,%rsi,8), %rcx
	movb	%r14b, (%rcx,%rdx)
	movq	(%rbx), %rcx
	movl	28(%rcx), %esi
	movq	40(%rax), %rdi
	movq	8(%rcx), %rbx
	movq	16(%rcx), %rdx
	movq	(%rdi,%rbx,8), %rdi
	movl	%esi, (%rdi,%rdx,4)
	movl	24(%rcx), %esi
	movq	32(%rax), %rdi
	movq	(%rdi,%rbx,8), %rdi
	movl	%esi, (%rdi,%rdx,4)
	movq	8(%rax), %rsi
	movl	$1, (%rsi,%rbx,4)
	movq	$0, 24(%rax)
	cmpq	$30, %rdx
	ja	LBB0_4
## %bb.3:
	incq	%rdx
	movq	%rdx, 16(%rcx)
LBB0_4:
	movl	$1, 16(%rax)
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_TEXT,8,3                  ## @MODE_TEXT
	.no_dead_strip	_write_char
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_char
_write_char:                            ; @write_char
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x1]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _MODE_TEXT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MODE_TEXT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_get_writing_buffer
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x0]
	ldr	x9, [x19]
	ldp	x10, x9, [x9, #8]
	ldr	x8, [x8, x10, lsl #3]
	strb	w20, [x8, x9]
	ldr	x8, [x19]
	ldr	w10, [x8, #28]
	ldp	x11, x9, [x8, #8]
	lsl	x12, x11, #3
	ldp	x14, x13, [x0, #32]
	ldr	x13, [x13, x12]
	lsl	x15, x9, #2
	str	w10, [x13, x15]
	ldr	w10, [x8, #24]
	ldr	x12, [x14, x12]
	str	w10, [x12, x15]
	ldr	x12, [x0, #8]
	mov	w10, #1
	str	w10, [x12, x11, lsl #2]
	str	xzr, [x0, #24]
	cmp	x9, #30
	b.hi	LBB0_4
; %bb.3:
	add	x9, x9, #1
	str	x9, [x8, #16]
LBB0_4:
	str	w10, [x0, #16]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_TEXT,8,3                  ; @MODE_TEXT
	.no_dead_strip	_write_char
.subsections_via_symbols
