	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_index                     ## -- Begin function load_index
	.p2align	4, 0x90
_load_index:                            ## @load_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rsi
	xorl	%edi, %edi
	movl	$-1, %edx
	callq	_dl_open_file
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movq	_fd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_header@GOTPCREL(%rip), %r14
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_read
	movl	%eax, %ebx
	cmpl	$4, %eax
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	$4, %ecx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_6:
	xorl	%edi, %edi
	cmpl	$4, %ebx
	sete	%dil
	callq	_assert
	movq	(%r14), %rax
	movq	_LETTERS_INDEX_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	callq	_assert
LBB0_8:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_10
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_10:
	xorl	%edi, %edi
	callq	_dl_close_file
	movl	$1, %ebx
	jmp	LBB0_11
LBB0_2:
	movq	_LETTERS_INDEX_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_header@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_time
	movl	%eax, 16(%r14)
	movq	_MAX_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:
	movq	8(%r14), %rdi
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rsi
	callq	___bzero
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LETTERS_INDEX_MAGIC,8,3        ## @LETTERS_INDEX_MAGIC
	.comm	_header,24,3                    ## @header
	.comm	_MAX_PRIORITY,4,2               ## @MAX_PRIORITY
	.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: %m\n"

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

	.comm	_verbosity,4,2                  ## @verbosity
L_.str.2:                               ## @.str.2
	.asciz	"header loaded\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_index                     ; -- Begin function load_index
	.p2align	2
_load_index:                            ; @load_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x1, x0
	mov	w0, #0
	mov	w2, #-1
	bl	_dl_open_file
	tbnz	x0, #63, LBB0_9
; %bb.2:
Lloh0:
	adrp	x19, _fd@GOTPAGE
Lloh1:
	ldr	x19, [x19, _fd@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh2:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_lseek
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh5:
	adrp	x19, _header@GOTPAGE
Lloh6:
	ldr	x19, [x19, _header@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #4
	bl	_read
	mov	x20, x0
Lloh7:
	adrp	x21, _stderr@GOTPAGE
Lloh8:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	cmp	w0, #4
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x21]
	mov	w8, #4
	stp	x20, x8, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_4:
	cmp	w20, #4
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _LETTERS_INDEX_MAGIC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LETTERS_INDEX_MAGIC@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x21]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w0, #0
	bl	_assert
LBB0_6:
Lloh16:
	adrp	x8, _verbosity@GOTPAGE
Lloh17:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.7:
	ldr	w0, [x21]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_8:
	mov	w0, #0
	bl	_dl_close_file
	mov	w0, #1
	b	LBB0_12
LBB0_9:
Lloh21:
	adrp	x8, _LETTERS_INDEX_MAGIC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LETTERS_INDEX_MAGIC@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
Lloh24:
	adrp	x19, _header@GOTPAGE
Lloh25:
	ldr	x19, [x19, _header@GOTPAGEOFF]
	str	x8, [x19]
	mov	x0, #0
	bl	_time
	str	w0, [x19, #16]
Lloh26:
	adrp	x8, _MAX_PRIORITY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MAX_PRIORITY@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.10:
	ldr	x0, [x19, #8]
	add	x8, x8, x8, lsl #1
	lsl	x1, x8, #3
	bl	_bzero
LBB0_11:
	mov	w0, #0
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_LETTERS_INDEX_MAGIC,8,3        ; @LETTERS_INDEX_MAGIC
	.comm	_header,24,3                    ; @header
	.comm	_MAX_PRIORITY,4,2               ; @MAX_PRIORITY
	.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: %m\n"

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

	.comm	_verbosity,4,2                  ; @verbosity
l_.str.2:                               ; @.str.2
	.asciz	"header loaded\n"

.subsections_via_symbols
