	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_io_close                       ## -- Begin function io_close
	.p2align	4, 0x90
_io_close:                              ## @io_close
	.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
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	movl	%esi, %ebx
	cmpq	$0, 16(%r14)
	je	LBB0_7
## %bb.2:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	jle	LBB0_7
## %bb.3:
	movl	8(%r14), %edi
	decq	%rsi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movb	$0, -25(%rbp)
	leaq	-25(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_io_write_buf
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	callq	_signals_block
	movl	8(%r14), %eax
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.8:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_io_copy_attrs
	jmp	LBB0_10
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %ebx
	movl	12(%r14), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_message_error
LBB0_6:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_signals_block
LBB0_10:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_io_close_dest
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_io_close_src
	xorl	%eax, %eax
	callq	_signals_unblock
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_io_close                       ; -- Begin function io_close
	.p2align	2
_io_close:                              ; @io_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	cbz	w1, LBB0_8
; %bb.1:
	mov	x20, x1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x8, [x19]
	subs	x1, x8, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_lseek
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	strb	wzr, [sp, #15]
	add	x1, sp, #15
	mov	x0, x19
	mov	w2, #1
	bl	_io_write_buf
	cbnz	x0, LBB0_8
LBB0_5:
	bl	_signals_block
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _STDOUT_FILENO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STDOUT_FILENO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmn	w8, #1
	ccmp	w8, w9, #4, ne
	b.eq	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_io_copy_attrs
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x20, x0
	ldr	w21, [x19, #12]
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_message_error
LBB0_8:
	bl	_signals_block
	mov	w20, #0
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_io_close_dest
	cmp	x0, #0
	csel	w1, w20, wzr, eq
	mov	x0, x19
	bl	_io_close_src
	bl	_signals_unblock
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.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
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
.subsections_via_symbols
