	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_ttm_backend_bind
_radeon_ttm_backend_bind:               ## @radeon_ttm_backend_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_RADEON_GART_PAGE_VALID@GOTPCREL(%rip), %rax
	movq	_RADEON_GART_PAGE_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_RADEON_GART_PAGE_WRITE@GOTPCREL(%rip), %r12
	orl	(%r12), %ebx
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_radeon_ttm_tt_pin_userptr
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_2:
	movl	(%r14), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movslq	%eax, %rsi
	movq	%rsi, (%r15)
	movl	8(%r15), %edx
	testl	%edx, %edx
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%edx, %edx
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_WARN
	movq	(%r15), %rsi
	movl	8(%r15), %edx
LBB0_4:
	movq	_tt_cached@GOTPCREL(%rip), %rax
	xorl	%r9d, %r9d
	cmpq	(%rax), %rsi
	jne	LBB0_6
## %bb.5:
	movq	_RADEON_GART_PAGE_SNOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
LBB0_6:
	orl	%ebx, %r9d
	movl	12(%r15), %ecx
	movl	%ecx, %edi
	movl	%edx, %r8d
	callq	_radeon_gart_bind
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	(%r15), %edx
	movl	8(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_GART_PAGE_VALID,4,2     ## @RADEON_GART_PAGE_VALID
	.comm	_RADEON_GART_PAGE_READ,4,2      ## @RADEON_GART_PAGE_READ
	.comm	_RADEON_GART_PAGE_WRITE,4,2     ## @RADEON_GART_PAGE_WRITE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nothing to bind %lu pages for mreg %p back %p!\n"

	.comm	_tt_cached,8,3                  ## @tt_cached
	.comm	_RADEON_GART_PAGE_SNOOP,4,2     ## @RADEON_GART_PAGE_SNOOP
L_.str.1:                               ## @.str.1
	.asciz	"failed to bind %lu pages at 0x%08X\n"

	.no_dead_strip	_radeon_ttm_backend_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_ttm_backend_bind
_radeon_ttm_backend_bind:               ; @radeon_ttm_backend_bind
	.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, _RADEON_GART_PAGE_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_GART_PAGE_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RADEON_GART_PAGE_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RADEON_GART_PAGE_READ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x22, _RADEON_GART_PAGE_WRITE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _RADEON_GART_PAGE_WRITE@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w21, w8, w9
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_radeon_ttm_tt_pin_userptr
	ldr	w8, [x22]
	bic	w21, w21, w8
LBB0_2:
Lloh8:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh10:
	ldr	w8, [x8]
	lsl	w8, w9, w8
	sxtw	x1, w8
	str	x1, [x19]
	ldr	w2, [x19, #8]
	cbnz	w2, LBB0_4
; %bb.3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x20
	mov	x4, x19
	bl	_WARN
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
LBB0_4:
Lloh13:
	adrp	x8, _tt_cached@GOTPAGE
Lloh14:
	ldr	x8, [x8, _tt_cached@GOTPAGEOFF]
Lloh15:
	adrp	x9, _RADEON_GART_PAGE_SNOOP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _RADEON_GART_PAGE_SNOOP@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	ldr	w9, [x9]
	cmp	x1, x8
	csel	w8, w9, wzr, eq
	orr	w5, w8, w21
	ldr	w0, [x19, #12]
	mov	x3, x0
	mov	x4, x2
	bl	_radeon_gart_bind
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w1, [x19, #8]
	ldr	w2, [x19]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_6:
	mov	x0, 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
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_GART_PAGE_VALID,4,2     ; @RADEON_GART_PAGE_VALID
	.comm	_RADEON_GART_PAGE_READ,4,2      ; @RADEON_GART_PAGE_READ
	.comm	_RADEON_GART_PAGE_WRITE,4,2     ; @RADEON_GART_PAGE_WRITE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nothing to bind %lu pages for mreg %p back %p!\n"

	.comm	_tt_cached,8,3                  ; @tt_cached
	.comm	_RADEON_GART_PAGE_SNOOP,4,2     ; @RADEON_GART_PAGE_SNOOP
l_.str.1:                               ; @.str.1
	.asciz	"failed to bind %lu pages at 0x%08X\n"

	.no_dead_strip	_radeon_ttm_backend_bind
.subsections_via_symbols
