	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_cx2388x_ident
_get_cx2388x_ident:                     ## @get_cx2388x_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	%rdi, %r14
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$516, %esi                      ## imm = 0x204
	callq	_cx25840_read4
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	$768, %esi                      ## imm = 0x300
	callq	_cx25840_read4
	testw	%bx, %bx
	je	LBB0_3
## %bb.1:
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzwl	%ax, %eax
	cmpl	%eax, %ecx
	jne	LBB0_6
## %bb.2:
	movq	_CX23885_AV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	testl	$268435455, %eax                ## imm = 0xFFFFFFF
	je	LBB0_5
## %bb.4:
	movq	_CX23888_AV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l_err
LBB0_6:
	movq	_CX23887_AV@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_cx25840_write
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX23885_AV,4,2                 ## @CX23885_AV
	.comm	_CX23887_AV,4,2                 ## @CX23887_AV
	.comm	_CX23888_AV,4,2                 ## @CX23888_AV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to detect h/w, assuming cx23887\n"

	.no_dead_strip	_get_cx2388x_ident
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_cx2388x_ident
_get_cx2388x_ident:                     ; @get_cx2388x_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, x0
	mov	w1, #0
	mov	w2, #0
	bl	_cx25840_write
	mov	x0, x19
	mov	w1, #516
	bl	_cx25840_read4
	and	w20, w0, #0xffff
	mov	x0, x19
	mov	w1, #768
	bl	_cx25840_read4
	cbz	w20, LBB0_2
; %bb.1:
	lsr	w8, w0, #16
Lloh0:
	adrp	x9, _CX23887_AV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CX23887_AV@GOTPAGEOFF]
Lloh2:
	adrp	x10, _CX23885_AV@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CX23885_AV@GOTPAGEOFF]
	cmp	w8, w0, uxth
	csel	x8, x10, x9, eq
	b	LBB0_5
LBB0_2:
	tst	w0, #0xfffffff
	b.eq	LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _CX23888_AV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CX23888_AV@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_v4l_err
Lloh8:
	adrp	x8, _CX23887_AV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CX23887_AV@GOTPAGEOFF]
LBB0_5:
	ldr	w20, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #2
	bl	_cx25840_write
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CX23885_AV,4,2                 ; @CX23885_AV
	.comm	_CX23887_AV,4,2                 ; @CX23887_AV
	.comm	_CX23888_AV,4,2                 ; @CX23888_AV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to detect h/w, assuming cx23887\n"

	.no_dead_strip	_get_cx2388x_ident
.subsections_via_symbols
