	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_header                    ## -- Begin function 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:
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	movl	(%rbx), %edi
	movq	_fd@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	%edi, (%rax)
	movl	4(%rbx), %r14d
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	callq	_lseek
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	sete	%dil
	callq	_assert
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	_header@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_read
	cmpl	$4, %eax
	je	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	movl	$4, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	callq	_assert
LBB0_4:
	movl	12(%rbx), %eax
	movq	_SUPPORT_INDEX_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r15), %edi
	movl	12(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	callq	_assert
LBB0_6:
	movl	4(%rbx), %edi
	callq	_assert
	movq	_log_split_min@GOTPCREL(%rip), %r14
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	movl	%eax, (%r14)
	movq	_log_split_max@GOTPCREL(%rip), %r12
	movl	%ecx, (%r12)
	movl	8(%rbx), %eax
	movq	_log_split_mod@GOTPCREL(%rip), %r13
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	_get_index_header_size
	movq	_header_size@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_verbosity@GOTPCREL(%rip), %rax
	movl	$1, %r15d
	cmpl	$2, (%rax)
	jl	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_fd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movl	(%r12), %r8d
	movl	(%r13), %r9d
	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_8
LBB0_1:
	movq	_fd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$-1, (%rax)
	movq	_header@GOTPCREL(%rip), %rbx
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, (%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
	movl	$1, 8(%rbx)
	movups	%xmm0, 24(%rbx)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_time
	movl	%eax, 16(%rbx)
	movq	_header_size@GOTPCREL(%rip), %rax
	movl	$4, (%rax)
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fd,8,3                         ## @fd
	.comm	_header,64,3                    ## @header
	.comm	_header_size,4,2                ## @header_size
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"load_header\n"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"error reading header from index file: read %d bytes instead of %d at position %d: %m\n"

	.comm	_SUPPORT_INDEX_MAGIC,4,2        ## @SUPPORT_INDEX_MAGIC
L_.str.2:                               ## @.str.2
	.asciz	"bad support index file header\n"

L_.str.3:                               ## @.str.3
	.asciz	"magic = 0x%08x // offset = %d\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 %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,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function load_header
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.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_8
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	ldr	w0, [x19]
Lloh2:
	adrp	x21, _fd@GOTPAGE
Lloh3:
	ldr	x21, [x21, _fd@GOTPAGEOFF]
	ldr	x8, [x21]
	str	w0, [x8]
	ldr	w20, [x19, #4]
Lloh4:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_lseek
	cmp	w0, w20
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh7:
	adrp	x19, _header@GOTPAGE
Lloh8:
	ldr	x19, [x19, _header@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #4
	bl	_read
                                        ; kill: def $w0 killed $w0 def $x0
Lloh9:
	adrp	x22, _stderr@GOTPAGE
Lloh10:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	cmp	w0, #4
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x22]
	mov	w9, #4
	stp	x9, x20, [sp, #8]
	str	x0, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	mov	w0, #0
	bl	_assert
LBB0_3:
	ldr	w8, [x19, #12]
Lloh13:
	adrp	x9, _SUPPORT_INDEX_MAGIC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SUPPORT_INDEX_MAGIC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x22]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	ldr	w0, [x22]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	ldr	w8, [x19, #12]
	stp	x8, x20, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	mov	w0, #0
	bl	_assert
LBB0_5:
	ldr	w0, [x19, #4]
	bl	_assert
Lloh20:
	adrp	x20, _log_split_min@GOTPAGE
Lloh21:
	ldr	x20, [x20, _log_split_min@GOTPAGEOFF]
	ldp	w8, w9, [x19]
Lloh22:
	adrp	x23, _log_split_max@GOTPAGE
Lloh23:
	ldr	x23, [x23, _log_split_max@GOTPAGEOFF]
	str	w8, [x20]
	str	w9, [x23]
	ldr	w8, [x19, #8]
Lloh24:
	adrp	x24, _log_split_mod@GOTPAGE
Lloh25:
	ldr	x24, [x24, _log_split_mod@GOTPAGEOFF]
	str	w8, [x24]
	mov	x0, x19
	bl	_get_index_header_size
Lloh26:
	adrp	x8, _header_size@GOTPAGE
Lloh27:
	ldr	x8, [x8, _header_size@GOTPAGEOFF]
Lloh28:
	str	w0, [x8]
Lloh29:
	adrp	x8, _verbosity@GOTPAGE
Lloh30:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.6:
	ldr	w0, [x22]
	ldr	x8, [x21]
	ldr	w8, [x8]
	ldr	w9, [x20]
	ldr	w10, [x23]
	ldr	w11, [x24]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	ldr	w0, [x22]
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_7:
	mov	w0, #1
	b	LBB0_9
LBB0_8:
Lloh36:
	adrp	x8, _fd@GOTPAGE
Lloh37:
	ldr	x8, [x8, _fd@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	mov	w9, #-1
	str	w9, [x8]
Lloh39:
	adrp	x19, _header@GOTPAGE
Lloh40:
	ldr	x19, [x19, _header@GOTPAGEOFF]
	movi.2d	v0, #0000000000000000
Lloh41:
	adrp	x8, lCPI0_0@PAGE
Lloh42:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	str	d1, [x19]
	mov	w8, #1
	str	w8, [x19, #8]
	stp	q0, q0, [x19, #32]
	str	xzr, [x19, #24]
	bl	_time
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #16]
Lloh43:
	adrp	x8, _header_size@GOTPAGE
Lloh44:
	ldr	x8, [x8, _header_size@GOTPAGEOFF]
	mov	w9, #4
Lloh45:
	str	w9, [x8]
LBB0_9:
	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	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdr	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_fd,8,3                         ; @fd
	.comm	_header,64,3                    ; @header
	.comm	_header_size,4,2                ; @header_size
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"load_header\n"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"error reading header from index file: read %d bytes instead of %d at position %d: %m\n"

	.comm	_SUPPORT_INDEX_MAGIC,4,2        ; @SUPPORT_INDEX_MAGIC
l_.str.2:                               ; @.str.2
	.asciz	"bad support index file header\n"

l_.str.3:                               ; @.str.3
	.asciz	"magic = 0x%08x // offset = %d\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 %d\n"

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

.subsections_via_symbols
