	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_disk
_read_disk:                             ## @read_disk
	.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	%rsi, %r12
	movl	%edi, %esi
	movq	_fd@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	shll	$9, %esi
	xorl	%edx, %edx
	callq	_lseek
	movq	_secsize@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.6:
	movl	(%r15), %edi
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_read                           ## TAILCALL
LBB0_1:
	movq	_MIN_SEC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, (%rbx)
	movq	_MAX_SEC_SIZE@GOTPCREL(%rip), %r13
	movl	$-1, %r14d
	cmpl	(%r13), %edx
	jg	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_read
	movl	(%rbx), %edx
	cmpl	%edx, %eax
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%edx, %edx
	movl	%edx, (%rbx)
	cmpl	(%r13), %edx
	jle	LBB0_3
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fd,4,2                         ## @fd
	.comm	_secsize,4,2                    ## @secsize
	.comm	_MIN_SEC_SIZE,4,2               ## @MIN_SEC_SIZE
	.comm	_MAX_SEC_SIZE,4,2               ## @MAX_SEC_SIZE
	.no_dead_strip	_read_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_disk
_read_disk:                             ; @read_disk
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
Lloh0:
	adrp	x20, _fd@GOTPAGE
Lloh1:
	ldr	x20, [x20, _fd@GOTPAGEOFF]
	ldr	w8, [x20]
	lsl	w1, w0, #9
	mov	x0, x8
	mov	w2, #0
	bl	_lseek
Lloh2:
	adrp	x21, _secsize@GOTPAGE
Lloh3:
	ldr	x21, [x21, _secsize@GOTPAGEOFF]
	ldr	w2, [x21]
	cbz	w2, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_read
LBB0_2:
Lloh4:
	adrp	x8, _MIN_SEC_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MIN_SEC_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	str	w2, [x21]
Lloh7:
	adrp	x22, _MAX_SEC_SIZE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MAX_SEC_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w2, w8
	b.gt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20]
	mov	x1, x19
	bl	_read
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w2, w8, #1
	str	w2, [x21]
	b	LBB0_3
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_fd,4,2                         ; @fd
	.comm	_secsize,4,2                    ; @secsize
	.comm	_MIN_SEC_SIZE,4,2               ; @MIN_SEC_SIZE
	.comm	_MAX_SEC_SIZE,4,2               ; @MAX_SEC_SIZE
	.no_dead_strip	_read_disk
.subsections_via_symbols
