	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_mmap_mapper           ## -- Begin function videobuf_mmap_mapper
	.p2align	4, 0x90
_videobuf_mmap_mapper:                  ## @videobuf_mmap_mapper
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	subl	(%r13), %r12d
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	movq	_MAGIC_QTYPE_OPS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MAGIC_CHECK
	movl	(%r15), %eax
	movq	_VM_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_VM_SHARED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	callq	_videobuf_queue_lock
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_10
## %bb.4:
	movq	(%r14), %rsi
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%rbx, %rdx
	je	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r8, (%rax)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r15), %edi
	shll	%cl, %edi
	cmpl	%edi, 8(%rax)
	jne	LBB0_9
## %bb.8:
	movq	_mmap_mapper@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movq	%r14, %rdx
	movq	%rax, %rcx
	movq	%r15, %r8
	callq	_CALL
	movl	%eax, %r12d
LBB0_10:
	movq	%r14, %rdi
	callq	_videobuf_queue_unlock
	jmp	LBB0_11
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_dprintk
	subl	(%r13), %ebx
	movl	%ebx, %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAGIC_QTYPE_OPS,4,2            ## @MAGIC_QTYPE_OPS
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.comm	_VM_SHARED,4,2                  ## @VM_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmap appl bug: PROT_WRITE and MAP_SHARED are required\n"

	.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
	.comm	_mmap_mapper,4,2                ## @mmap_mapper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_mmap_mapper           ; -- Begin function videobuf_mmap_mapper
	.p2align	2
_videobuf_mmap_mapper:                  ; @videobuf_mmap_mapper
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _EINVAL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EINVAL@GOTPAGEOFF]
	ldr	w22, [x21]
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh2:
	adrp	x8, _MAGIC_QTYPE_OPS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAGIC_QTYPE_OPS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_MAGIC_CHECK
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _VM_WRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VM_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.1:
Lloh8:
	adrp	x9, _VM_SHARED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VM_SHARED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.2:
	neg	w21, w22
	mov	x0, x19
	bl	_videobuf_queue_lock
Lloh11:
	adrp	x8, _VIDEO_MAX_FRAME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	ldr	x9, [x19]
Lloh14:
	adrp	x10, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh15:
	ldr	x10, [x10, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
Lloh17:
	adrp	x11, _PAGE_SHIFT@GOTPAGE
Lloh18:
	ldr	x11, [x11, _PAGE_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x3, [x9]
	cbz	x3, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x12, [x3]
	cmp	x12, x10
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x3, #8]
	ldr	w13, [x20, #4]
	lsl	w13, w13, w11
	cmp	w12, w13
	b.ne	LBB0_4
; %bb.8:
Lloh20:
	adrp	x8, _mmap_mapper@GOTPAGE
Lloh21:
	ldr	x8, [x8, _mmap_mapper@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	mov	x4, x20
	bl	_CALL
	mov	x21, x0
LBB0_9:
	mov	x0, x19
	bl	_videobuf_queue_unlock
	b	LBB0_11
LBB0_10:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	ldr	w8, [x21]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAGIC_QTYPE_OPS,4,2            ; @MAGIC_QTYPE_OPS
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.comm	_VM_SHARED,4,2                  ; @VM_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmap appl bug: PROT_WRITE and MAP_SHARED are required\n"

	.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
	.comm	_mmap_mapper,4,2                ; @mmap_mapper
.subsections_via_symbols
