	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx23885_g_chip_ident           ## -- Begin function cx23885_g_chip_ident
	.p2align	4, 0x90
_cx23885_g_chip_ident:                  ## @cx23885_g_chip_ident
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	(%rsi), %r14
	movq	_V4L2_IDENT_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rdx)
	movl	$0, (%rdx)
	movl	16(%rdx), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_10
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.3:
	movl	20(%rbx), %eax
	cmpl	$2, %eax
	je	LBB0_15
## %bb.4:
	cmpl	$1, %eax
	je	LBB0_13
## %bb.5:
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	_RDR_CFG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movzbl	%al, %ecx
	movq	16(%r14), %rdx
	movl	(%rdx), %edx
	cmpl	$34944, %edx                    ## imm = 0x8880
	je	LBB0_16
## %bb.7:
	cmpl	$34898, %edx                    ## imm = 0x8852
	jne	LBB0_18
## %bb.8:
	cmpl	$4, %ecx
	je	LBB0_20
## %bb.19:
	movq	_V4L2_IDENT_CX23885@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_10:
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_chip_ident@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_call_all
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	xorl	%eax, %eax
	cmpq	$0, 8(%r14)
	je	LBB0_12
## %bb.14:
	movq	_V4L2_IDENT_CX23417@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rbx)
	movl	$0, (%rbx)
	jmp	LBB0_12
LBB0_15:
	movq	_CX23885_HW_888_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_g_chip_ident@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %r8
	callq	_call_hw
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_16:
	andl	$254, %eax
	cmpl	$14, %eax
	jne	LBB0_20
## %bb.17:
	movq	_V4L2_IDENT_CX23887@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_20:
	movq	_V4L2_IDENT_CX23888@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	movq	_V4L2_IDENT_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_21:
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	shll	$16, %edx
	shll	$8, %ecx
	orl	%edx, %ecx
	movzbl	(%r14), %eax
	orl	%ecx, %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_IDENT_NONE,8,3            ## @V4L2_IDENT_NONE
	.comm	_RDR_CFG2,4,2                   ## @RDR_CFG2
	.comm	_V4L2_IDENT_CX23888,8,3         ## @V4L2_IDENT_CX23888
	.comm	_V4L2_IDENT_CX23885,8,3         ## @V4L2_IDENT_CX23885
	.comm	_V4L2_IDENT_CX23887,8,3         ## @V4L2_IDENT_CX23887
	.comm	_V4L2_IDENT_UNKNOWN,8,3         ## @V4L2_IDENT_UNKNOWN
	.comm	_V4L2_IDENT_CX23417,8,3         ## @V4L2_IDENT_CX23417
	.comm	_CX23885_HW_888_IR,4,2          ## @CX23885_HW_888_IR
	.comm	_core,4,2                       ## @core
	.comm	_g_chip_ident,4,2               ## @g_chip_ident
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx23885_g_chip_ident           ; -- Begin function cx23885_g_chip_ident
	.p2align	2
_cx23885_g_chip_ident:                  ; @cx23885_g_chip_ident
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
Lloh0:
	adrp	x8, _V4L2_IDENT_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_IDENT_NONE@GOTPAGEOFF]
	ldr	x20, [x1]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x2, #8]
	str	wzr, [x2]
	ldr	w8, [x2, #16]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #20]
	cmp	w8, #2
	b.eq	LBB0_10
; %bb.4:
	cmp	w8, #1
	b.eq	LBB0_11
; %bb.5:
	cbnz	w8, LBB0_8
; %bb.6:
Lloh3:
	adrp	x8, _RDR_CFG2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RDR_CFG2@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cx_read
	mov	x8, x0
	mov	w0, #0
	and	w9, w8, #0xff
	ldr	x10, [x20, #16]
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _V4L2_IDENT_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V4L2_IDENT_UNKNOWN@GOTPAGEOFF]
	mov	w12, #34944
	and	w8, w8, #0xfe
Lloh8:
	adrp	x13, _V4L2_IDENT_CX23888@GOTPAGE
Lloh9:
	ldr	x13, [x13, _V4L2_IDENT_CX23888@GOTPAGEOFF]
Lloh10:
	adrp	x14, _V4L2_IDENT_CX23887@GOTPAGE
Lloh11:
	ldr	x14, [x14, _V4L2_IDENT_CX23887@GOTPAGEOFF]
	cmp	w8, #14
	csel	x8, x14, x13, eq
Lloh12:
	adrp	x14, _V4L2_IDENT_CX23885@GOTPAGE
Lloh13:
	ldr	x14, [x14, _V4L2_IDENT_CX23885@GOTPAGEOFF]
	cmp	w9, #4
	csel	x13, x13, x14, eq
	mov	w14, #34898
	cmp	w10, w14
	csel	x11, x11, x13, ne
	cmp	w10, w12
	csel	x8, x8, x11, eq
	ldr	x8, [x8]
	str	x8, [x19, #8]
	lsl	w8, w9, #8
	bfi	w8, w10, #16, #16
	ldrb	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x8, _core@GOTPAGE
Lloh15:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _g_chip_ident@GOTPAGE
Lloh18:
	ldr	x8, [x8, _g_chip_ident@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x19
	bl	_call_all
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh23:
	adrp	x8, _CX23885_HW_888_IR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CX23885_HW_888_IR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _core@GOTPAGE
Lloh27:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x8, _g_chip_ident@GOTPAGE
Lloh30:
	ldr	x8, [x8, _g_chip_ident@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x4, x19
	bl	_call_hw
	mov	w0, #0
	b	LBB0_9
LBB0_11:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	w0, #0
Lloh32:
	adrp	x8, _V4L2_IDENT_CX23417@GOTPAGE
Lloh33:
	ldr	x8, [x8, _V4L2_IDENT_CX23417@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	str	wzr, [x19]
	b	LBB0_9
LBB0_13:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_IDENT_NONE,8,3            ; @V4L2_IDENT_NONE
	.comm	_RDR_CFG2,4,2                   ; @RDR_CFG2
	.comm	_V4L2_IDENT_CX23888,8,3         ; @V4L2_IDENT_CX23888
	.comm	_V4L2_IDENT_CX23885,8,3         ; @V4L2_IDENT_CX23885
	.comm	_V4L2_IDENT_CX23887,8,3         ; @V4L2_IDENT_CX23887
	.comm	_V4L2_IDENT_UNKNOWN,8,3         ; @V4L2_IDENT_UNKNOWN
	.comm	_V4L2_IDENT_CX23417,8,3         ; @V4L2_IDENT_CX23417
	.comm	_CX23885_HW_888_IR,4,2          ; @CX23885_HW_888_IR
	.comm	_core,4,2                       ; @core
	.comm	_g_chip_ident,4,2               ; @g_chip_ident
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
