	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_gart_unbind             ## -- Begin function radeon_gart_unbind
	.p2align	4, 0x90
_radeon_gart_unbind:                    ## @radeon_gart_unbind
	.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
	cmpl	$0, 24(%rdi)
	je	LBB0_13
## %bb.1:
	movl	%edx, %r8d
	movq	%rdi, %rbx
	testl	%edx, %edx
	jle	LBB0_11
## %bb.2:
	movq	_RADEON_GPU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %esi
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r12d
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	%r13d, %r15d
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	incl	%r12d
	cmpl	%r8d, %r14d
	je	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	16(%rbx), %rax
	movl	%r12d, %r12d
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%rax,%r12,8)
	cmpl	%ecx, %edi
	ja	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	incl	%r13d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_RADEON_GPU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	cmpl	%eax, %r13d
	jae	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%r15,%r13), %esi
	movl	32(%rbx), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%rsi,4)
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	32(%rbx), %edx
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_radeon_gart_set_page
	jmp	LBB0_8
LBB0_11:
	cmpq	$0, (%rbx)
	je	LBB0_12
## %bb.14:
	xorl	%eax, %eax
	callq	_mb
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_gart_tlb_flush          ## TAILCALL
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trying to unbind memory from uninitialized GART !\n"

	.comm	_RADEON_GPU_PAGE_SIZE,4,2       ## @RADEON_GPU_PAGE_SIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_gart_unbind             ; -- Begin function radeon_gart_unbind
	.p2align	2
_radeon_gart_unbind:                    ; @radeon_gart_unbind
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_13
; %bb.1:
	mov	x20, x2
	mov	x19, x0
	cmp	w2, #1
	b.lt	LBB0_11
; %bb.2:
	mov	w21, #0
Lloh0:
	adrp	x22, _RADEON_GPU_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RADEON_GPU_PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	udiv	w23, w1, w8
Lloh2:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x24]
	udiv	w10, w9, w8
	udiv	w10, w23, w10
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w23, w26
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	add	w10, w25, #1
	cmp	w21, w20
	b.eq	LBB0_11
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x11, [x19, #16]
	mov	w25, w10
	ldr	x10, [x11, w10, uxtw #3]
	cbz	x10, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x11, x25, lsl #3]
	cmp	w8, w9
	b.hi	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w26, w26, #1
	ldr	w9, [x24]
	ldr	w8, [x22]
	udiv	w10, w9, w8
	cmp	w26, w10
	b.hs	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w1, w23, w26
	ldr	w8, [x19, #32]
	ldp	x10, x9, [x19]
	str	w8, [x9, w1, uxtw #2]
	cbz	x10, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w2, [x19, #32]
	mov	x0, x19
	bl	_radeon_gart_set_page
	b	LBB0_8
LBB0_11:
	ldr	x8, [x19]
	cbz	x8, LBB0_14
; %bb.12:
	bl	_mb
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_radeon_gart_tlb_flush
LBB0_13:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_WARN
LBB0_14:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trying to unbind memory from uninitialized GART !\n"

	.comm	_RADEON_GPU_PAGE_SIZE,4,2       ; @RADEON_GPU_PAGE_SIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
