	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_push_user_ad_std          ## -- Begin function heap_push_user_ad_std
	.p2align	4, 0x90
_heap_push_user_ad_std:                 ## @heap_push_user_ad_std
	.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, %rax
	movl	(%rdi), %edi
	movq	___exclude_ad_id@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edi
	je	LBB0_8
## %bb.1:
	movl	4(%rax), %r14d
	callq	_get_ad
	movq	%rax, %rbx
	movl	(%rax), %eax
	movq	___xor_mask@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%eax, %ecx
	movq	___and_mask@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_8
## %bb.2:
	movq	___use_views_limit@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	8(%rbx), %rcx
	cmpq	16(%rbx), %rcx
	jge	LBB0_8
LBB0_4:
	movq	_ADF_LIMIT_VIEWS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	cmpq	$0, 24(%rbx)
	jg	LBB0_7
## %bb.6:
	cmpl	$99, %r14d
	jg	LBB0_8
LBB0_7:
	movq	___user_id@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_calculate_expected_view_gain
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_heap_insert
LBB0_8:
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___exclude_ad_id,4,2            ## @__exclude_ad_id
	.comm	___xor_mask,4,2                 ## @__xor_mask
	.comm	___and_mask,4,2                 ## @__and_mask
	.comm	___use_views_limit,8,3          ## @__use_views_limit
	.comm	_ADF_LIMIT_VIEWS,4,2            ## @ADF_LIMIT_VIEWS
	.comm	___user_id,4,2                  ## @__user_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heap_push_user_ad_std          ; -- Begin function heap_push_user_ad_std
	.p2align	2
_heap_push_user_ad_std:                 ; @heap_push_user_ad_std
	.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	x8, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x9, ___exclude_ad_id@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___exclude_ad_id@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w0, w9
	b.eq	LBB0_8
; %bb.1:
	ldr	w19, [x8, #4]
	bl	_get_ad
	ldr	w8, [x0]
Lloh3:
	adrp	x9, ___xor_mask@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___xor_mask@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	eor	w9, w9, w8
Lloh6:
	adrp	x10, ___and_mask@GOTPAGE
Lloh7:
	ldr	x10, [x10, ___and_mask@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w9, w10
	b.ne	LBB0_8
; %bb.2:
	mov	x20, x0
Lloh9:
	adrp	x9, ___use_views_limit@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___use_views_limit@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cbz	x9, LBB0_4
; %bb.3:
	ldp	x9, x10, [x20, #8]
	cmp	x9, x10
	b.ge	LBB0_8
LBB0_4:
Lloh12:
	adrp	x9, _ADF_LIMIT_VIEWS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADF_LIMIT_VIEWS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	x8, [x20, #24]
	cmp	x8, #0
	b.gt	LBB0_7
; %bb.6:
	cmp	w19, #99
	b.gt	LBB0_8
LBB0_7:
Lloh15:
	adrp	x8, ___user_id@GOTPAGE
Lloh16:
	ldr	x8, [x8, ___user_id@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_calculate_expected_view_gain
	mov	x0, x20
	mov	x1, x19
	bl	_heap_insert
LBB0_8:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	___exclude_ad_id,4,2            ; @__exclude_ad_id
	.comm	___xor_mask,4,2                 ; @__xor_mask
	.comm	___and_mask,4,2                 ; @__and_mask
	.comm	___use_views_limit,8,3          ; @__use_views_limit
	.comm	_ADF_LIMIT_VIEWS,4,2            ; @ADF_LIMIT_VIEWS
	.comm	___user_id,4,2                  ; @__user_id
.subsections_via_symbols
