	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_io_write                       ## -- Begin function io_write
	.p2align	4, 0x90
_io_write:                              ## @io_write
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_IO_BUFFER_SIZE@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpq	%rdx, (%r12)
	setae	%dil
	callq	_assert
	cmpq	$0, 16(%r14)
	je	LBB0_11
## %bb.1:
	cmpq	%rbx, (%r12)
	jne	LBB0_6
## %bb.2:
	movq	%r15, %rdi
	callq	_is_sparse
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	addq	%rbx, (%r14)
	jmp	LBB0_4
LBB0_6:
	testq	%rbx, %rbx
	je	LBB0_4
LBB0_7:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	jle	LBB0_11
## %bb.8:
	movl	12(%r14), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movq	$0, (%r14)
LBB0_11:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_io_write_buf                   ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %ebx
	movl	8(%r14), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_message_error
	movl	$1, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_BUFFER_SIZE,8,3             ## @IO_BUFFER_SIZE
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Seeking failed when trying to create a sparse file: %s"

	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_io_write                       ; -- Begin function io_write
	.p2align	2
_io_write:                              ; @io_write
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _IO_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IO_BUFFER_SIZE@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, x2
	cset	w0, hs
	bl	_assert
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	x8, [x22]
	cmp	x8, x20
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_is_sparse
	cbz	x0, LBB0_5
; %bb.3:
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, x20
	str	x8, [x19]
	b	LBB0_11
LBB0_4:
	cbz	x20, LBB0_9
LBB0_5:
	ldr	x1, [x19]
	cmp	x1, #1
	b.lt	LBB0_8
; %bb.6:
	ldr	w0, [x19, #12]
Lloh2:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_lseek
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.7:
	str	xzr, [x19]
LBB0_8:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	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
	b	_io_write_buf
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x20, x0
	ldr	w19, [x19, #8]
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_message_error
	mov	w0, #1
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_BUFFER_SIZE,8,3             ; @IO_BUFFER_SIZE
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Seeking failed when trying to create a sparse file: %s"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
