	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function register_user_view
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_register_user_view:                    ## @register_user_view
	.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, %r12
	movq	(%rdi), %rax
	movq	_LEV_TARG_USER_VIEW@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movl	12(%r12), %edi
	callq	_get_user
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_account_user_online
	movq	_targeting_disabled@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_26:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$-1, %ebx
	testq	%r13, %r13
	je	LBB0_26
## %bb.2:
	movl	8(%r12), %r15d
	testl	%r15d, %r15d
	jle	LBB0_26
## %bb.3:
	movq	_MAX_ADS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_26
## %bb.4:
	movl	%r15d, %edi
	callq	_get_ad
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	%r15d, %edi
	callq	_ad_is_ancient
	testl	%eax, %eax
	je	LBB0_26
## %bb.6:
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_get_ad_f
LBB0_7:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_AdSpace@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	8(%r13), %esi
	movl	%r15d, %edx
	callq	_intree_lookup
	movl	$0, %ebx
	testq	%rax, %rax
	jne	LBB0_26
## %bb.8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_load_ancient_ad
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	%r14, %rbx
	movl	(%r14), %edi
	movl	4(%r13), %esi
	movl	%r15d, %edx
	callq	_intree_lookup
	movl	(%r14), %edi
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, %rsi
	callq	_TNODE
	movl	(%rax), %ebx
	incl	%ebx
	movl	%ebx, (%rax)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_12:
	movl	(%r13), %esi
	movl	%r15d, %edx
	callq	_intree_lookup
	movl	(%rbx), %edi
	testq	%rax, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_14
## %bb.13:
	movq	%rax, %rsi
	callq	_TNODE
	movl	(%rax), %ebx
	incl	%ebx
	movl	%ebx, (%rax)
	jmp	LBB0_15
LBB0_14:
	callq	_new_intree_node
	movq	%rbx, %r14
	movq	%rax, %rbx
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_TNODE
	movl	%r15d, 4(%rax)
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_TNODE
	movl	$1, (%rax)
	movl	(%r14), %edi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	(%r13), %esi
	movq	%rbx, %rdx
	callq	_intree_insert
	movl	%eax, (%r13)
	movq	_inactive_ad_nodes@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	$1, %ebx
LBB0_15:
	movl	%r15d, %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_incr_ad_views
	movq	_MAX_AD_VIEWS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %ecx
	cmpl	%eax, %ebx
	cmovll	%ebx, %ecx
	movslq	%ecx, %rbx
	movq	_AdStats@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rbx, %rcx
	shlq	$4, %rcx
	xorpd	%xmm0, %xmm0
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpeqsd	(%rax,%rcx), %xmm0
	movq	%xmm0, %rdi
	andl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_unlikely
	xorl	%r13d, %r13d
	testq	%rax, %rax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmoveq	%rbx, %r13
	movq	(%r15), %rax
	shlq	$4, %r13
	movsd	(%rax,%r13), %xmm0              ## xmm0 = mem[0],zero
	callq	_likely
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	movq	_AdStats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%rax,%r13), %xmm0
	divsd	(%rax,%r13), %xmm0
	movddup	%xmm0, %xmm1                    ## xmm1 = xmm0[0,0]
	movupd	(%r14), %xmm2
	addpd	%xmm1, %xmm2
	movupd	16(%r14), %xmm3
	movupd	%xmm2, (%r14)
	movapd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm1
	movddup	%xmm1, %xmm2                    ## xmm2 = xmm1[0,0]
	addpd	%xmm3, %xmm2
	movupd	%xmm2, 16(%r14)
	cmpq	$0, 32(%r14)
	jle	LBB0_19
## %bb.17:
	movq	_ADF_NEWVIEWS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 40(%r14)
	je	LBB0_19
## %bb.18:
	movq	_total_sump1@GOTPCREL(%rip), %rax
	addsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
	movq	_total_sump2@GOTPCREL(%rip), %rax
	addsd	(%rax), %xmm1
	movsd	%xmm1, (%rax)
LBB0_19:
	movq	%r14, %rdi
	callq	_compute_ad_lambda
LBB0_20:
	movl	40(%r14), %eax
	movq	_ADF_ANYVIEWS@GOTPCREL(%rip), %rdx
	movq	_ADF_NEWVIEWS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, (%rdx)
	jne	LBB0_22
## %bb.21:
	orl	%ecx, %eax
	movl	%eax, 40(%r14)
LBB0_22:
	testl	%eax, %ecx
	je	LBB0_25
## %bb.23:
	cmpq	$0, 32(%r14)
	jle	LBB0_25
## %bb.24:
	movq	_AdStats@GOTPCREL(%rip), %r15
	movq	8(%r15), %rax
	incl	(%rax)
	movq	(%r15), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	addsd	LCPI0_0(%rip), %xmm0
	movsd	%xmm0, (%rax)
	xorl	%edi, %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	testl	%ebx, %ebx
	setg	%dil
	callq	_assert
	movq	8(%r15), %rax
	incl	(%rax,%rbx,4)
	movq	(%r15), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	addsd	(%rax,%rcx), %xmm0
	movsd	%xmm0, (%rax,%rcx)
LBB0_25:
	movl	12(%r12), %esi
	movq	%r14, %rdi
	callq	_register_one_view
	movl	$1, %ebx
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_LEV_TARG_USER_VIEW,8,3         ## @LEV_TARG_USER_VIEW
	.comm	_targeting_disabled,8,3         ## @targeting_disabled
	.comm	_MAX_ADS,4,2                    ## @MAX_ADS
	.comm	_AdSpace,4,2                    ## @AdSpace
	.comm	_inactive_ad_nodes,4,2          ## @inactive_ad_nodes
	.comm	_MAX_AD_VIEWS,4,2               ## @MAX_AD_VIEWS
	.comm	_AdStats,16,3                   ## @AdStats
	.comm	_ADF_NEWVIEWS,4,2               ## @ADF_NEWVIEWS
	.comm	_total_sump1,8,3                ## @total_sump1
	.comm	_total_sump2,8,3                ## @total_sump2
	.comm	_ADF_ANYVIEWS,4,2               ## @ADF_ANYVIEWS
	.no_dead_strip	_register_user_view
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function register_user_view
_register_user_view:                    ; @register_user_view
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _LEV_TARG_USER_VIEW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LEV_TARG_USER_VIEW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #12]
	bl	_get_user
	mov	x22, x0
	bl	_account_user_online
Lloh3:
	adrp	x8, _targeting_disabled@GOTPAGE
Lloh4:
	ldr	x8, [x8, _targeting_disabled@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_4
LBB0_2:
	ldr	w21, [x19, #8]
Lloh6:
	adrp	x8, _MAX_ADS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_ADS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x22, #0
	ccmp	w21, #1, #8, ne
	ccmp	w21, w8, #0, ge
	b.lt	LBB0_5
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x21
	bl	_get_ad
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_ad_is_ancient
	cbz	w0, LBB0_3
; %bb.7:
	mov	x0, x21
	mov	w1, #1
	bl	_get_ad_f
	mov	x20, x0
LBB0_8:
Lloh9:
	adrp	x24, _AdSpace@GOTPAGE
Lloh10:
	ldr	x24, [x24, _AdSpace@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w1, [x22, #8]
	mov	x2, x21
	bl	_intree_lookup
	cbnz	x0, LBB0_1
; %bb.9:
	mov	x0, x20
	bl	_load_ancient_ad
	tbnz	w0, #31, LBB0_4
; %bb.10:
	ldr	w0, [x24]
	ldr	w1, [x22, #4]
	mov	x2, x21
	bl	_intree_lookup
	mov	x1, x0
	ldr	w0, [x24]
	cbnz	x1, LBB0_12
; %bb.11:
	ldr	w1, [x22]
	mov	x2, x21
	bl	_intree_lookup
	mov	x1, x0
	ldr	w0, [x24]
	cbz	x1, LBB0_24
LBB0_12:
	bl	_TNODE
	ldr	w8, [x0]
	add	w25, w8, #1
	str	w25, [x0]
LBB0_13:
	mov	x0, x21
	mov	w1, #1
	mov	w2, #1
	bl	_incr_ad_views
Lloh11:
	adrp	x8, _MAX_AD_VIEWS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAX_AD_VIEWS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	sub	w9, w8, #1
	cmp	w25, w8
	csel	w8, w25, w9, lt
	sxtw	x21, w8
Lloh14:
	adrp	x22, _AdStats@GOTPAGE
Lloh15:
	ldr	x22, [x22, _AdStats@GOTPAGEOFF]
	ldr	x9, [x22]
	sbfiz	x8, x8, #4, #32
	ldr	d0, [x9, x8]
	fcmp	d0, #0.0
	cset	w0, eq
	bl	_unlikely
	cmp	x0, #0
	csel	x24, x21, xzr, eq
	ldr	x8, [x22]
	lsl	x9, x24, #4
	ldr	d0, [x8, x9]
	bl	_likely
Lloh16:
	adrp	x23, _ADF_NEWVIEWS@GOTPAGE
Lloh17:
	ldr	x23, [x23, _ADF_NEWVIEWS@GOTPAGEOFF]
	cbz	x0, LBB0_18
; %bb.14:
	ldr	x8, [x22]
	add	x8, x8, x24, lsl #4
	ldp	d1, d0, [x8]
	scvtf	d0, d0
	fdiv	d0, d0, d1
	ldr	q1, [x20]
	dup.2d	v2, v0[0]
	fadd.2d	v1, v1, v2
	str	q1, [x20]
	ldp	d1, d2, [x20, #16]
	fmadd	d1, d0, d0, d1
	fmadd	d2, d0, d0, d2
	stp	d1, d2, [x20, #16]
	ldr	x8, [x20, #32]
	cmp	x8, #1
	b.lt	LBB0_17
; %bb.15:
	ldr	w8, [x20, #40]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
Lloh18:
	adrp	x8, _total_sump1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _total_sump1@GOTPAGEOFF]
	ldr	d1, [x8]
	fadd	d1, d0, d1
	str	d1, [x8]
Lloh20:
	adrp	x8, _total_sump2@GOTPAGE
Lloh21:
	ldr	x8, [x8, _total_sump2@GOTPAGEOFF]
	ldr	d1, [x8]
	fmadd	d0, d0, d0, d1
	str	d0, [x8]
LBB0_17:
	mov	x0, x20
	bl	_compute_ad_lambda
LBB0_18:
	ldr	w8, [x20, #40]
Lloh22:
	adrp	x9, _ADF_ANYVIEWS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ADF_ANYVIEWS@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x9]
	ldr	w9, [x23]
	tst	w10, w8
	b.ne	LBB0_20
; %bb.19:
	orr	w8, w9, w8
	str	w8, [x20, #40]
LBB0_20:
	tst	w9, w8
	b.eq	LBB0_23
; %bb.21:
	ldr	x8, [x20, #32]
	cmp	x8, #1
	b.lt	LBB0_23
; %bb.22:
	ldp	x9, x8, [x22]
	ldr	w10, [x8]
	add	w10, w10, #1
	str	w10, [x8]
	ldr	d0, [x9]
	fmov	d8, #1.00000000
	fadd	d0, d0, d8
	str	d0, [x9]
	cmp	w21, #0
	cset	w0, gt
	bl	_assert
	lsl	x8, x21, #2
	ldp	x10, x9, [x22]
	ldr	w11, [x9, x8]
	add	w11, w11, #1
	str	w11, [x9, x8]
	lsl	x8, x21, #4
	ldr	d0, [x10, x8]
	fadd	d0, d0, d8
	str	d0, [x10, x8]
LBB0_23:
	ldr	w1, [x19, #12]
	mov	x0, x20
	bl	_register_one_view
	mov	w0, #1
	b	LBB0_4
LBB0_24:
	bl	_new_intree_node
	mov	x23, x0
	ldr	w0, [x24]
	mov	x1, x23
	bl	_TNODE
	str	w21, [x0, #4]
	ldr	w0, [x24]
	mov	x1, x23
	bl	_TNODE
	mov	w25, #1
	str	w25, [x0]
	ldr	w0, [x24]
	ldr	w1, [x22]
	mov	x2, x23
	bl	_intree_insert
	str	w0, [x22]
Lloh25:
	adrp	x8, _inactive_ad_nodes@GOTPAGE
Lloh26:
	ldr	x8, [x8, _inactive_ad_nodes@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_LEV_TARG_USER_VIEW,8,3         ; @LEV_TARG_USER_VIEW
	.comm	_targeting_disabled,8,3         ; @targeting_disabled
	.comm	_MAX_ADS,4,2                    ; @MAX_ADS
	.comm	_AdSpace,4,2                    ; @AdSpace
	.comm	_inactive_ad_nodes,4,2          ; @inactive_ad_nodes
	.comm	_MAX_AD_VIEWS,4,2               ; @MAX_AD_VIEWS
	.comm	_AdStats,16,3                   ; @AdStats
	.comm	_ADF_NEWVIEWS,4,2               ; @ADF_NEWVIEWS
	.comm	_total_sump1,8,3                ; @total_sump1
	.comm	_total_sump2,8,3                ; @total_sump2
	.comm	_ADF_ANYVIEWS,4,2               ; @ADF_ANYVIEWS
	.no_dead_strip	_register_user_view
.subsections_via_symbols
