	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et61x251_mmap
_et61x251_mmap:                         ## @et61x251_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_video_drvdata
	movq	%rax, %r15
	movq	(%rbx), %r13
	movq	8(%rbx), %r12
	leaq	24(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	(%r15), %eax
	movq	_DEV_DISCONNECTED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_DBG
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	movq	_DEV_MISCONFIGURED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_DBG
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	_VM_WRITE@GOTPCREL(%rip), %rax
	movq	_VM_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, 16(%rbx)
	je	LBB0_8
## %bb.9:
	movq	8(%r15), %rax
	movq	_IO_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.10:
	subq	%r12, %r13
	movq	32(%r15), %rax
	movl	12(%rax), %edi
	callq	_PAGE_ALIGN
	cmpq	%rax, %r13
	jne	LBB0_21
## %bb.11:
	movq	16(%r15), %r8
	testq	%r8, %r8
	je	LBB0_12
## %bb.18:
	movq	32(%r15), %rdx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	20(%rbx), %eax
	addq	$8, %rdx
	xorl	%esi, %esi
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %edi
	sarl	%cl, %edi
	cmpl	%eax, %edi
	je	LBB0_13
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	incq	%rsi
	addq	$16, %rdx
	cmpq	%rsi, %r8
	jne	LBB0_19
	jmp	LBB0_21
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_12:
	xorl	%esi, %esi
LBB0_13:
	cmpq	%r8, %rsi
	jne	LBB0_14
LBB0_21:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_VM_IO@GOTPCREL(%rip), %rax
	movl	16(%rbx), %ecx
	orl	(%rax), %ecx
	movq	_VM_RESERVED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movq	32(%r15), %rax
	testq	%r13, %r13
	je	LBB0_24
## %bb.15:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdi
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_vmalloc_to_page
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_vm_insert_page
	testq	%rax, %rax
	jne	LBB0_17
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rax, %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	%rax, %rdi
	subq	%rax, %r13
	jne	LBB0_16
## %bb.23:
	movq	32(%r15), %rax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_24:
	movq	_et61x251_vm_ops@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rbx)
	shlq	$4, %rsi
	addq	%rax, %rsi
	movq	%rsi, 24(%rbx)
	movq	%rbx, %rdi
	callq	_et61x251_vm_open
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_17:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_DEV_DISCONNECTED,4,2           ## @DEV_DISCONNECTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device not present"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DEV_MISCONFIGURED,4,2          ## @DEV_MISCONFIGURED
L_.str.1:                               ## @.str.1
	.asciz	"The camera is misconfigured. Close and open it again."

	.comm	_EIO,4,2                        ## @EIO
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.comm	_VM_READ,4,2                    ## @VM_READ
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_IO_MMAP,8,3                    ## @IO_MMAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_VM_RESERVED,4,2                ## @VM_RESERVED
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_et61x251_vm_ops,4,2            ## @et61x251_vm_ops
	.no_dead_strip	_et61x251_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et61x251_mmap
_et61x251_mmap:                         ; @et61x251_mmap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	bl	_video_drvdata
	mov	x21, x0
	ldp	x23, x22, [x20]
	add	x19, x0, #24
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_17
LBB0_2:
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _DEV_DISCONNECTED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DEV_DISCONNECTED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_DBG
	mov	x0, x19
	bl	_mutex_unlock
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_17
LBB0_4:
Lloh9:
	adrp	x9, _DEV_MISCONFIGURED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DEV_MISCONFIGURED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_DBG
	mov	x0, x19
	bl	_mutex_unlock
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
	ldr	w8, [x20, #16]
Lloh16:
	adrp	x9, _VM_WRITE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _VM_WRITE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _VM_READ@GOTPAGE
Lloh20:
	ldr	x10, [x10, _VM_READ@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_13
; %bb.7:
	ldr	x8, [x21, #8]
Lloh22:
	adrp	x9, _IO_MMAP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IO_MMAP@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.8:
	sub	x24, x23, x22
	ldr	x8, [x21, #32]
	ldr	w0, [x8, #12]
	bl	_PAGE_ALIGN
	cmp	x24, x0
	b.ne	LBB0_16
; %bb.9:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_14
; %bb.10:
	mov	x25, #0
	ldr	x11, [x21, #32]
Lloh25:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	ldr	w10, [x20, #20]
	add	x11, x11, #8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	asr	w12, w12, w9
	cmp	w12, w10
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x25, x25, #1
	add	x11, x11, #16
	cmp	x8, x25
	b.ne	LBB0_11
	b	LBB0_16
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
Lloh28:
	adrp	x8, _EACCES@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
	mov	x25, #0
LBB0_15:
	cmp	x25, x8
	b.ne	LBB0_19
LBB0_16:
	mov	x0, x19
	bl	_mutex_unlock
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh32:
	adrp	x8, _VM_IO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _VM_IO@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
Lloh35:
	adrp	x9, _VM_RESERVED@GOTPAGE
Lloh36:
	ldr	x9, [x9, _VM_RESERVED@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	ldr	x8, [x21, #32]
	cbz	x24, LBB0_24
; %bb.20:
	lsl	x9, x25, #4
	ldr	x23, [x8, x9]
Lloh38:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh39:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_vmalloc_to_page
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_vm_insert_page
	cbnz	x0, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x26]
	add	x22, x8, x22
	add	x23, x23, x8
	subs	x24, x24, x8
	b.ne	LBB0_21
; %bb.23:
	ldr	x8, [x21, #32]
LBB0_24:
Lloh40:
	adrp	x9, _et61x251_vm_ops@GOTPAGE
Lloh41:
	ldr	x9, [x9, _et61x251_vm_ops@GOTPAGEOFF]
	add	x8, x8, x25, lsl #4
	stp	x8, x9, [x20, #24]
	mov	x0, x20
	bl	_et61x251_vm_open
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_18
LBB0_25:
	mov	x0, x19
	bl	_mutex_unlock
Lloh42:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_DEV_DISCONNECTED,4,2           ; @DEV_DISCONNECTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device not present"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DEV_MISCONFIGURED,4,2          ; @DEV_MISCONFIGURED
l_.str.1:                               ; @.str.1
	.asciz	"The camera is misconfigured. Close and open it again."

	.comm	_EIO,4,2                        ; @EIO
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.comm	_VM_READ,4,2                    ; @VM_READ
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_IO_MMAP,8,3                    ; @IO_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_VM_RESERVED,4,2                ; @VM_RESERVED
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_et61x251_vm_ops,4,2            ; @et61x251_vm_ops
	.no_dead_strip	_et61x251_mmap
.subsections_via_symbols
