	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save_stats_file                ## -- Begin function save_stats_file
	.p2align	4, 0x90
_save_stats_file:                       ## @save_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	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	%r14, %rdx
	callq	_fprintf
LBB0_2:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r14, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	_AdStats@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_write
	xorl	%edi, %edi
	cmpl	$4, %eax
	sete	%dil
	callq	_assert
	movl	%ebx, %edi
	callq	_close
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	movl	$1, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_fprintf
	movl	$-1, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	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	"saving global click/view statistics to %s\n"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
L_.str.1:                               ## @.str.1
	.asciz	"cannot open statistics file %s for writing: %m\n"

	.comm	_AdStats,4,2                    ## @AdStats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save_stats_file                ; -- Begin function save_stats_file
	.p2align	2
_save_stats_file:                       ; @save_stats_file
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	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_WRONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x19
	mov	w2, #420
	bl	_open
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh16:
	adrp	x8, _AdStats@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AdStats@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_write
	cmp	w0, #4
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	bl	_close
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_fprintf
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"saving global click/view statistics to %s\n"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
l_.str.1:                               ; @.str.1
	.asciz	"cannot open statistics file %s for writing: %m\n"

	.comm	_AdStats,4,2                    ; @AdStats
.subsections_via_symbols
