	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function closedisk
_closedisk:                             ## @closedisk
	.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	_fs@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	$1, (%rax)
	movq	_diskp@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	_sbwrite
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	movq	_devnam@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movq	(%rbx), %rdi
	callq	_ufs_disk_close
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	movq	_devnam@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	movq	(%rbx), %rdi
	callq	_free
	movq	$0, (%rbx)
	movq	$0, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fs,8,3                         ## @fs
	.comm	_diskp,8,3                      ## @diskp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sbwrite(%s)"

	.comm	_devnam,4,2                     ## @devnam
L_.str.1:                               ## @.str.1
	.asciz	"ufs_disk_close(%s)"

	.no_dead_strip	_closedisk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function closedisk
_closedisk:                             ; @closedisk
	.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
Lloh0:
	adrp	x19, _fs@GOTPAGE
Lloh1:
	ldr	x19, [x19, _fs@GOTPAGEOFF]
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
Lloh2:
	adrp	x20, _diskp@GOTPAGE
Lloh3:
	ldr	x20, [x20, _diskp@GOTPAGEOFF]
	ldr	x0, [x20]
	mov	w1, #0
	bl	_sbwrite
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _devnam@GOTPAGE
Lloh5:
	ldr	x8, [x8, _devnam@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	ldr	x0, [x20]
	bl	_ufs_disk_close
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _devnam@GOTPAGE
Lloh10:
	ldr	x8, [x8, _devnam@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	ldr	x0, [x20]
	bl	_free
	str	xzr, [x20]
	str	xzr, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_fs,8,3                         ; @fs
	.comm	_diskp,8,3                      ; @diskp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sbwrite(%s)"

	.comm	_devnam,4,2                     ; @devnam
l_.str.1:                               ; @.str.1
	.asciz	"ufs_disk_close(%s)"

	.no_dead_strip	_closedisk
.subsections_via_symbols
