	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_g_chip_ident
_cx18_g_chip_ident:                     ## @cx18_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movq	(%rsi), %rdi
	movq	_V4L2_IDENT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdx)
	movq	$0, (%rdx)
	movl	12(%rdx), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.3:
	movl	16(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_8
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_V4L2_IDENT_CX23418@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	$13049896, %esi                 ## imm = 0xC72028
	callq	_cx18_read_reg
	movq	%rax, (%rbx)
	jmp	LBB0_9
LBB0_6:
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_chip_ident@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rcx
	callq	_cx18_call_all
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	movq	_CX18_HW_418_AV@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	%rbx, %r8
	callq	_cx18_call_hw
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_IDENT_NONE,4,2            ## @V4L2_IDENT_NONE
	.comm	_V4L2_IDENT_CX23418,4,2         ## @V4L2_IDENT_CX23418
	.comm	_CX18_HW_418_AV,4,2             ## @CX18_HW_418_AV
	.comm	_core,4,2                       ## @core
	.comm	_g_chip_ident,4,2               ## @g_chip_ident
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cx18_g_chip_ident
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_g_chip_ident
_cx18_g_chip_ident:                     ; @cx18_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	x0, [x1]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x2, #8]
	str	xzr, [x2]
	ldr	w8, [x2, #12]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.eq	LBB0_10
; %bb.4:
	cbnz	w8, LBB0_8
; %bb.5:
Lloh3:
	adrp	x8, _V4L2_IDENT_CX23418@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_IDENT_CX23418@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	w1, #8232
	movk	w1, #199, lsl #16
	bl	_cx18_read_reg
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _core@GOTPAGE
Lloh7:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _g_chip_ident@GOTPAGE
Lloh10:
	ldr	x8, [x8, _g_chip_ident@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x3, x19
	bl	_cx18_call_all
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	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:
Lloh15:
	adrp	x8, _CX18_HW_418_AV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CX18_HW_418_AV@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _core@GOTPAGE
Lloh19:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _g_chip_ident@GOTPAGE
Lloh22:
	ldr	x8, [x8, _g_chip_ident@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x4, x19
	bl	_cx18_call_hw
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_IDENT_NONE,4,2            ; @V4L2_IDENT_NONE
	.comm	_V4L2_IDENT_CX23418,4,2         ; @V4L2_IDENT_CX23418
	.comm	_CX18_HW_418_AV,4,2             ; @CX18_HW_418_AV
	.comm	_core,4,2                       ; @core
	.comm	_g_chip_ident,4,2               ; @g_chip_ident
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cx18_g_chip_ident
.subsections_via_symbols
