	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rax
	movl	(%rsi), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	%rdi, %r14
	movslq	%edx, %rsi
	movq	%rsi, (%rdi)
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movl	%edx, %ecx
	sarl	$31, %ecx
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%edx, %edx
	movq	%rax, %rcx
	movq	%r14, %r8
	callq	_WARN
	movq	(%r14), %rdx
	movq	%rdx, %rcx
	shrq	$32, %rcx
	movq	%rdx, %rsi
LBB0_3:
	movl	8(%r14), %r8d
	movl	12(%r14), %edi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_radeon_gart_bind
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	callq	_DRM_ERROR
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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"

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	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	x3, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w2, w8, w9
	sxtw	x1, w2
	str	x1, [x0]
	cbz	w2, LBB0_2
; %bb.1:
	asr	w3, w2, #31
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x4, x19
	bl	_WARN
	ldr	x1, [x19]
	lsr	x3, x1, #32
	mov	x2, x1
LBB0_3:
	ldp	w4, w0, [x19, #8]
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_radeon_gart_bind
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w1, [x19]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x1
	bl	_DRM_ERROR
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.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"

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
