	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function do_set_ad_sump
LCPI0_0:
	.quad	0x3df0000000000000              ## double 2.3283064365386963E-10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_do_set_ad_sump
	.p2align	4, 0x90
_do_set_ad_sump:                        ## @do_set_ad_sump
	.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	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%edi, %r13d
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_get_ad_f
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %rbx
	movq	_ADF_ANCIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_ad_became_ancient
	testq	%r12, %r12
	jle	LBB0_13
## %bb.3:
	testq	%r14, %r14
	jle	LBB0_13
## %bb.4:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	js	LBB0_13
## %bb.5:
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_7
## %bb.8:
	cvtsi2sdq	-48(%rbp), %xmm0        ## 8-byte Folded Reload
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %rsi
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %rdx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %rcx
	leaq	-56(%rbp), %r8
	callq	_compute_ad_lambda_delta
	movsd	-56(%rbp), %xmm1                ## xmm1 = mem[0],zero
	movq	_ESTIMATED_GAIN_EPS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %ecx
	subl	%eax, %ecx
	movl	16(%rbx), %edx
	movl	%ecx, %esi
	imull	%edx, %esi
	cvtsi2sd	%esi, %xmm2
	ucomisd	%xmm2, %xmm1
	jb	LBB0_12
## %bb.9:
	incl	%eax
	imull	%eax, %edx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%edx, %xmm2
	ucomisd	%xmm1, %xmm2
	jb	LBB0_12
## %bb.10:
	movl	20(%rbx), %edx
	imull	%edx, %ecx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ecx, %xmm1
	ucomisd	%xmm1, %xmm0
	jb	LBB0_12
## %bb.11:
	imull	%eax, %edx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%edx, %xmm1
	movl	$1, %r15d
	ucomisd	%xmm0, %xmm1
	jae	LBB0_13
LBB0_12:
	movq	_LEV_TARG_AD_SETSUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$32, %esi
	movl	%r13d, %edx
	callq	_alloc_log_event
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movq	%r14, 8(%rax)
	movq	%r12, 16(%rax)
	movq	%rax, %rdi
	callq	_set_ad_sump
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_7:
	movl	$1, %r15d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ADF_ANCIENT,4,2                ## @ADF_ANCIENT
	.comm	_ESTIMATED_GAIN_EPS,4,2         ## @ESTIMATED_GAIN_EPS
	.comm	_LEV_TARG_AD_SETSUMP,4,2        ## @LEV_TARG_AD_SETSUMP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_set_ad_sump                 ; -- Begin function do_set_ad_sump
	.p2align	2
_do_set_ad_sump:                        ; @do_set_ad_sump
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w1, #0
	bl	_get_ad_f
	cbz	x0, LBB0_2
; %bb.1:
	mov	x23, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _ADF_ANCIENT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADF_ANCIENT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	w24, #0
LBB0_3:
	mov	x0, x24
	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
	add	sp, sp, #80
	ret
LBB0_4:
	mov	x0, x23
	bl	_ad_became_ancient
	mov	w24, #0
	cmp	x19, #1
	b.lt	LBB0_3
; %bb.5:
	cmp	x20, #1
	b.lt	LBB0_3
; %bb.6:
	tbnz	x21, #63, LBB0_3
; %bb.7:
	cbnz	x0, LBB0_3
; %bb.8:
	ldr	x0, [x23, #8]
	mov	w24, #1
	cmp	x0, #1
	b.lt	LBB0_3
; %bb.9:
	scvtf	d0, x21
	mov	x8, #4463067230724161536
	fmov	d1, x8
	fmul	d0, d0, d1
	fcvtzs	x1, d0
	scvtf	d0, x20
	fmul	d0, d0, d1
	fcvtzs	x2, d0
	scvtf	d0, x19
	fmul	d0, d0, d1
	fcvtzs	x3, d0
	add	x4, sp, #8
	bl	_compute_ad_lambda_delta
	ldr	d1, [sp, #8]
Lloh3:
	adrp	x8, _ESTIMATED_GAIN_EPS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ESTIMATED_GAIN_EPS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	sub	w8, w24, w9
	ldr	w10, [x23, #16]
	mul	w11, w8, w10
	scvtf	d2, w11
	fcmp	d1, d2
	add	w9, w9, #1
	mul	w10, w9, w10
	scvtf	d2, w10
	fccmp	d1, d2, #2, ge
	b.ls	LBB0_11
LBB0_10:
Lloh6:
	adrp	x8, _LEV_TARG_AD_SETSUMP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LEV_TARG_AD_SETSUMP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #32
	mov	x2, x22
	bl	_alloc_log_event
	stp	x21, x20, [x0]
	str	x19, [x0, #16]
	bl	_set_ad_sump
	mov	x24, x0
	b	LBB0_3
LBB0_11:
	ldr	w10, [x23, #20]
	mul	w8, w10, w8
	scvtf	d1, w8
	fcmp	d0, d1
	mul	w8, w10, w9
	scvtf	d1, w8
	fccmp	d0, d1, #2, ge
	b.hi	LBB0_10
; %bb.12:
	mov	w24, #1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ADF_ANCIENT,4,2                ; @ADF_ANCIENT
	.comm	_ESTIMATED_GAIN_EPS,4,2         ; @ESTIMATED_GAIN_EPS
	.comm	_LEV_TARG_AD_SETSUMP,4,2        ; @LEV_TARG_AD_SETSUMP
.subsections_via_symbols
