	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_gem_detach_pages
_omap_gem_detach_pages:                 ## @omap_gem_detach_pages
	.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	%rdi, %r14
	callq	_to_omap_bo
	movq	%rax, %r15
	movl	(%r14), %r12d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %r12
	leaq	16(%r15), %rdi
	callq	_lockdep_assert_held
	testq	%r12, %r12
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	callq	_dma_unmap_page
	jmp	LBB0_4
LBB0_5:
	movq	8(%r15), %rdi
	callq	_kfree
	movq	$0, 8(%r15)
	movq	(%r15), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_drm_gem_put_pages
	movq	$0, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_omap_gem_detach_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_gem_detach_pages
_omap_gem_detach_pages:                 ; @omap_gem_detach_pages
	.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
	mov	x20, x0
	bl	_to_omap_bo
	mov	x19, x0
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsr	x22, x8, x9
	add	x0, x0, #16
	bl	_lockdep_assert_held
	cbz	w22, LBB0_5
; %bb.1:
	mov	x21, #0
	lsl	x22, x22, #3
Lloh3:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #8
	cmp	x22, x21
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x21]
	cbz	x1, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	ldr	w2, [x23]
	ldr	w3, [x24]
	bl	_dma_unmap_page
	b	LBB0_2
LBB0_5:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
	ldr	x1, [x19]
	mov	x0, x20
	mov	w2, #1
	mov	w3, #0
	bl	_drm_gem_put_pages
	str	xzr, [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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_omap_gem_detach_pages
.subsections_via_symbols
