	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clear_ahg
_clear_ahg:                             ## @clear_ahg
	.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
	movq	16(%rdi), %rax
	movq	8(%rax), %rcx
	movq	$0, (%rcx)
	movq	_HFI1_S_AHG_VALID@GOTPCREL(%rip), %rcx
	movq	_HFI1_S_AHG_CLEAR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, (%rdi)
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_3
## %bb.2:
	callq	_sdma_ahg_free
LBB0_3:
	movq	$-1, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_S_AHG_VALID,4,2           ## @HFI1_S_AHG_VALID
	.comm	_HFI1_S_AHG_CLEAR,4,2           ## @HFI1_S_AHG_CLEAR
	.no_dead_strip	_clear_ahg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clear_ahg
_clear_ahg:                             ; @clear_ahg
	.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
	ldr	x8, [x0, #16]
	ldp	x0, x9, [x8]
	str	xzr, [x9]
Lloh0:
	adrp	x8, _HFI1_S_AHG_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HFI1_S_AHG_VALID@GOTPAGEOFF]
Lloh2:
	adrp	x9, _HFI1_S_AHG_CLEAR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HFI1_S_AHG_CLEAR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x1, [x19, #8]
	tbnz	x1, #63, LBB0_3
; %bb.2:
	bl	_sdma_ahg_free
LBB0_3:
	mov	x8, #-1
	str	x8, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_S_AHG_VALID,4,2           ; @HFI1_S_AHG_VALID
	.comm	_HFI1_S_AHG_CLEAR,4,2           ; @HFI1_S_AHG_CLEAR
	.no_dead_strip	_clear_ahg
.subsections_via_symbols
