	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_set_ad_aud                  ## -- Begin function do_set_ad_aud
	.p2align	4, 0x90
_do_set_ad_aud:                         ## @do_set_ad_aud
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r12d
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_get_ad_f
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	_ADF_ANCIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_ad_became_ancient
	testl	%r14d, %r14d
	jle	LBB0_7
## %bb.3:
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_MAX_AD_AUD@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jle	LBB0_7
## %bb.5:
	movl	$1, %r15d
	cmpq	$0, 8(%rbx)
	jle	LBB0_7
## %bb.6:
	cmpl	%r14d, 16(%rbx)
	je	LBB0_7
## %bb.8:
	movq	_LEV_TARG_AD_SETAUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$12, %esi
	movl	%r12d, %edx
	callq	_alloc_log_event
	movl	%r14d, (%rax)
	movq	%rax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_ad_aud                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ADF_ANCIENT,4,2                ## @ADF_ANCIENT
	.comm	_MAX_AD_AUD,4,2                 ## @MAX_AD_AUD
	.comm	_LEV_TARG_AD_SETAUD,4,2         ## @LEV_TARG_AD_SETAUD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_set_ad_aud                  ; -- Begin function do_set_ad_aud
	.p2align	2
_do_set_ad_aud:                         ; @do_set_ad_aud
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w1, #0
	bl	_get_ad_f
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, 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
; %bb.2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x21
	bl	_ad_became_ancient
	mov	x8, x0
	mov	w0, #0
	cmp	w19, #1
	b.lt	LBB0_3
; %bb.5:
	cbnz	x8, LBB0_3
; %bb.6:
Lloh3:
	adrp	x8, _MAX_AD_AUD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_AD_AUD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_3
; %bb.7:
	ldr	x8, [x21, #8]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.8:
	ldr	w8, [x21, #16]
	cmp	w8, w19
	b.ne	LBB0_10
LBB0_9:
	mov	w0, #1
	b	LBB0_3
LBB0_10:
Lloh6:
	adrp	x8, _LEV_TARG_AD_SETAUD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LEV_TARG_AD_SETAUD@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #12
	mov	x2, x20
	bl	_alloc_log_event
	str	w19, [x0]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_set_ad_aud
	.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	_MAX_AD_AUD,4,2                 ; @MAX_AD_AUD
	.comm	_LEV_TARG_AD_SETAUD,4,2         ; @LEV_TARG_AD_SETAUD
.subsections_via_symbols
