	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx231xx_v4l2_open
_cx231xx_v4l2_open:                     ## @cx231xx_v4l2_open
	.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	%rdi, %r15
	callq	_video_devdata
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_video_drvdata
	movq	%rax, %r14
	movl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_2
## %bb.5:
	cmpl	$130, %eax
	jne	LBB0_9
## %bb.6:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ebx
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
LBB0_3:
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	_v4l2_type_names@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	movl	(%rcx,%rdx,4), %edx
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_cx231xx_videodbg
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.11:
	movq	%rax, %r13
	leaq	12(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r13, %rdi
	callq	_kfree
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_13:
	movq	%r14, 16(%r13)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movq	%r13, (%r15)
	leaq	4(%r13), %r15
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_v4l2_fh_init
	movl	(%r13), %eax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	%r14, %r12
	jne	LBB0_19
## %bb.14:
	cmpq	$0, (%r14)
	jne	LBB0_19
## %bb.15:
	cmpq	$0, 24(%r14)
	jne	LBB0_16
## %bb.17:
	movq	_POLARIS_AVMODE_ANALOGT_TV@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_16:
	movq	_POLARIS_AVMODE_ENXTERNAL_AV@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %esi
	movq	%r12, %r14
	movq	%r12, %rdi
	callq	_cx231xx_set_power_mode
	movq	%r12, %rdi
	callq	_cx231xx_set_video_alternate
	movq	%r12, %rdi
	callq	_cx231xx_config_i2c
	movl	8(%r12), %eax
	cmpl	$2, %eax
	movl	$2, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, 8(%r12)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
LBB0_19:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	movq	%rcx, %r14
	callq	_cx231xx_videodbg
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_radio@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_call_all
	movq	%r14, %rcx
LBB0_21:
	incq	(%r12)
	movl	(%r13), %r8d
	cmpl	(%rcx), %r8d
	jne	LBB0_23
## %bb.22:
	leaq	8(%r13), %rdi
	leaq	20(%r12), %rcx
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	_cx231xx_video_qops@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	pushq	%rbx
	pushq	%r13
	pushq	$4
	callq	_videobuf_queue_vmalloc_init
	addq	$32, %rsp
	movl	(%r13), %r8d
LBB0_23:
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	jne	LBB0_25
## %bb.24:
	movq	_INDEX_VANC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_cx231xx_set_alt_setting
	movq	%r13, %rdi
	addq	$8, %rdi
	addq	$16, %r12
	movl	(%r13), %r8d
	movq	_V4L2_FIELD_SEQ_TB@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	_cx231xx_vbi_qops@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	pushq	%rbx
	pushq	%r13
	pushq	$4
	callq	_videobuf_queue_vmalloc_init
	addq	$32, %rsp
LBB0_25:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_v4l2_fh_add
	xorl	%ebx, %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,4,2  ## @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open dev=%s type=%s users=%d\n"

	.comm	_v4l2_type_names,8,3            ## @v4l2_type_names
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_POLARIS_AVMODE_ENXTERNAL_AV,4,2 ## @POLARIS_AVMODE_ENXTERNAL_AV
	.comm	_POLARIS_AVMODE_ANALOGT_TV,4,2  ## @POLARIS_AVMODE_ANALOGT_TV
L_.str.1:                               ## @.str.1
	.asciz	"video_open: setting radio device\n"

	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_radio,4,2                    ## @s_radio
	.comm	_cx231xx_video_qops,4,2         ## @cx231xx_video_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_INDEX_VANC,4,2                 ## @INDEX_VANC
	.comm	_cx231xx_vbi_qops,4,2           ## @cx231xx_vbi_qops
	.comm	_V4L2_FIELD_SEQ_TB,4,2          ## @V4L2_FIELD_SEQ_TB
	.comm	_CX231XX_ANALOG_MODE,4,2        ## @CX231XX_ANALOG_MODE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_errCode,8,3                    ## @errCode
	.no_dead_strip	_cx231xx_v4l2_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx231xx_v4l2_open
_cx231xx_v4l2_open:                     ; @cx231xx_v4l2_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x0
	bl	_video_devdata
	mov	x24, x0
	mov	x0, x23
	bl	_video_drvdata
	mov	x19, x0
	ldr	w8, [x24]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.3:
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
LBB0_5:
	ldr	w22, [x8]
	mov	w25, #1
	b	LBB0_7
LBB0_6:
	mov	w25, #0
	mov	w22, #0
LBB0_7:
	mov	x0, x24
	bl	_video_device_node_name
                                        ; kill: def $w0 killed $w0 def $x0
Lloh4:
	adrp	x8, _v4l2_type_names@GOTPAGE
Lloh5:
	ldr	x8, [x8, _v4l2_type_names@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w8, [x8, w22, uxtw #2]
	stp	x8, x9, [sp, #8]
	str	x0, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_cx231xx_videodbg
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.8:
	mov	x20, x0
	add	x21, x19, #12
	mov	x0, x21
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_14
; %bb.9:
	mov	x0, x20
	bl	_kfree
Lloh12:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	str	x19, [x20, #16]
	str	w22, [x20]
	add	x22, x20, #4
	str	x20, [x23]
	mov	x0, x22
	mov	x1, x24
	bl	_v4l2_fh_init
	ldr	w8, [x20]
Lloh18:
	adrp	x23, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh19:
	ldr	x23, [x23, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.15:
	ldr	x8, [x19]
	cbnz	x8, LBB0_17
; %bb.16:
Lloh20:
	adrp	x8, _POLARIS_AVMODE_ANALOGT_TV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _POLARIS_AVMODE_ANALOGT_TV@GOTPAGEOFF]
	ldr	x9, [x19, #24]
Lloh22:
	adrp	x10, _POLARIS_AVMODE_ENXTERNAL_AV@GOTPAGE
Lloh23:
	ldr	x10, [x10, _POLARIS_AVMODE_ENXTERNAL_AV@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cx231xx_set_power_mode
	mov	x0, x19
	bl	_cx231xx_set_video_alternate
	mov	x0, x19
	bl	_cx231xx_config_i2c
	ldr	w8, [x19, #8]
	mov	w9, #2
	cmp	w8, #2
	csel	w8, w8, w9, lt
	str	w8, [x19, #8]
LBB0_17:
	tbnz	w25, #0, LBB0_19
; %bb.18:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_cx231xx_videodbg
Lloh26:
	adrp	x8, _tuner@GOTPAGE
Lloh27:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _s_radio@GOTPAGE
Lloh30:
	ldr	x8, [x8, _s_radio@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_call_all
LBB0_19:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	w4, [x20]
	ldr	w8, [x23]
	cmp	w4, w8
	b.ne	LBB0_21
; %bb.20:
	add	x0, x20, #8
	add	x3, x19, #20
Lloh32:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh34:
	ldr	w5, [x8]
	str	x21, [sp]
Lloh35:
	adrp	x1, _cx231xx_video_qops@GOTPAGE
Lloh36:
	ldr	x1, [x1, _cx231xx_video_qops@GOTPAGEOFF]
	mov	x2, #0
	mov	w6, #4
	mov	x7, x20
	bl	_videobuf_queue_vmalloc_init
	ldr	w4, [x20]
LBB0_21:
Lloh37:
	adrp	x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w4, w8
	b.ne	LBB0_23
; %bb.22:
Lloh40:
	adrp	x8, _INDEX_VANC@GOTPAGE
Lloh41:
	ldr	x8, [x8, _INDEX_VANC@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_cx231xx_set_alt_setting
	add	x3, x19, #16
	mov	x0, x20
	ldr	w4, [x0], #8
Lloh43:
	adrp	x8, _V4L2_FIELD_SEQ_TB@GOTPAGE
Lloh44:
	ldr	x8, [x8, _V4L2_FIELD_SEQ_TB@GOTPAGEOFF]
Lloh45:
	ldr	w5, [x8]
	str	x21, [sp]
Lloh46:
	adrp	x1, _cx231xx_vbi_qops@GOTPAGE
Lloh47:
	ldr	x1, [x1, _cx231xx_vbi_qops@GOTPAGEOFF]
	mov	x2, #0
	mov	w6, #4
	mov	x7, x20
	bl	_videobuf_queue_vmalloc_init
LBB0_23:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x22
	bl	_v4l2_fh_add
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,4,2  ; @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open dev=%s type=%s users=%d\n"

	.comm	_v4l2_type_names,8,3            ; @v4l2_type_names
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_POLARIS_AVMODE_ENXTERNAL_AV,4,2 ; @POLARIS_AVMODE_ENXTERNAL_AV
	.comm	_POLARIS_AVMODE_ANALOGT_TV,4,2  ; @POLARIS_AVMODE_ANALOGT_TV
l_.str.1:                               ; @.str.1
	.asciz	"video_open: setting radio device\n"

	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_radio,4,2                    ; @s_radio
	.comm	_cx231xx_video_qops,4,2         ; @cx231xx_video_qops
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_INDEX_VANC,4,2                 ; @INDEX_VANC
	.comm	_cx231xx_vbi_qops,4,2           ; @cx231xx_vbi_qops
	.comm	_V4L2_FIELD_SEQ_TB,4,2          ; @V4L2_FIELD_SEQ_TB
	.comm	_CX231XX_ANALOG_MODE,4,2        ; @CX231XX_ANALOG_MODE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_errCode,8,3                    ; @errCode
	.no_dead_strip	_cx231xx_v4l2_open
.subsections_via_symbols
