	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bwrite                         ## -- Begin function bwrite
	.p2align	4, 0x90
_bwrite:                                ## @bwrite
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r15
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	movslq	(%r14), %rsi
	movslq	(%r15), %rbx
	imulq	%rsi, %rbx
	addq	8(%r15), %rbx
	movq	_debug@GOTPCREL(%rip), %r12
	movq	_DEBUG_BUF_BWRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	8(%r14), %rcx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_printf
LBB0_2:
	movq	24(%r14), %rax
	movl	4(%rax), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	24(%r14), %rax
	movl	4(%rax), %edi
	movl	16(%r14), %esi
	movq	8(%r14), %rdx
	callq	_write
	movl	%eax, %r15d
	movl	(%r13), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.6:
	movq	8(%r14), %rsi
	movslq	%r15d, %r12
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_printf
	jmp	LBB0_7
LBB0_5:
	movslq	%r15d, %r12
LBB0_7:
	xorl	%eax, %eax
	cmpq	%r12, 8(%r14)
	je	LBB0_11
## %bb.8:
	cmpl	$-1, %r15d
	je	LBB0_3
## %bb.9:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.comm	_DEBUG_BUF_BWRITE,4,2           ## @DEBUG_BUF_BWRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bwrite: blkno %lld offset %lld bcount %ld\n"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"bwrite: write %ld (offset %lld) returned %lld\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bwrite                         ; -- Begin function bwrite
	.p2align	2
_bwrite:                                ; @bwrite
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x20, [x0, #24]
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldrsw	x1, [x19]
	ldrsw	x8, [x20]
	ldr	x9, [x20, #8]
Lloh0:
	adrp	x22, _debug@GOTPAGE
Lloh1:
	ldr	x22, [x22, _debug@GOTPAGEOFF]
	madd	x20, x8, x1, x9
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _DEBUG_BUF_BWRITE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DEBUG_BUF_BWRITE@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x3, [x19, #8]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_printf
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #4]
Lloh6:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_lseek
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #4]
	ldr	w1, [x19, #16]
	ldr	x2, [x19, #8]
	bl	_write
	mov	x21, x0
	ldr	w8, [x22]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x1, [x19, #8]
	mov	x8, x21
	sxtw	x22, w8
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	bl	_printf
	b	LBB0_6
LBB0_5:
	sxtw	x22, w21
LBB0_6:
	ldr	x8, [x19, #8]
	cmp	x8, x22
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_12
LBB0_8:
	cmn	w21, #1
	b.eq	LBB0_10
; %bb.9:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.comm	_DEBUG_BUF_BWRITE,4,2           ; @DEBUG_BUF_BWRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bwrite: blkno %lld offset %lld bcount %ld\n"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"bwrite: write %ld (offset %lld) returned %lld\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
