	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_index_part                ## -- Begin function load_index_part
	.p2align	4, 0x90
_load_index_part:                       ## @load_index_part
	.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
	movl	%ecx, %r13d
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	movl	$0, %edi
	testq	%rdx, %rdx
	js	LBB0_2
## %bb.1:
	movq	_dyn_top@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_dyn_cur@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	xorl	%edi, %edi
	cmpq	%r14, %rax
	setge	%dil
LBB0_2:
	callq	_assert
	movslq	%r13d, %rax
	cmpq	%r14, %rax
	setge	%cl
	testl	%eax, %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	testq	%r15, %r15
	js	LBB0_5
## %bb.3:
	movq	_idx_fsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r15, %rax
	movq	%rbx, %r13
	jl	LBB0_6
## %bb.4:
	leaq	(%r14,%r15), %rcx
	xorl	%r12d, %r12d
	cmpq	%rax, %rcx
	setle	%r12b
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %r13
LBB0_6:
	movl	%r12d, %edi
	callq	_assert
	testq	%r13, %r13
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_zmalloc
	movq	%rax, %r13
LBB0_8:
	movq	_idx_fd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_lseek
	xorl	%edi, %edi
	cmpq	%r15, %rax
	sete	%dil
	callq	_assert
	movq	%r13, _load_index_part.io_req(%rip)
	leaq	_load_index_part.io_req(%rip), %rsi
	movq	%r14, _load_index_part.io_req+8(%rip)
	leaq	_load_index_part.index_part_crc32(%rip), %rax
	movq	%rax, _load_index_part.io_req+16(%rip)
	movq	$4, _load_index_part.io_req+24(%rip)
	movl	(%rbx), %edi
	movq	_idx_crc_enabled@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	incl	%edx
	callq	_readv
	movl	%eax, %ebx
	movslq	(%r12), %rax
	leaq	(%r14,%rax,4), %r14
	movslq	%ebx, %rdx
	cmpq	%rdx, %r14
	jne	LBB0_12
## %bb.9:
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	-4(%r14), %rsi
	movq	%r13, %rdi
	callq	_compute_crc32
	movl	_load_index_part.index_part_crc32(%rip), %r8d
	cmpl	%r8d, %eax
	jne	LBB0_13
LBB0_11:
	movq	_idx_loaded_bytes@GOTPCREL(%rip), %rax
	addl	%ebx, (%rax)
	jmp	LBB0_15
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %r12d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rdx
	movq	%r15, %rcx
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	cmpl	_load_index_part.index_part_crc32(%rip), %r12d
	sete	%dil
LBB0_14:
	callq	_assert
LBB0_15:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_load_index_part.io_req,32,4 ## @load_index_part.io_req
.zerofill __DATA,__bss,_load_index_part.index_part_crc32,4,2 ## @load_index_part.index_part_crc32
	.comm	_dyn_top,8,3                    ## @dyn_top
	.comm	_dyn_cur,8,3                    ## @dyn_cur
	.comm	_idx_fsize,8,3                  ## @idx_fsize
	.comm	_idx_fd,4,2                     ## @idx_fd
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_idx_crc_enabled,4,2            ## @idx_crc_enabled
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error reading data from index file: read %d bytes instead of %lld at position %lld: %m\n"

L_.str.1:                               ## @.str.1
	.asciz	"error reading %lld bytes from index file at position %lld: crc32 mismatch: expected %08x, actual %08x\n"

	.comm	_idx_loaded_bytes,4,2           ## @idx_loaded_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_index_part                ; -- Begin function load_index_part
	.p2align	2
_load_index_part:                       ; @load_index_part
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	tbnz	x2, #63, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _dyn_top@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dyn_top@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _dyn_cur@GOTPAGE
Lloh4:
	ldr	x9, [x9, _dyn_cur@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	x8, x8, x9
	cmp	x8, x21
	cset	w0, ge
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_assert
	sxtw	x8, w22
	cmp	w22, #0
	ccmp	x8, x21, #0, ne
	cset	w0, ge
	bl	_assert
	tbnz	x19, #63, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _idx_fsize@GOTPAGE
Lloh7:
	ldr	x8, [x8, _idx_fsize@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ge	LBB0_12
LBB0_5:
	mov	w0, #0
	bl	_assert
	cbnz	x20, LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_zmalloc
	mov	x20, x0
LBB0_7:
Lloh9:
	adrp	x22, _idx_fd@GOTPAGE
Lloh10:
	ldr	x22, [x22, _idx_fd@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_lseek
	cmp	x0, x19
	cset	w0, eq
	bl	_assert
Lloh14:
	adrp	x1, _load_index_part.io_req@PAGE
Lloh15:
	add	x1, x1, _load_index_part.io_req@PAGEOFF
	stp	x20, x21, [x1]
Lloh16:
	adrp	x8, _load_index_part.index_part_crc32@PAGE
Lloh17:
	add	x8, x8, _load_index_part.index_part_crc32@PAGEOFF
	mov	w9, #4
	stp	x8, x9, [x1, #16]
	ldr	w0, [x22]
Lloh18:
	adrp	x22, _idx_crc_enabled@GOTPAGE
Lloh19:
	ldr	x22, [x22, _idx_crc_enabled@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w2, w8, #1
	bl	_readv
                                        ; kill: def $w0 killed $w0 def $x0
	ldrsw	x8, [x22]
	add	x21, x21, x8, lsl #2
	sxtw	x22, w0
	cmp	x21, x22
	b.ne	LBB0_11
; %bb.8:
	cbz	w8, LBB0_10
; %bb.9:
	sub	x1, x21, #4
	mov	x0, x20
	bl	_compute_crc32
	adrp	x24, _load_index_part.index_part_crc32@PAGE
	ldr	w4, [x24, _load_index_part.index_part_crc32@PAGEOFF]
	cmp	w0, w4
	b.ne	LBB0_13
LBB0_10:
Lloh20:
	adrp	x8, _idx_loaded_bytes@GOTPAGE
Lloh21:
	ldr	x8, [x8, _idx_loaded_bytes@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w22
	str	w9, [x8]
	b	LBB0_15
LBB0_11:
Lloh22:
	adrp	x8, _stderr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x21
	mov	x4, x19
	bl	_fprintf
	mov	w0, #0
	b	LBB0_14
LBB0_12:
	add	x9, x21, x19
	cmp	x9, x8
	cset	w0, le
	bl	_assert
	cbnz	x20, LBB0_7
	b	LBB0_6
LBB0_13:
	mov	x23, x0
Lloh27:
	adrp	x8, _stderr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	str	x23, [sp]
	mov	x2, x21
	mov	x3, x19
	bl	_fprintf
	ldr	w8, [x24, _load_index_part.index_part_crc32@PAGEOFF]
	cmp	w23, w8
	cset	w0, eq
LBB0_14:
	bl	_assert
	mov	x20, #0
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_load_index_part.io_req,32,3 ; @load_index_part.io_req
.zerofill __DATA,__bss,_load_index_part.index_part_crc32,4,2 ; @load_index_part.index_part_crc32
	.comm	_dyn_top,8,3                    ; @dyn_top
	.comm	_dyn_cur,8,3                    ; @dyn_cur
	.comm	_idx_fsize,8,3                  ; @idx_fsize
	.comm	_idx_fd,4,2                     ; @idx_fd
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_idx_crc_enabled,4,2            ; @idx_crc_enabled
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error reading data from index file: read %d bytes instead of %lld at position %lld: %m\n"

l_.str.1:                               ; @.str.1
	.asciz	"error reading %lld bytes from index file at position %lld: crc32 mismatch: expected %08x, actual %08x\n"

	.comm	_idx_loaded_bytes,4,2           ; @idx_loaded_bytes
.subsections_via_symbols
