	.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_12
## %bb.1:
	movl	%edx, %r8d
	movq	%rdi, %r13
	testl	%edx, %edx
	jle	LBB0_11
## %bb.2:
	movq	_RADEON_GPU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ecx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
	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	%r14d, %r15d
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %edi                 ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%edi
	incl	%r12d
	cmpl	%r8d, %edi
	je	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	16(%r13), %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)
	movl	32(%r13), %ebx
	movq	(%r13), %rax
	movl	%ebx, (%rax,%r12,4)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_RADEON_GPU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%ecx, %esi
	ja	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	addl	%esi, %ebx
	incl	%r14d
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	cmpl	%eax, %r14d
	jae	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, 8(%r13)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	leal	(%r15,%r14), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_radeon_gart_set_page
	movq	_RADEON_GPU_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_8
LBB0_11:
	xorl	%eax, %eax
	callq	_mb
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_gart_tlb_flush          ## TAILCALL
LBB0_12:
	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
	.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	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_12
; %bb.1:
	mov	x20, x2
	mov	x19, x0
	cmp	w2, #1
	b.lt	LBB0_11
; %bb.2:
	mov	w22, #0
Lloh0:
	adrp	x23, _RADEON_GPU_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RADEON_GPU_PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	udiv	w24, w1, w8
Lloh2:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x25]
	udiv	w8, w9, w8
	udiv	w8, w24, w8
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, w27
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	add	w8, w26, #1
	cmp	w22, w20
	b.eq	LBB0_11
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x9, [x19, #16]
	mov	w26, w8
	ldr	x8, [x9, w8, uxtw #3]
	cbz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x9, x26, lsl #3]
	ldr	w21, [x19, #32]
	ldr	x8, [x19]
	str	w21, [x8, x26, lsl #2]
	ldr	w9, [x25]
	ldr	w8, [x23]
	cmp	w8, w9
	b.hi	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w21, w8, w21
	add	w27, w27, #1
	udiv	w10, w9, w8
	cmp	w27, w10
	b.hs	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	w1, w24, w27
	mov	x0, x19
	mov	x2, x21
	bl	_radeon_gart_set_page
	ldr	w8, [x23]
	ldr	w9, [x25]
	b	LBB0_8
LBB0_11:
	bl	_mb
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_radeon_gart_tlb_flush
LBB0_12:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_WARN
	.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
