	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bread                          ## -- Begin function bread
	.p2align	4, 0x90
_bread:                                 ## @bread
	.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	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r13
	xorl	%esi, %esi
	callq	_ERROR
	movq	%r15, %r12
	testb	$63, %r15b
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movl	4(%r13), %edi
	imull	(%r13), %ebx
	movq	%r12, %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_pread
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_7
LBB0_9:
	movslq	%ebx, %rax
	cmpq	%r14, %rax
	jne	LBB0_10
## %bb.11:
	cmpq	%r15, %r12
	je	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	jmp	LBB0_13
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_ERROR
	xorl	%r12d, %r12d
	jmp	LBB0_3
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
LBB0_7:
	movq	%r13, %rdi
	callq	_ERROR
LBB0_3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_memset
	movl	$-1, %ebx
	cmpq	%r15, %r12
	je	LBB0_14
LBB0_13:
	movq	%r12, %rdi
	callq	_free
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocate bounce buffer"

L_.str.1:                               ## @.str.1
	.asciz	"read error from block device"

L_.str.2:                               ## @.str.2
	.asciz	"end of file from block device"

L_.str.3:                               ## @.str.3
	.asciz	"short read or read error from block device"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bread                          ; -- Begin function bread
	.p2align	2
_bread:                                 ; @bread
	.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	x20, x3
	mov	x19, x2
	mov	x23, x1
	mov	x22, x0
	mov	x1, #0
	bl	_ERROR
	mov	x21, x19
	tst	x19, #0x3f
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_9
LBB0_2:
	ldp	w8, w0, [x22]
	mul	w3, w8, w23
	mov	x1, x21
	mov	x2, x20
	bl	_pread
	cbz	w0, LBB0_5
; %bb.3:
	mov	x23, x0
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.4:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_5:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_6:
	sxtw	x8, w23
	cmp	x8, x20
	b.ne	LBB0_10
; %bb.7:
	cmp	x21, x19
	b.eq	LBB0_13
; %bb.8:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	b	LBB0_12
LBB0_9:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	mov	x0, x22
	bl	_ERROR
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	mov	w23, #-1
	cmp	x21, x19
	b.eq	LBB0_13
LBB0_12:
	mov	x0, x21
	bl	_free
LBB0_13:
	mov	x0, x23
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocate bounce buffer"

l_.str.1:                               ; @.str.1
	.asciz	"read error from block device"

l_.str.2:                               ; @.str.2
	.asciz	"end of file from block device"

l_.str.3:                               ; @.str.3
	.asciz	"short read or read error from block device"

.subsections_via_symbols
