	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function invalidate_tlbs_with_kiq
_invalidate_tlbs_with_kiq:              ## @invalidate_tlbs_with_kiq
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	leaq	8(%rdi), %rbx
	leaq	4(%rdi), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_amdgpu_ring_alloc
	movq	_PACKET3_INVALIDATE_TLBS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_PACKET3
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	movl	$1, %edi
	callq	_PACKET3_INVALIDATE_TLBS_DST_SEL
	movl	%eax, %r13d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PACKET3_INVALIDATE_TLBS_PASID
	orl	%eax, %r13d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_amdgpu_ring_write
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_amdgpu_fence_emit_polling
	movq	%rbx, %rdi
	callq	_amdgpu_ring_commit
	movq	%r12, %rdi
	callq	_spin_unlock
	movl	-48(%rbp), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_amdgpu_fence_wait_polling
	testq	%rax, %rax
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_DRM_ERROR
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_2:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET3_INVALIDATE_TLBS,4,2    ## @PACKET3_INVALIDATE_TLBS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wait for kiq fence error: %ld.\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_invalidate_tlbs_with_kiq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function invalidate_tlbs_with_kiq
_invalidate_tlbs_with_kiq:              ; @invalidate_tlbs_with_kiq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	add	x22, x0, #4
	mov	x0, x22
	bl	_spin_lock
	mov	x0, x19
	mov	w1, #12
	bl	_amdgpu_ring_alloc
Lloh0:
	adrp	x8, _PACKET3_INVALIDATE_TLBS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKET3_INVALIDATE_TLBS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	w0, #1
	bl	_PACKET3_INVALIDATE_TLBS_DST_SEL
	mov	x23, x0
	mov	x0, x21
	bl	_PACKET3_INVALIDATE_TLBS_PASID
	orr	w1, w0, w23
	mov	x0, x19
	bl	_amdgpu_ring_write
	add	x1, sp, #12
	mov	x0, x19
	bl	_amdgpu_fence_emit_polling
	mov	x0, x19
	bl	_amdgpu_ring_commit
	mov	x0, x22
	bl	_spin_unlock
	ldr	w1, [sp, #12]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_amdgpu_fence_wait_polling
	mov	x1, x0
	mov	w0, #0
	cmp	x1, #0
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh5:
	adrp	x8, _ETIME@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET3_INVALIDATE_TLBS,4,2    ; @PACKET3_INVALIDATE_TLBS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wait for kiq fence error: %ld.\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_invalidate_tlbs_with_kiq
.subsections_via_symbols
