	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_s_ext_ctrls               ## -- Begin function cx18_s_ext_ctrls
	.p2align	4, 0x90
_cx18_s_ext_ctrls:                      ## @cx18_s_ext_ctrls
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	16(%rsi), %r15
	leaq	64(%r15), %rdi
	movl	8(%rsi), %esi
	callq	_v4l2_prio_check
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_2
LBB0_1:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r14), %rax
	movq	_V4L2_CTRL_CLASS_USER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.3:
	cmpl	$0, 8(%r14)
	jle	LBB0_16
## %bb.4:
	movq	16(%r14), %rax
	xorl	%ebx, %ebx
	leaq	-96(%rbp), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rbx,8), %ecx
	movl	%ecx, -92(%rbp)
	movl	(%rax,%rbx,8), %eax
	movl	%eax, -96(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_cx18_s_ctrl
	movl	%eax, %r13d
	movl	-96(%rbp), %ecx
	movq	16(%r14), %rax
	movl	%ecx, (%rax,%rbx,8)
	testl	%r13d, %r13d
	jne	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	8(%r14), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_5
LBB0_16:
	xorl	%r13d, %r13d
	jmp	LBB0_1
LBB0_8:
	movq	_V4L2_CTRL_CLASS_MPEG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.9:
	movq	40(%r15), %rax
	movq	%rax, -64(%rbp)
	movups	8(%r15), %xmm0
	movups	24(%r15), %xmm1
	movaps	%xmm1, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	leaq	60(%r15), %rdi
	callq	_atomic_read
	movq	_VIDIOC_S_EXT_CTRLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-96(%rbp), %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_cx2341x_ext_ctrls
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_1
## %bb.10:
	leaq	8(%r15), %r14
	movq	-96(%rbp), %rax
	cmpq	(%r14), %rax
	je	LBB0_12
## %bb.11:
	movq	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
	movl	16(%r15), %eax
	incl	%esi
	cltd
	idivl	%esi
	movl	%eax, -56(%rbp)
	movl	44(%r15), %eax
	movl	%eax, -48(%rbp)
	movq	_V4L2_MBUS_FMT_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	56(%r15), %edi
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_mbus_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	callq	_v4l2_subdev_call
LBB0_12:
	movq	%r15, -48(%rbp)
	movq	(%r12), %rax
	shlq	$2, %rax
	addq	48(%r15), %rax
	movq	%rax, -56(%rbp)
	movq	_cx18_api_func@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	leaq	-96(%rbp), %rcx
	movq	%r14, %rdx
	callq	_cx2341x_update
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.13:
	movq	-80(%rbp), %rsi
	cmpq	%rsi, 24(%r15)
	jne	LBB0_18
## %bb.14:
	movq	-72(%rbp), %rdx
	xorl	%r13d, %r13d
	cmpq	%rdx, 32(%r15)
	jne	LBB0_19
	jmp	LBB0_20
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_1
LBB0_17:
	movl	%ebx, 12(%r14)
	jmp	LBB0_1
LBB0_18:
	movq	-72(%rbp), %rdx
LBB0_19:
	movq	%r15, %rdi
	callq	_cx18_setup_vbi_fmt
	movl	%eax, %r13d
LBB0_20:
	movq	-64(%rbp), %rax
	movq	%rax, 32(%r14)
	movaps	-96(%rbp), %xmm0
	movaps	-80(%rbp), %xmm1
	movups	%xmm1, 16(%r14)
	movups	%xmm0, (%r14)
	movl	-64(%rbp), %ebx
	movl	%ebx, %eax
	andl	$768, %eax                      ## imm = 0x300
	movl	%eax, (%r15)
	andl	$3, %ebx
	leaq	_cx18_s_ext_ctrls.freqs(%rip), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jae	LBB0_1
## %bb.21:
	movq	_audio@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_clock_freq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14,%rbx,4), %ecx
	movq	%r15, %rdi
	callq	_cx18_call_all
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CTRL_CLASS_USER,8,3       ## @V4L2_CTRL_CLASS_USER
	.comm	_V4L2_CTRL_CLASS_MPEG,8,3       ## @V4L2_CTRL_CLASS_MPEG
	.section	__DATA,__data
	.p2align	2                               ## @cx18_s_ext_ctrls.freqs
_cx18_s_ext_ctrls.freqs:
	.long	44100                           ## 0xac44
	.long	48000                           ## 0xbb80
	.long	32000                           ## 0x7d00

	.comm	_VIDIOC_S_EXT_CTRLS,4,2         ## @VIDIOC_S_EXT_CTRLS
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,8,3 ## @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_V4L2_MBUS_FMT_FIXED,4,2        ## @V4L2_MBUS_FMT_FIXED
	.comm	_video,4,2                      ## @video
	.comm	_s_mbus_fmt,4,2                 ## @s_mbus_fmt
	.comm	_cx18_api_func,4,2              ## @cx18_api_func
	.comm	_audio,4,2                      ## @audio
	.comm	_s_clock_freq,4,2               ## @s_clock_freq
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_s_ext_ctrls               ; -- Begin function cx18_s_ext_ctrls
	.p2align	2
_cx18_s_ext_ctrls:                      ; @cx18_s_ext_ctrls
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x2
	mov	x21, x1
	ldr	x19, [x1, #16]
	add	x0, x19, #64
	ldr	w1, [x1, #8]
	bl	_v4l2_prio_check
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _V4L2_CTRL_CLASS_USER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_CTRL_CLASS_USER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x23, #0
	mov	x21, #0
	ldr	x8, [x20, #16]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x8, x21, lsl #3]
	str	d0, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_cx18_s_ctrl
	ldr	w9, [sp]
	ldr	x8, [x20, #16]
	str	w9, [x8, x23]
	cbnz	w0, LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldrsw	x9, [x20, #8]
	add	x23, x23, #8
	cmp	x21, x9
	b.lt	LBB0_5
LBB0_7:
	mov	w22, #0
	b	LBB0_1
LBB0_8:
Lloh3:
	adrp	x9, _V4L2_CTRL_CLASS_MPEG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_CTRL_CLASS_MPEG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.9:
	ldur	q0, [x19, #8]
	ldur	q1, [x19, #24]
	ldr	x8, [x19, #40]
	str	x8, [sp, #32]
	stp	q0, q1, [sp]
	add	x0, x19, #60
	bl	_atomic_read
	mov	x1, x0
Lloh6:
	adrp	x8, _VIDIOC_S_EXT_CTRLS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDIOC_S_EXT_CTRLS@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, sp
	mov	x2, x20
	bl	_cx2341x_ext_ctrls
	mov	x22, x0
	cbnz	w0, LBB0_1
; %bb.10:
	add	x20, x19, #8
	ldr	x8, [sp]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
Lloh9:
	adrp	x9, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w10, [x19, #16]
	cmp	x8, x9
	mov	w8, #1
	cinc	w8, w8, eq
	sdiv	w8, w10, w8
	ldr	w9, [x19, #44]
	str	w9, [sp, #56]
Lloh12:
	adrp	x9, _V4L2_MBUS_FMT_FIXED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_MBUS_FMT_FIXED@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #48]
	ldr	w0, [x19, #56]
Lloh15:
	adrp	x8, _video@GOTPAGE
Lloh16:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _s_mbus_fmt@GOTPAGE
Lloh19:
	ldr	x8, [x8, _s_mbus_fmt@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	add	x3, sp, #48
	bl	_v4l2_subdev_call
LBB0_12:
	ldr	x8, [x19, #48]
	ldr	x9, [x21]
	add	x8, x8, x9, lsl #2
	stp	x8, x19, [sp, #48]
Lloh21:
	adrp	x8, _cx18_api_func@GOTPAGE
Lloh22:
	ldr	x8, [x8, _cx18_api_func@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x0, sp, #48
	mov	x3, sp
	mov	x2, x20
	bl	_cx2341x_update
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.13:
	ldr	x8, [x19, #24]
	ldr	x1, [sp, #16]
	cmp	x8, x1
	b.ne	LBB0_18
; %bb.14:
	ldr	x8, [x19, #32]
	ldr	x2, [sp, #24]
	cmp	x8, x2
	b.ne	LBB0_19
; %bb.15:
	mov	w22, #0
	b	LBB0_20
LBB0_16:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_1
LBB0_17:
	mov	x22, x0
	str	w21, [x20, #12]
	b	LBB0_1
LBB0_18:
	ldr	x2, [sp, #24]
LBB0_19:
	mov	x0, x19
	bl	_cx18_setup_vbi_fmt
	mov	x22, x0
LBB0_20:
	ldp	q0, q1, [sp]
	ldr	x8, [sp, #32]
	str	x8, [x20, #32]
	stp	q0, q1, [x20]
	ldr	w8, [sp, #32]
	and	w9, w8, #0x300
	str	w9, [x19]
	and	x21, x8, #0x3
Lloh27:
	adrp	x20, _cx18_s_ext_ctrls.freqs@PAGE
Lloh28:
	add	x20, x20, _cx18_s_ext_ctrls.freqs@PAGEOFF
	mov	x0, x20
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.hs	LBB0_1
; %bb.21:
Lloh29:
	adrp	x8, _audio@GOTPAGE
Lloh30:
	ldr	x8, [x8, _audio@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _s_clock_freq@GOTPAGE
Lloh33:
	ldr	x8, [x8, _s_clock_freq@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	ldr	w3, [x20, x21, lsl #2]
	mov	x0, x19
	bl	_cx18_call_all
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CTRL_CLASS_USER,8,3       ; @V4L2_CTRL_CLASS_USER
	.comm	_V4L2_CTRL_CLASS_MPEG,8,3       ; @V4L2_CTRL_CLASS_MPEG
	.section	__DATA,__data
	.p2align	2                               ; @cx18_s_ext_ctrls.freqs
_cx18_s_ext_ctrls.freqs:
	.long	44100                           ; 0xac44
	.long	48000                           ; 0xbb80
	.long	32000                           ; 0x7d00

	.comm	_VIDIOC_S_EXT_CTRLS,4,2         ; @VIDIOC_S_EXT_CTRLS
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,8,3 ; @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_V4L2_MBUS_FMT_FIXED,4,2        ; @V4L2_MBUS_FMT_FIXED
	.comm	_video,4,2                      ; @video
	.comm	_s_mbus_fmt,4,2                 ; @s_mbus_fmt
	.comm	_cx18_api_func,4,2              ; @cx18_api_func
	.comm	_audio,4,2                      ; @audio
	.comm	_s_clock_freq,4,2               ; @s_clock_freq
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
