	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sbwrite                        ## -- Begin function sbwrite
	.p2align	4, 0x90
_sbwrite:                               ## @sbwrite
	.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, %r15d
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_ERROR
	movq	%rbx, %rdi
	callq	_ufs_disk_write
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	leaq	4(%rbx), %rsi
	movl	(%rbx), %edi
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movl	(%rsi), %r14d
LBB0_5:
	movl	%r14d, %edx
	callq	_sbput
	movq	_errno@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	callq	_ERROR
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ERROR
	movl	$128, (%r14)
LBB0_9:
	movl	$-1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to open disk for writing"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"failed to write superblock"

L_.str.2:                               ## @.str.2
	.asciz	"unknown superblock write error"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sbwrite                        ; -- Begin function sbwrite
	.p2align	2
_sbwrite:                               ; @sbwrite
	.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
	mov	x20, x1
	mov	x19, x0
	mov	x1, #0
	bl	_ERROR
	mov	x0, x19
	bl	_ufs_disk_write
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x1, x19
	ldr	w0, [x1], #4
	cbz	w20, LBB0_4
; %bb.2:
	ldr	w2, [x1]
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	mov	w2, #0
LBB0_5:
	bl	_sbput
Lloh2:
	adrp	x20, _errno@GOTPAGE
Lloh3:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	str	w0, [x20]
	cbz	w0, LBB0_11
; %bb.6:
	cmp	w0, #128
	b.ne	LBB0_9
; %bb.7:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_ERROR
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ERROR
	mov	w8, #128
	str	w8, [x20]
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to open disk for writing"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"failed to write superblock"

l_.str.2:                               ; @.str.2
	.asciz	"unknown superblock write error"

.subsections_via_symbols
