	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_ttm_tt_unpopulate
_radeon_ttm_tt_unpopulate:              ## @radeon_ttm_tt_unpopulate
	.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
	movq	_TTM_PAGE_FLAG_SG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_radeon_get_rdev
	cmpl	$0, 4(%r15)
	je	LBB0_7
## %bb.2:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r14), %edi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	callq	_pci_unmap_page
	movl	4(%r15), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	%eax, %eax
	cmpq	%rax, %rbx
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	shrq	$32, %rax
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_pool_unpopulate            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PAGE_FLAG_SG,4,2           ## @TTM_PAGE_FLAG_SG
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
	.no_dead_strip	_radeon_ttm_tt_unpopulate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_ttm_tt_unpopulate
_radeon_ttm_tt_unpopulate:              ; @radeon_ttm_tt_unpopulate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TTM_PAGE_FLAG_SG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TTM_PAGE_FLAG_SG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_radeon_get_rdev
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
; %bb.3:
	mov	x20, x0
	mov	x21, #0
Lloh3:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x23, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20, #4]
	ldr	w2, [x22]
	ldr	w3, [x23]
	bl	_pci_unmap_page
	ldr	w8, [x19, #4]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x1, [x8, x21, lsl #3]
	cbnz	x1, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsr	x8, x8, #32
	b	LBB0_5
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ttm_pool_unpopulate
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PAGE_FLAG_SG,4,2           ; @TTM_PAGE_FLAG_SG
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
	.no_dead_strip	_radeon_ttm_tt_unpopulate
.subsections_via_symbols
