	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dev_mmap
_dev_mmap:                              ## @dev_mmap
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	movq	(%rsi), %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %r15
	subq	%r14, %r15
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movl	%r13d, %ebx
	jmp	LBB0_17
LBB0_2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	_D_STREAM@GOTPCREL(%rip), %r8
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 24(%rcx)
	je	LBB0_5
## %bb.3:
	cmpq	%rax, 16(%rcx)
	je	LBB0_7
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_7:
	movl	(%rcx), %eax
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r8, %r12
	jle	LBB0_13
## %bb.8:
	movq	%r14, %rdi
	movq	8(%rcx), %r14
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, 8(%r14)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	24(%r14), %esi
	sarl	%cl, %esi
	cmpl	16(%rbx), %esi
	je	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	addq	$32, %r14
	decq	%rax
	jne	LBB0_9
	jmp	LBB0_13
LBB0_12:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_PDEBUG
LBB0_13:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_14:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %ebx
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	cmpq	16(%r14), %r15
	jne	LBB0_24
## %bb.19:
	movq	%r15, %r12
	movq	_VM_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%rbx)
	testq	%r15, %r15
	je	LBB0_23
## %bb.20:
	movq	%rdi, %r15
	movq	(%r14), %rdi
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %r13
	callq	_vmalloc_to_page
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_vm_insert_page
	testl	%eax, %eax
	js	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rax, %r15
	movq	%r13, %rdi
	addq	%rax, %rdi
	subq	%rax, %r12
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_21
LBB0_23:
	movq	_gspca_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	%r14, 24(%rbx)
	movq	%rbx, %rdi
	callq	_gspca_vm_open
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_24:
	movl	(%r8), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
LBB0_25:
	movl	%eax, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmap start:%08x size:%d"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
L_.str.1:                               ## @.str.1
	.asciz	"mmap bad memory type"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
L_.str.2:                               ## @.str.2
	.asciz	"mmap no frame buffer found"

L_.str.3:                               ## @.str.3
	.asciz	"mmap bad size"

	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_gspca_vm_ops,4,2               ## @gspca_vm_ops
	.no_dead_strip	_dev_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dev_mmap
_dev_mmap:                              ; @dev_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	mov	x22, x0
	ldr	x25, [x0]
	ldp	x21, x8, [x1]
	sub	x24, x8, x21
Lloh0:
	adrp	x23, _D_STREAM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _D_STREAM@GOTPAGEOFF]
	ldr	w0, [x23]
	stp	x21, x24, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	add	x19, x25, #4
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_16
LBB0_2:
	ldr	w8, [x25, #24]
	cbz	w8, LBB0_9
; %bb.3:
	ldr	x8, [x25, #16]
	cmp	x8, x22
	b.ne	LBB0_13
; %bb.4:
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.5:
	ldr	x25, [x25, #8]
Lloh7:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x25, #8]
	cmp	x11, x9
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w11, [x25, #24]
	asr	w11, w11, w10
	ldr	w12, [x20, #16]
	cmp	w11, w12
	b.eq	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, #32
	subs	x8, x8, #1
	b.ne	LBB0_6
	b	LBB0_11
LBB0_9:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	ldr	w0, [x23]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
LBB0_11:
	ldr	w0, [x23]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	bl	_PDEBUG
LBB0_13:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_16:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
LBB0_17:
	ldr	x8, [x25, #16]
	cmp	x24, x8
	b.ne	LBB0_23
; %bb.18:
Lloh21:
	adrp	x8, _VM_IO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VM_IO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x20, #40]
	orr	w8, w9, w8
	str	w8, [x20, #40]
	cbz	x24, LBB0_22
; %bb.19:
	ldr	x22, [x25]
Lloh24:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh25:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_vmalloc_to_page
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_vm_insert_page
	tbnz	w0, #31, LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x8, [x26]
	add	x21, x8, x21
	add	x22, x8, x22
	subs	x24, x24, x8
	b.ne	LBB0_20
LBB0_22:
Lloh26:
	adrp	x8, _gspca_vm_ops@GOTPAGE
Lloh27:
	ldr	x8, [x8, _gspca_vm_ops@GOTPAGEOFF]
	stp	x25, x8, [x20, #24]
	mov	x0, x20
	bl	_gspca_vm_open
	mov	w23, #0
	b	LBB0_15
LBB0_23:
	ldr	w0, [x23]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_24:
	mov	x23, x0
	b	LBB0_15
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmap start:%08x size:%d"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
l_.str.1:                               ; @.str.1
	.asciz	"mmap bad memory type"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
l_.str.2:                               ; @.str.2
	.asciz	"mmap no frame buffer found"

l_.str.3:                               ; @.str.3
	.asciz	"mmap bad size"

	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_gspca_vm_ops,4,2               ; @gspca_vm_ops
	.no_dead_strip	_dev_mmap
.subsections_via_symbols
