	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gart_bind               ## -- Begin function amdgpu_gart_bind
	.p2align	4, 0x90
_amdgpu_gart_bind:                      ## @amdgpu_gart_bind
	.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
	cmpl	$0, 24(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movl	8(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	movq	%r8, %rcx
	movl	%r9d, %r8d
	movl	%eax, %r9d
	callq	_amdgpu_gart_map
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_mb
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_asic_flush_hdp
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_amdgpu_gmc_flush_gpu_tlb
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_7
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_3:
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trying to bind memory to uninitialized GART !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AMDGPU_GPU_PAGES_IN_CPU_PAGE,4,2 ## @AMDGPU_GPU_PAGES_IN_CPU_PAGE
	.comm	_AMDGPU_GPU_PAGE_SIZE,4,2       ## @AMDGPU_GPU_PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gart_bind               ; -- Begin function amdgpu_gart_bind
	.p2align	2
_amdgpu_gart_bind:                      ; @amdgpu_gart_bind
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x3, x4
	mov	x4, x5
	mov	x5, x8
	bl	_amdgpu_gart_map
	cbnz	w0, LBB0_8
; %bb.3:
	bl	_mb
	mov	x0, x19
	mov	x1, #0
	bl	_amdgpu_asic_flush_hdp
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	w3, #0
	bl	_amdgpu_gmc_flush_gpu_tlb
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trying to bind memory to uninitialized GART !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AMDGPU_GPU_PAGES_IN_CPU_PAGE,4,2 ; @AMDGPU_GPU_PAGES_IN_CPU_PAGE
	.comm	_AMDGPU_GPU_PAGE_SIZE,4,2       ; @AMDGPU_GPU_PAGE_SIZE
.subsections_via_symbols
