	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap24xxcam_mmap_buffers
_omap24xxcam_mmap_buffers:              ## @omap24xxcam_mmap_buffers
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %r12
	movq	16(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	8(%rbx), %r14
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_28
LBB0_2:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testq	%r8, %r8
	je	LBB0_3
## %bb.6:
	movq	8(%r12), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	cmpq	%r14, %r8
	je	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%r14,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r15), %edi
	shll	%cl, %edi
	cmpl	%edi, 8(%rsi)
	jne	LBB0_10
## %bb.4:
	cmpl	%r8d, %r14d
	jae	LBB0_5
LBB0_12:
	movq	8(%r12), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	%r14d, %ecx
	xorl	%esi, %esi
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rcx
	cmpl	%ecx, %r8d
	je	LBB0_17
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpq	(%rdi), %rdx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	addl	16(%rdi), %esi
	movl	4(%r15), %edi
	subl	8(%r15), %edi
	cmpl	%edi, %esi
	jne	LBB0_16
## %bb.29:
	movl	%ecx, %r8d
LBB0_17:
	xorl	%ebx, %ebx
	cmpl	%r8d, %r14d
	jbe	LBB0_18
	jmp	LBB0_27
LBB0_11:
	movl	%r8d, %r14d
	jmp	LBB0_18
LBB0_3:
	xorl	%r14d, %r14d
	cmpl	%r8d, %r14d
	jb	LBB0_12
LBB0_5:
	movl	%r14d, %r8d
LBB0_18:
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_22 Depth 2
	movq	%rcx, %rbx
	movq	8(%r12), %rax
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %rdi
	callq	_videobuf_to_dma
	cmpl	$0, (%rax)
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rax, %r15
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	movq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	8(%r13), %ebx
	addl	%ecx, %ebx
	movq	8(%r15), %rdi
	addq	%r14, %rdi
	movq	%rcx, %r12
	callq	_sg_page
	movl	%eax, %edi
	callq	_page_to_pfn
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r15), %rdi
	addq	%r14, %rdi
	callq	_sg_dma_len
	movl	12(%r13), %r8d
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	callq	_remap_pfn_range
	testl	%eax, %eax
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=2
	movq	8(%r15), %rdi
	addq	%r14, %rdi
	callq	_sg_dma_len
	addl	%eax, %r12d
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	movl	(%r15), %eax
	addq	$4, %r14
	cmpq	%rax, %rdx
	movq	%r12, %rcx
	jb	LBB0_22
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, %rcx
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	incl	%r14d
	cmpl	-64(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jbe	LBB0_19
## %bb.26:
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_23:
	movl	%eax, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_27:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_28:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_VIDEO_MAX_FRAME,4,2            ## @VIDEO_MAX_FRAME
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_omap24xxcam_mmap_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap24xxcam_mmap_buffers
_omap24xxcam_mmap_buffers:              ; @omap24xxcam_mmap_buffers
	.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
	mov	x20, x1
	ldr	x19, [x0]
	ldr	x21, [x19, #16]
	mov	x0, x21
	bl	_mutex_lock
	ldr	x22, [x21, #8]
	mov	x0, x21
	bl	_mutex_unlock
	cbz	x22, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_28
LBB0_2:
	mov	x0, x19
	bl	_mutex_lock
Lloh3:
	adrp	x8, _VIDEO_MAX_FRAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	cbz	w24, LBB0_18
; %bb.3:
	mov	x25, #0
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	cmp	x24, x25
	b.eq	LBB0_17
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8, x25, lsl #3]
	cbz	x11, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x12, [x11]
	cmp	x9, x12
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w11, [x11, #8]
	ldr	w12, [x20]
	lsl	w12, w12, w10
	cmp	w11, w12
	b.ne	LBB0_4
; %bb.8:
	cmp	w25, w24
	b.hs	LBB0_19
LBB0_9:
	mov	w8, #0
	ldr	x9, [x19, #8]
Lloh12:
	adrp	x10, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x10]
	mov	w10, w25
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x10, x10, #1
	cmp	w24, w10
	b.eq	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9, x10, lsl #3]
	cbz	x12, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x12]
	cmp	x11, x13
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w12, [x12, #16]
	add	w8, w8, w12
	ldp	w12, w13, [x20, #4]
	sub	w12, w12, w13
	cmp	w8, w12
	b.ne	LBB0_10
; %bb.14:
	mov	x24, x10
LBB0_15:
	cmp	w25, w24
	b.ls	LBB0_20
LBB0_16:
	mov	w22, #0
	b	LBB0_27
LBB0_17:
	mov	x25, x24
	b	LBB0_20
LBB0_18:
	mov	w25, #0
	cmp	w25, w24
	b.lo	LBB0_9
LBB0_19:
	mov	x24, x25
LBB0_20:
	mov	w26, #0
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	w25, w25, #1
	cmp	w25, w24
	b.hi	LBB0_16
LBB0_22:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
	ldr	x8, [x19, #8]
	ldr	x0, [x8, w25, uxtw #3]
	bl	_videobuf_to_dma
	ldr	w8, [x0]
	cbz	w8, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x21, x0
	mov	x27, #0
	mov	x28, #0
LBB0_24:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x20, #8]
	add	w22, w8, w26
	ldr	x8, [x21, #8]
	add	x0, x8, x27
	bl	_sg_page
	bl	_page_to_pfn
	mov	x23, x0
	ldr	x8, [x21, #8]
	add	x0, x8, x27
	bl	_sg_dma_len
	mov	x3, x0
	ldr	w4, [x20, #12]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_remap_pfn_range
	cbnz	w0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	x8, [x21, #8]
	add	x0, x8, x27
	bl	_sg_dma_len
	add	w26, w26, w0
	add	x28, x28, #1
	ldr	w8, [x21]
	add	x27, x27, #4
	cmp	x28, x8
	b.lo	LBB0_24
	b	LBB0_21
LBB0_26:
	mov	x22, x0
LBB0_27:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_28:
	mov	x0, x22
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_VIDEO_MAX_FRAME,4,2            ; @VIDEO_MAX_FRAME
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_omap24xxcam_mmap_buffers
.subsections_via_symbols
