	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_v4l2_mmap                 ## -- Begin function cx18_v4l2_mmap
	.p2align	4, 0x90
_cx18_v4l2_mmap:                        ## @cx18_v4l2_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	movq	(%rbx), %rax
	movq	8(%rbx), %r15
	movq	8(%r15), %r13
	movq	_CX18_F_S_STREAMOFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	(%rax,%rax,2), %r14
	leaq	16(,%r14,8), %r12
	addq	%r13, %r12
	movq	%r12, %rsi
	callq	_test_bit
	movq	(%r13,%r14,8), %rcx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.1:
	movq	(%rbx), %rcx
	movq	_CX18_ENC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_CX18_F_S_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	leaq	8(,%r14,8), %rdi
	addq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_videobuf_mmap_mapper           ## TAILCALL
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_cx18_start_capture
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.7:
	movl	12(%r13,%r14,8), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_CX18_DEBUG_INFO
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_CX18_DEBUG_FILE
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_CX18_F_S_STREAMOFF,4,2         ## @CX18_F_S_STREAMOFF
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_CX18_ENC_STREAM_TYPE_YUV,8,3   ## @CX18_ENC_STREAM_TYPE_YUV
	.comm	_CX18_F_S_STREAMING,4,2         ## @CX18_F_S_STREAMING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not start capture for %s (%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Encoder mmap started capture\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_v4l2_mmap                 ; -- Begin function cx18_v4l2_mmap
	.p2align	2
_cx18_v4l2_mmap:                        ; @cx18_v4l2_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	x19, x1
	ldr	x21, [x0]
	ldp	x23, x20, [x21]
	ldr	x24, [x20, #8]
Lloh0:
	adrp	x8, _CX18_F_S_STREAMOFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX18_F_S_STREAMOFF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w8, #24
	madd	x25, x23, x8, x24
	add	x22, x25, #16
	mov	x1, x22
	bl	_test_bit
	ldr	x8, [x25]
Lloh3:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	cbnz	w0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _CX18_F_S_STREAMING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX18_F_S_STREAMING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cbz	w0, LBB0_5
LBB0_4:
	mov	w8, #24
	madd	x8, x23, x8, x24
	add	x0, x8, #8
	mov	x1, x19
	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
	b	_videobuf_mmap_mapper
LBB0_5:
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x21
	bl	_cx18_start_capture
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w21, LBB0_8
; %bb.6:
	mov	w8, #24
	madd	x8, x23, x8, x24
	ldr	w1, [x8, #12]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_CX18_DEBUG_INFO
LBB0_7:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	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_8:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CX18_DEBUG_FILE
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CX18_F_S_STREAMOFF,4,2         ; @CX18_F_S_STREAMOFF
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_CX18_ENC_STREAM_TYPE_YUV,8,3   ; @CX18_ENC_STREAM_TYPE_YUV
	.comm	_CX18_F_S_STREAMING,4,2         ; @CX18_F_S_STREAMING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not start capture for %s (%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Encoder mmap started capture\n"

.subsections_via_symbols
