	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad_disable
_ad_disable:                            ## @ad_disable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_ADF_ON@GOTPCREL(%rip), %r15
	movl	$1, %r14d
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.3:
	movq	_ADF_ANCIENT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	sete	%dil
	callq	_assert
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movq	_active_ads@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	_now@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	(%rbx), %eax
	movq	_ADF_DELAYED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.5:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_4:
	movq	%rbx, %rdi
	callq	_deactivate_ad
LBB0_6:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %edx
	movl	8(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_8:
	movq	%rbx, %rdi
	callq	_reinsert_lru_ad_last
	xorl	%eax, %eax
	callq	_process_lru_ads
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADF_ON,4,2                     ## @ADF_ON
	.comm	_ADF_ANCIENT,4,2                ## @ADF_ANCIENT
	.comm	_active_ads,4,2                 ## @active_ads
	.comm	_now,4,2                        ## @now
	.comm	_ADF_DELAYED,4,2                ## @ADF_DELAYED
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disabled previously enabled ad #%d: %d users\n"

	.no_dead_strip	_ad_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad_disable
_ad_disable:                            ; @ad_disable
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x20, _ADF_ON@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ADF_ON@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.2:
Lloh2:
	adrp	x9, _ADF_ANCIENT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ADF_ANCIENT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_assert
	ldr	w8, [x20]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh5:
	adrp	x8, _active_ads@GOTPAGE
Lloh6:
	ldr	x8, [x8, _active_ads@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
Lloh7:
	adrp	x8, _now@GOTPAGE
Lloh8:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _ADF_DELAYED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ADF_DELAYED@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bic	w8, w8, w9
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_deactivate_ad
LBB0_5:
Lloh13:
	adrp	x8, _verbosity@GOTPAGE
Lloh14:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_7
; %bb.6:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	w2, w3, [x19, #4]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_7:
	mov	x0, x19
	bl	_reinsert_lru_ad_last
	bl	_process_lru_ads
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ADF_ON,4,2                     ; @ADF_ON
	.comm	_ADF_ANCIENT,4,2                ; @ADF_ANCIENT
	.comm	_active_ads,4,2                 ; @active_ads
	.comm	_now,4,2                        ; @now
	.comm	_ADF_DELAYED,4,2                ; @ADF_DELAYED
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disabled previously enabled ad #%d: %d users\n"

	.no_dead_strip	_ad_disable
.subsections_via_symbols
