	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function compute_estimated_gain
LCPI0_0:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
LCPI0_1:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_compute_estimated_gain
	.p2align	4, 0x90
_compute_estimated_gain:                ## @compute_estimated_gain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_compute_ad_lambda
	movsd	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_7
## %bb.1:
	movl	8(%rbx), %edi
	testl	%edi, %edi
	jne	LBB0_5
## %bb.2:
	movl	12(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.4:
	movq	_log_split_mod@GOTPCREL(%rip), %rax
	imull	(%rax), %edi
LBB0_5:
	callq	_compute_projected_views
LBB0_6:
	movq	_INIT_L_CLICKS@GOTPCREL(%rip), %rcx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	24(%rbx), %xmm1                 ## xmm1 = mem[0],zero
	movsd	32(%rbx), %xmm2                 ## xmm2 = mem[0],zero
	movhpd	48(%rbx), %xmm2                 ## xmm2 = xmm2[0],mem[0]
	movhpd	40(%rbx), %xmm1                 ## xmm1 = xmm1[0],mem[0]
	mulpd	LCPI0_1(%rip), %xmm2
	addpd	%xmm1, %xmm2
	movsd	(%rcx), %xmm1                   ## xmm1 = mem[0],zero
	unpcklpd	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	addpd	%xmm2, %xmm1
	movsd	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm1                    ## xmm1 = xmm1[1,1]
	divsd	%xmm1, %xmm0
	jmp	LBB0_8
LBB0_7:
	xorpd	LCPI0_0(%rip), %xmm0
	movq	_VIEW_GAIN_MULTIPLIER@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	movq	_MONEY_SCALE@GOTPCREL(%rip), %rax
	divsd	(%rax), %xmm0
LBB0_8:
	movsd	%xmm0, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_INIT_L_VIEWS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_INIT_L_VIEWS,4,2               ## @INIT_L_VIEWS
	.comm	_log_split_mod,4,2              ## @log_split_mod
	.comm	_INIT_L_CLICKS,8,3              ## @INIT_L_CLICKS
	.comm	_VIEW_GAIN_MULTIPLIER,8,3       ## @VIEW_GAIN_MULTIPLIER
	.comm	_MONEY_SCALE,8,3                ## @MONEY_SCALE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_compute_estimated_gain         ; -- Begin function compute_estimated_gain
	.p2align	2
_compute_estimated_gain:                ; @compute_estimated_gain
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_compute_ad_lambda
	ldr	d0, [x19]
	fcmp	d0, #0.0
	b.le	LBB0_6
; %bb.1:
	ldr	w0, [x19, #8]
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_8
; %bb.3:
Lloh0:
	adrp	x9, _log_split_mod@GOTPAGE
Lloh1:
	ldr	x9, [x9, _log_split_mod@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w0, w9, w8
LBB0_4:
	bl	_compute_projected_views
LBB0_5:
	ldr	d0, [x19]
	ldp	d1, d2, [x19, #24]
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16313, lsl #48
	fmov	d3, x8
	fmadd	d1, d2, d3, d1
Lloh3:
	adrp	x8, _INIT_L_CLICKS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INIT_L_CLICKS@GOTPAGEOFF]
Lloh5:
	ldr	d2, [x8]
	fadd	d1, d1, d2
	fmul	d0, d0, d1
	ldp	d1, d2, [x19, #40]
	fmadd	d1, d2, d3, d1
	scvtf	d2, w0
	fadd	d1, d1, d2
	b	LBB0_7
LBB0_6:
	fneg	d0, d0
Lloh6:
	adrp	x8, _VIEW_GAIN_MULTIPLIER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIEW_GAIN_MULTIPLIER@GOTPAGEOFF]
Lloh8:
	ldr	d1, [x8]
	fmul	d0, d1, d0
Lloh9:
	adrp	x8, _MONEY_SCALE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MONEY_SCALE@GOTPAGEOFF]
Lloh11:
	ldr	d1, [x8]
LBB0_7:
	fdiv	d0, d0, d1
	str	d0, [x19, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh12:
	adrp	x8, _INIT_L_VIEWS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INIT_L_VIEWS@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_INIT_L_VIEWS,4,2               ; @INIT_L_VIEWS
	.comm	_log_split_mod,4,2              ; @log_split_mod
	.comm	_INIT_L_CLICKS,8,3              ; @INIT_L_CLICKS
	.comm	_VIEW_GAIN_MULTIPLIER,8,3       ; @VIEW_GAIN_MULTIPLIER
	.comm	_MONEY_SCALE,8,3                ; @MONEY_SCALE
.subsections_via_symbols
