	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_int                      ## -- Begin function write_int
	.p2align	4, 0x90
_write_int:                             ## @write_int
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	_wptr@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	%edi, %rbx
	movq	(%rax,%rbx,8), %rcx
	leaq	4(%rcx), %rdx
	movq	_write_buff@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_WRITE_BUFF_SIZE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	addq	(%rsi,%rbx,8), %rdi
	cmpq	%rdi, %rdx
	jle	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_flush_write
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rcx
	leaq	4(%rcx), %rdx
LBB0_2:
	movl	%r14d, (%rcx)
	movq	%rdx, (%rax,%rbx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wptr,8,3                       ## @wptr
	.comm	_write_buff,8,3                 ## @write_buff
	.comm	_WRITE_BUFF_SIZE,8,3            ## @WRITE_BUFF_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_int                      ; -- Begin function write_int
	.p2align	2
_write_int:                             ; @write_int
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x21, _wptr@GOTPAGE
Lloh1:
	ldr	x21, [x21, _wptr@GOTPAGEOFF]
	ldr	x8, [x21]
	sbfiz	x10, x0, #3, #32
	ldr	x9, [x8, x10]
	sxtw	x20, w0
Lloh2:
	adrp	x11, _write_buff@GOTPAGE
Lloh3:
	ldr	x11, [x11, _write_buff@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	ldr	x11, [x11, x10]
	add	x10, x9, #4
Lloh5:
	adrp	x12, _WRITE_BUFF_SIZE@GOTPAGE
Lloh6:
	ldr	x12, [x12, _WRITE_BUFF_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
	add	x11, x12, x11
	cmp	x10, x11
	b.le	LBB0_2
; %bb.1:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_flush_write
	ldr	x8, [x21]
	ldr	x9, [x8, x20, lsl #3]
	add	x10, x9, #4
LBB0_2:
	str	w19, [x9]
	str	x10, [x8, x20, lsl #3]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_wptr,8,3                       ; @wptr
	.comm	_write_buff,8,3                 ; @write_buff
	.comm	_WRITE_BUFF_SIZE,8,3            ; @WRITE_BUFF_SIZE
.subsections_via_symbols
