	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function invalidate_tlbs
_invalidate_tlbs:                       ## @invalidate_tlbs
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_amdgpu_emu_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	$16, %ebx
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_amdgpu_amdkfd_is_kfd_vmid
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_get_atc_vmid_pasid_mapping_valid
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_get_atc_vmid_pasid_mapping_pasid
	cmpl	%r14d, %eax
	jne	LBB0_8
## %bb.5:
	movq	_AMDGPU_GFXHUB_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_amdgpu_gmc_flush_gpu_tlb
LBB0_9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, (%r15)
	je	LBB0_1
## %bb.7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_invalidate_tlbs_with_kiq       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_amdgpu_emu_mode,8,3            ## @amdgpu_emu_mode
	.comm	_AMDGPU_GFXHUB_0,4,2            ## @AMDGPU_GFXHUB_0
	.no_dead_strip	_invalidate_tlbs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function invalidate_tlbs
_invalidate_tlbs:                       ; @invalidate_tlbs
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _amdgpu_emu_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _amdgpu_emu_mode@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
LBB0_1:
	mov	w21, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
	cmp	w21, #16
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_amdgpu_amdkfd_is_kfd_vmid
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_get_atc_vmid_pasid_mapping_valid
	cbz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_get_atc_vmid_pasid_mapping_pasid
	cmp	w0, w20
	b.ne	LBB0_2
; %bb.6:
Lloh3:
	adrp	x8, _AMDGPU_GFXHUB_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMDGPU_GFXHUB_0@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_amdgpu_gmc_flush_gpu_tlb
LBB0_7:
	mov	w0, #0
	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_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_1
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	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	_invalidate_tlbs_with_kiq
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_amdgpu_emu_mode,8,3            ; @amdgpu_emu_mode
	.comm	_AMDGPU_GFXHUB_0,4,2            ; @AMDGPU_GFXHUB_0
	.no_dead_strip	_invalidate_tlbs
.subsections_via_symbols
