	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k4ecgx_read_fw_ver
_s5k4ecgx_read_fw_ver:                  ## @s5k4ecgx_read_fw_ver
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_v4l2_get_subdevdata
	movq	%rax, %rbx
	movq	$0, -24(%rbp)
	movq	_REG_FW_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_s5k4ecgx_read
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	-24(%rbp), %rax
	movq	_S5K4ECGX_FW_VERSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_REG_FW_REVISION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_s5k4ecgx_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_info
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_FW_VERSION,4,2             ## @REG_FW_VERSION
	.comm	_S5K4ECGX_FW_VERSION,8,3        ## @S5K4ECGX_FW_VERSION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FW version check failed!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_REG_FW_REVISION,4,2            ## @REG_FW_REVISION
L_.str.1:                               ## @.str.1
	.asciz	"chip found FW ver: 0x%x, HW rev: 0x%x\n"

	.no_dead_strip	_s5k4ecgx_read_fw_ver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k4ecgx_read_fw_ver
_s5k4ecgx_read_fw_ver:                  ; @s5k4ecgx_read_fw_ver
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_v4l2_get_subdevdata
	mov	x20, x0
	str	xzr, [sp]
Lloh0:
	adrp	x8, _REG_FW_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_FW_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_s5k4ecgx_read
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [sp]
Lloh3:
	adrp	x9, _S5K4ECGX_FW_VERSION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S5K4ECGX_FW_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _REG_FW_REVISION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_FW_REVISION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_s5k4ecgx_read
	tbnz	w0, #31, LBB0_5
; %bb.3:
	ldp	x2, x3, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_v4l2_info
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_FW_VERSION,4,2             ; @REG_FW_VERSION
	.comm	_S5K4ECGX_FW_VERSION,8,3        ; @S5K4ECGX_FW_VERSION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FW version check failed!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_REG_FW_REVISION,4,2            ; @REG_FW_REVISION
l_.str.1:                               ; @.str.1
	.asciz	"chip found FW ver: 0x%x, HW rev: 0x%x\n"

	.no_dead_strip	_s5k4ecgx_read_fw_ver
.subsections_via_symbols
