	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_stats_file                ## -- Begin function load_stats_file
	.p2align	4, 0x90
_load_stats_file:                       ## @load_stats_file
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_fprintf
LBB0_2:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_AdStats@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	movl	$8, %edx
	callq	_read
	xorl	%edi, %edi
	cmpl	$8, %eax
	sete	%dil
	callq	_assert
	movq	(%r12), %rax
	movq	(%rax), %rbx
	movq	8(%rax), %r13
	xorl	%edi, %edi
	movq	%rbx, %rax
	orq	%r13, %rax
	setns	%dil
	callq	_assert
	movq	_MAX_AD_VIEWS@GOTPCREL(%rip), %rax
	cmpq	$2, (%rax)
	jl	LBB0_13
## %bb.5:
	movq	(%r12), %rax
	movl	$1, %r15d
	movl	$24, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpq	%r13, (%rax,%r14)
	setle	%al
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	(%r12), %rax
	subq	-8(%rax,%r14), %rbx
	subq	(%rax,%r14), %r13
	incq	%r15
	addq	$16, %r14
	movq	_MAX_AD_VIEWS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r15
	jge	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -8(%rax,%r14)
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%rax,%r14)
	setns	%al
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	(%r12), %rax
	cmpq	%rbx, -8(%rax,%r14)
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_13:
	xorl	%edi, %edi
	orq	%r13, %rbx
	sete	%dil
	callq	_assert
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movq	(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %r8
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %ebx
	movl	$1, %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_vkprintf
	jmp	LBB0_14
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_fprintf
	movl	$-1, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loading global click/view statistics from %s\n"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"cannot open statistics file %s: %m\n"

	.comm	_AdStats,8,3                    ## @AdStats
	.comm	_MAX_AD_VIEWS,8,3               ## @MAX_AD_VIEWS
L_.str.2:                               ## @.str.2
	.asciz	"loaded global click/view statistics from file %s, %lld/%lld clicks/views\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_stats_file                ; -- Begin function load_stats_file
	.p2align	2
_load_stats_file:                       ; @load_stats_file
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _verbosity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _stderr@GOTPAGE
Lloh4:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_fprintf
LBB0_2:
Lloh7:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	tbnz	w0, #31, LBB0_13
; %bb.3:
	mov	x20, x0
Lloh10:
	adrp	x21, _AdStats@GOTPAGE
Lloh11:
	ldr	x21, [x21, _AdStats@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	w2, #8
	bl	_read
	cmp	w0, #8
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	ldp	x22, x23, [x8]
	orr	x8, x22, x23
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_assert
Lloh12:
	adrp	x24, _MAX_AD_VIEWS@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MAX_AD_VIEWS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, #2
	b.lt	LBB0_12
; %bb.4:
	mov	x25, #0
	ldr	x8, [x21]
	mov	w26, #1
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x8, #24]
	cmp	x8, x23
	cset	w0, le
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_assert
	ldr	x8, [x21]
	add	x9, x8, x25
	ldp	x10, x9, [x9, #16]
	sub	x22, x22, x10
	sub	x23, x23, x9
	add	x26, x26, #1
	ldr	x9, [x24]
	add	x25, x25, #16
	cmp	x26, x9
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x25
	ldr	x9, [x8, #16]
	tbnz	x9, #63, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x8, #24]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #0
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_assert
	ldr	x8, [x21]
	add	x8, x8, x25
	ldr	x9, [x8, #16]
	cmp	x9, x22
	b.le	LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #0
	b	LBB0_6
LBB0_12:
	orr	x8, x22, x23
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	bl	_close
	ldr	x8, [x21]
	ldp	x3, x4, [x8]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w20, #1
	mov	w0, #1
	mov	x2, x19
	bl	_vkprintf
	b	LBB0_14
LBB0_13:
	ldr	w0, [x21]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_fprintf
	mov	w20, #-1
LBB0_14:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loading global click/view statistics from %s\n"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"cannot open statistics file %s: %m\n"

	.comm	_AdStats,8,3                    ; @AdStats
	.comm	_MAX_AD_VIEWS,8,3               ; @MAX_AD_VIEWS
l_.str.2:                               ; @.str.2
	.asciz	"loaded global click/view statistics from file %s, %lld/%lld clicks/views\n"

.subsections_via_symbols
