	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap24xxcam_vbq_free_mmap_buffer
_omap24xxcam_vbq_free_mmap_buffer:      ## @omap24xxcam_vbq_free_mmap_buffer
	.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
	callq	_videobuf_to_dma
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movslq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_6
## %bb.2:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	leaq	(%rdi,%r13,4), %rdi
	addq	$-4, %rdi
	leaq	-4(,%r13,4), %rbx
	decq	%r13
	callq	_sg_dma_len
	movq	%rax, %r15
	addq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_sg_page
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	callq	_ClearPageReserved
	addl	$4, %ebx
	subq	(%r12), %r15
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(,%r13,4), %rbx
	movq	8(%r14), %rdi
	addq	%rbx, %rdi
	callq	_sg_page
	movq	%rax, %r15
	addq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_sg_dma_len
	movq	%rax, %rdi
	callq	_get_order
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	___free_pages
	movq	8(%r14), %rdi
	testl	%r13d, %r13d
	jne	LBB0_3
LBB0_6:
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_omap24xxcam_vbq_free_mmap_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap24xxcam_vbq_free_mmap_buffer
_omap24xxcam_vbq_free_mmap_buffer:      ; @omap24xxcam_vbq_free_mmap_buffer
	.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
	bl	_videobuf_to_dma
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_7
; %bb.1:
	ldrsw	x22, [x19]
	cbz	w22, LBB0_6
; %bb.2:
Lloh0:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	sub	x22, x22, #1
	lsl	x24, x22, #2
	add	x0, x0, x24
	bl	_sg_dma_len
	mov	x20, x0
	ldr	x8, [x19, #8]
	add	x0, x8, x24
	bl	_sg_page
	mov	x21, x0
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_ClearPageReserved
	ldr	x8, [x23]
	add	w21, w21, #4
	subs	x20, x20, x8
	b.ne	LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x24
	bl	_sg_page
	mov	x20, x0
	ldr	x8, [x19, #8]
	add	x0, x8, x24
	bl	_sg_dma_len
	bl	_get_order
	mov	x1, x0
	mov	x0, x20
	bl	___free_pages
	ldr	x0, [x19, #8]
	cbnz	w22, LBB0_3
LBB0_6:
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_omap24xxcam_vbq_free_mmap_buffer
.subsections_via_symbols
