	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function load_header
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	4294967295                      ## 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_load_header
	.p2align	4, 0x90
_load_header:                           ## @load_header
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	4(%rdi), %eax
	movq	_fd@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	%eax, (%rcx)
	movl	(%rdi), %ebx
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_lseek
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	sete	%dil
	callq	_assert
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	_header@GOTPCREL(%rip), %r15
	movq	%r15, %rsi
	movl	$-4, %edx
	callq	_read
	cmpl	$-5, %eax
	jg	LBB0_5
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edx
	movl	$-4, %ecx
	jmp	LBB0_4
LBB0_1:
	movq	_HINTS_INDEX_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_header@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movl	$0, 4(%rbx)
	movq	$0, 56(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 96(%rbx)
	movq	$0, 112(%rbx)
	movups	%xmm0, 80(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,1,4294967295]
	movups	%xmm0, 8(%rbx)
	movl	$1, 24(%rbx)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_time
	movl	%eax, 72(%rbx)
	movq	_header_size@GOTPCREL(%rip), %rax
	movl	$4, (%rax)
	jmp	LBB0_15
LBB0_5:
	movl	(%r15), %eax
	movq	_HINTS_INDEX_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r14), %edi
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	callq	_assert
LBB0_7:
	xorl	%edi, %edi
	cmpl	$1, 24(%r15)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$-1, 20(%r15)
	sete	%dil
	callq	_assert
	movl	4(%r15), %eax
	leal	4(,%rax,4), %r14d
	movl	%r14d, %edi
	callq	_dl_malloc0
	movq	%rax, 56(%r15)
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_rating_num@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
LBB0_9:
	movq	_fading@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	40(%r15), %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	56(%r15), %rsi
	movl	%r14d, %edx
	callq	_read
	cmpl	%r14d, %eax
	jge	LBB0_11
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edx
	movl	%r14d, %ecx
LBB0_4:
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	callq	_assert
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpq	$0, 64(%r15)
	je	LBB0_13
## %bb.12:
	movq	56(%r15), %rdi
	leaq	44(%r15), %rdx
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_crc32_check_and_repair
	movl	48(%r15), %eax
	movq	$0, 44(%r15)
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$-4, %esi
	movl	$1, %ecx
	callq	_crc32_check_and_repair
LBB0_13:
	movl	12(%r15), %edi
	callq	_assert
	movq	_log_split_min@GOTPCREL(%rip), %r14
	movl	8(%r15), %eax
	movl	12(%r15), %ecx
	movl	%eax, (%r14)
	movq	_log_split_max@GOTPCREL(%rip), %r12
	movl	%ecx, (%r12)
	movl	16(%r15), %eax
	movq	_log_split_mod@GOTPCREL(%rip), %r13
	movl	%eax, (%r13)
	movq	%r15, %rdi
	callq	_get_index_header_size
	addl	$-8, %eax
	movq	_header_size@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_verbosity@GOTPCREL(%rip), %rax
	movl	$1, %r15d
	cmpl	$2, (%rax)
	jl	LBB0_15
## %bb.14:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	(%r14), %edx
	movl	(%r12), %ecx
	movl	(%r13), %r8d
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_HINTS_INDEX_MAGIC,4,2          ## @HINTS_INDEX_MAGIC
	.comm	_header,120,3                   ## @header
	.comm	_header_size,4,2                ## @header_size
	.comm	_fd,8,3                         ## @fd
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error reading header from index file: read %d bytes instead of %d at position 0: %m\n"

L_.str.1:                               ## @.str.1
	.asciz	"bad hints index file header\n"

L_.str.2:                               ## @.str.2
	.asciz	"magic = 0x%08x // offset = %d\n"

	.comm	_rating_num,8,3                 ## @rating_num
	.comm	_fading,4,2                     ## @fading
L_.str.3:                               ## @.str.3
	.asciz	"error reading header from index file: read %d bytes instead of %d: %m\n"

	.comm	_log_split_min,4,2              ## @log_split_min
	.comm	_log_split_max,4,2              ## @log_split_max
	.comm	_log_split_mod,4,2              ## @log_split_mod
	.comm	_verbosity,4,2                  ## @verbosity
L_.str.4:                               ## @.str.4
	.asciz	"header loaded %d %d %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"ok\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function load_header
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_load_header
	.p2align	2
_load_header:                           ; @load_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x22, _fd@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fd@GOTPAGEOFF]
	ldr	x9, [x22]
	str	w8, [x9]
	ldr	w20, [x0]
Lloh2:
	adrp	x9, _SEEK_SET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SEEK_SET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x9]
	mov	x0, x8
	mov	x1, x20
	bl	_lseek
	cmp	w0, w20
	cset	w0, eq
	bl	_assert
	ldr	x8, [x22]
	ldr	w0, [x8]
Lloh5:
	adrp	x19, _header@GOTPAGE
Lloh6:
	ldr	x19, [x19, _header@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #-4
	bl	_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #5
	b.gt	LBB0_4
; %bb.2:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mov	w9, #-4
	stp	x0, x9, [sp]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_3:
Lloh12:
	adrp	x8, _HINTS_INDEX_MAGIC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HINTS_INDEX_MAGIC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x19, _header@GOTPAGE
Lloh16:
	ldr	x19, [x19, _header@GOTPAGEOFF]
	stp	w8, wzr, [x19]
	str	xzr, [x19, #56]
	stp	xzr, xzr, [x19, #104]
	stp	xzr, xzr, [x19, #88]
	str	xzr, [x19, #80]
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x19, #8]
	mov	w8, #1
	str	w8, [x19, #24]
	bl	_time
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #72]
Lloh19:
	adrp	x8, _header_size@GOTPAGE
Lloh20:
	ldr	x8, [x8, _header_size@GOTPAGEOFF]
	mov	w9, #4
Lloh21:
	str	w9, [x8]
	b	LBB0_16
LBB0_4:
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _HINTS_INDEX_MAGIC@GOTPAGE
Lloh23:
	ldr	x9, [x9, _HINTS_INDEX_MAGIC@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x21, _stderr@GOTPAGE
Lloh26:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x21]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x21]
	ldr	w8, [x19]
	stp	x8, x20, [sp]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	mov	w0, #0
	bl	_assert
LBB0_6:
	ldr	w8, [x19, #24]
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #20]
	cmn	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #4]
	lsl	w8, w8, #2
	add	w20, w8, #4
	mov	x0, x20
	bl	_dl_malloc0
	str	x0, [x19, #56]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_8
; %bb.7:
Lloh31:
	adrp	x9, _rating_num@GOTPAGE
Lloh32:
	ldr	x9, [x9, _rating_num@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
LBB0_8:
	ldr	w8, [x19, #40]
Lloh34:
	adrp	x9, _fading@GOTPAGE
Lloh35:
	ldr	x9, [x9, _fading@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	add	w8, w9, w8
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	x8, [x22]
	ldr	w0, [x8]
	ldr	x1, [x19, #56]
	mov	x2, x20
	bl	_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w20
	b.ge	LBB0_11
; %bb.9:
	ldr	w8, [x21]
	stp	x0, x20, [sp]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x8
	bl	_fprintf
	mov	w0, #0
	bl	_assert
	mov	w0, #0
	b	LBB0_16
LBB0_11:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	x0, [x19, #56]
	add	x2, x19, #44
	mov	x1, x20
	mov	w3, #1
	bl	_crc32_check_and_repair
	ldr	w8, [x19, #48]
	str	w8, [sp, #28]
	stp	wzr, wzr, [x19, #44]
	add	x2, sp, #28
	mov	x0, x19
	mov	w1, #-4
	mov	w3, #1
	bl	_crc32_check_and_repair
LBB0_13:
	ldr	w0, [x19, #12]
	bl	_assert
Lloh39:
	adrp	x20, _log_split_min@GOTPAGE
Lloh40:
	ldr	x20, [x20, _log_split_min@GOTPAGEOFF]
	ldp	w8, w9, [x19, #8]
Lloh41:
	adrp	x22, _log_split_max@GOTPAGE
Lloh42:
	ldr	x22, [x22, _log_split_max@GOTPAGEOFF]
	str	w8, [x20]
	str	w9, [x22]
	ldr	w8, [x19, #16]
Lloh43:
	adrp	x23, _log_split_mod@GOTPAGE
Lloh44:
	ldr	x23, [x23, _log_split_mod@GOTPAGEOFF]
	str	w8, [x23]
	mov	x0, x19
	bl	_get_index_header_size
Lloh45:
	adrp	x8, _header_size@GOTPAGE
Lloh46:
	ldr	x8, [x8, _header_size@GOTPAGEOFF]
	sub	w9, w0, #8
Lloh47:
	str	w9, [x8]
Lloh48:
	adrp	x8, _verbosity@GOTPAGE
Lloh49:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_15
; %bb.14:
	ldr	w0, [x21]
	ldr	w8, [x20]
	ldr	w9, [x22]
	ldr	w10, [x23]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh51:
	adrp	x1, l_.str.4@PAGE
Lloh52:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	ldr	w0, [x21]
Lloh53:
	adrp	x1, l_.str.5@PAGE
Lloh54:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_15:
	mov	w0, #1
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_HINTS_INDEX_MAGIC,4,2          ; @HINTS_INDEX_MAGIC
	.comm	_header,120,3                   ; @header
	.comm	_header_size,4,2                ; @header_size
	.comm	_fd,8,3                         ; @fd
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error reading header from index file: read %d bytes instead of %d at position 0: %m\n"

l_.str.1:                               ; @.str.1
	.asciz	"bad hints index file header\n"

l_.str.2:                               ; @.str.2
	.asciz	"magic = 0x%08x // offset = %d\n"

	.comm	_rating_num,8,3                 ; @rating_num
	.comm	_fading,4,2                     ; @fading
l_.str.3:                               ; @.str.3
	.asciz	"error reading header from index file: read %d bytes instead of %d: %m\n"

	.comm	_log_split_min,4,2              ; @log_split_min
	.comm	_log_split_max,4,2              ; @log_split_max
	.comm	_log_split_mod,4,2              ; @log_split_mod
	.comm	_verbosity,4,2                  ; @verbosity
l_.str.4:                               ; @.str.4
	.asciz	"header loaded %d %d %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"ok\n"

.subsections_via_symbols
