	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et8ek8_dev_init
_et8ek8_dev_init:                       ## @et8ek8_dev_init
	.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, %r12
	callq	_to_et8ek8_sensor
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_et8ek8_power_on
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_22
LBB0_2:
	movq	_ET8EK8_REG_8BIT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_REG_REVISION_NUMBER_L@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	callq	_et8ek8_i2c_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%r13), %esi
	movq	_REG_REVISION_NUMBER_H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	callq	_et8ek8_i2c_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movq	%r14, %rdi
	callq	_et8ek8_power_off
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	-44(%rbp), %edx
	shll	$8, %edx
	addl	-48(%rbp), %edx
	movl	%edx, (%r14)
	movq	_ET8EK8_REV_1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_9
## %bb.7:
	movq	_ET8EK8_REV_2@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
LBB0_9:
	movq	_meta_reglist@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_et8ek8_reglist_import
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %ebx
	movq	_ET8EK8_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
LBB0_11:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_12:
	movq	_ET8EK8_REGLIST_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_meta_reglist@GOTPCREL(%rip), %rdi
	callq	_et8ek8_reglist_find_type
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movq	%r14, %rsi
	addq	$4, %rsi
	movl	%eax, %edi
	callq	_et8ek8_reglist_to_mbus
	movq	_ET8EK8_REGLIST_POWERON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_meta_reglist@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_et8ek8_i2c_reglist_find_write
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movq	_ET8EK8_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_11
LBB0_13:
	movq	_ET8EK8_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_16:
	movq	%r14, %rdi
	callq	_et8ek8_stream_on
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.17:
	movq	%r12, %rdi
	callq	_et8ek8_g_priv_mem
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_19:
	movq	%r14, %rdi
	callq	_et8ek8_stream_off
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.20:
	movq	%r14, %rdi
	callq	_et8ek8_power_off
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.21:
	xorl	%ebx, %ebx
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not power on\n"

	.comm	_ET8EK8_REG_8BIT,4,2            ## @ET8EK8_REG_8BIT
	.comm	_REG_REVISION_NUMBER_L,4,2      ## @REG_REVISION_NUMBER_L
	.comm	_REG_REVISION_NUMBER_H,4,2      ## @REG_REVISION_NUMBER_H
L_.str.1:                               ## @.str.1
	.asciz	"no et8ek8 sensor detected\n"

	.comm	_ET8EK8_REV_1,4,2               ## @ET8EK8_REV_1
	.comm	_ET8EK8_REV_2,4,2               ## @ET8EK8_REV_2
L_.str.2:                               ## @.str.2
	.asciz	"unknown version 0x%x detected, continuing anyway\n"

	.comm	_meta_reglist,4,2               ## @meta_reglist
L_.str.3:                               ## @.str.3
	.asciz	"invalid register list %s, import failed\n"

	.comm	_ET8EK8_NAME,4,2                ## @ET8EK8_NAME
	.comm	_ET8EK8_REGLIST_MODE,4,2        ## @ET8EK8_REGLIST_MODE
L_.str.4:                               ## @.str.4
	.asciz	"invalid register list %s, no mode found\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ET8EK8_REGLIST_POWERON,4,2     ## @ET8EK8_REGLIST_POWERON
L_.str.5:                               ## @.str.5
	.asciz	"invalid register list %s, no POWERON mode found\n"

L_.str.6:                               ## @.str.6
	.asciz	"can not read OTP (EEPROM) memory from sensor\n"

	.no_dead_strip	_et8ek8_dev_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et8ek8_dev_init
_et8ek8_dev_init:                       ; @et8ek8_dev_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x0
	bl	_to_et8ek8_sensor
	mov	x19, x0
	mov	x0, x21
	bl	_v4l2_get_subdevdata
	mov	x20, x0
	mov	x0, x19
	bl	_et8ek8_power_on
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_7
LBB0_2:
Lloh2:
	adrp	x23, _ET8EK8_REG_8BIT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ET8EK8_REG_8BIT@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh4:
	adrp	x8, _REG_REVISION_NUMBER_L@GOTPAGE
Lloh5:
	ldr	x8, [x8, _REG_REVISION_NUMBER_L@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x20
	bl	_et8ek8_i2c_read_reg
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w1, [x23]
Lloh7:
	adrp	x8, _REG_REVISION_NUMBER_H@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_REVISION_NUMBER_H@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x20
	bl	_et8ek8_i2c_read_reg
	mov	x22, x0
	cbz	w0, LBB0_8
LBB0_4:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x20
	bl	_dev_err
LBB0_6:
	mov	x0, x19
	bl	_et8ek8_power_off
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	ldp	w8, w9, [sp, #8]
	add	w2, w9, w8, lsl #8
	str	w2, [x19]
Lloh12:
	adrp	x8, _ET8EK8_REV_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ET8EK8_REV_1@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _ET8EK8_REV_2@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ET8EK8_REV_2@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w2, w8
	ccmp	w2, w9, #4, ne
	b.eq	LBB0_10
; %bb.9:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_info
LBB0_10:
Lloh20:
	adrp	x1, _meta_reglist@GOTPAGE
Lloh21:
	ldr	x1, [x1, _meta_reglist@GOTPAGEOFF]
	mov	x0, x20
	bl	_et8ek8_reglist_import
	cbz	w0, LBB0_12
; %bb.11:
	mov	x22, x0
Lloh22:
	adrp	x8, _ET8EK8_NAME@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ET8EK8_NAME@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_12:
Lloh27:
	adrp	x8, _ET8EK8_REGLIST_MODE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ET8EK8_REGLIST_MODE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x0, _meta_reglist@GOTPAGE
Lloh31:
	ldr	x0, [x0, _meta_reglist@GOTPAGEOFF]
	bl	_et8ek8_reglist_find_type
	str	w0, [x19, #8]
	cbz	w0, LBB0_15
; %bb.13:
	add	x1, x19, #4
	bl	_et8ek8_reglist_to_mbus
Lloh32:
	adrp	x8, _ET8EK8_REGLIST_POWERON@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ET8EK8_REGLIST_POWERON@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
Lloh35:
	adrp	x1, _meta_reglist@GOTPAGE
Lloh36:
	ldr	x1, [x1, _meta_reglist@GOTPAGEOFF]
	mov	x0, x20
	bl	_et8ek8_i2c_reglist_find_write
	cbz	w0, LBB0_16
; %bb.14:
	mov	x22, x0
Lloh37:
	adrp	x8, _ET8EK8_NAME@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ET8EK8_NAME@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh40:
	adrp	x1, l_.str.5@PAGE
Lloh41:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_5
LBB0_15:
Lloh42:
	adrp	x8, _ET8EK8_NAME@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ET8EK8_NAME@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh45:
	adrp	x1, l_.str.4@PAGE
Lloh46:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh47:
	adrp	x8, _ENODEV@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_16:
	mov	x0, x19
	bl	_et8ek8_stream_on
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.17:
	mov	x0, x21
	bl	_et8ek8_g_priv_mem
	cbz	w0, LBB0_19
; %bb.18:
Lloh50:
	adrp	x1, l_.str.6@PAGE
Lloh51:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_19:
	mov	x0, x19
	bl	_et8ek8_stream_off
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.20:
	mov	x0, x19
	bl	_et8ek8_power_off
	mov	x22, x0
	cbnz	w0, LBB0_6
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not power on\n"

	.comm	_ET8EK8_REG_8BIT,4,2            ; @ET8EK8_REG_8BIT
	.comm	_REG_REVISION_NUMBER_L,4,2      ; @REG_REVISION_NUMBER_L
	.comm	_REG_REVISION_NUMBER_H,4,2      ; @REG_REVISION_NUMBER_H
l_.str.1:                               ; @.str.1
	.asciz	"no et8ek8 sensor detected\n"

	.comm	_ET8EK8_REV_1,4,2               ; @ET8EK8_REV_1
	.comm	_ET8EK8_REV_2,4,2               ; @ET8EK8_REV_2
l_.str.2:                               ; @.str.2
	.asciz	"unknown version 0x%x detected, continuing anyway\n"

	.comm	_meta_reglist,4,2               ; @meta_reglist
l_.str.3:                               ; @.str.3
	.asciz	"invalid register list %s, import failed\n"

	.comm	_ET8EK8_NAME,4,2                ; @ET8EK8_NAME
	.comm	_ET8EK8_REGLIST_MODE,4,2        ; @ET8EK8_REGLIST_MODE
l_.str.4:                               ; @.str.4
	.asciz	"invalid register list %s, no mode found\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ET8EK8_REGLIST_POWERON,4,2     ; @ET8EK8_REGLIST_POWERON
l_.str.5:                               ; @.str.5
	.asciz	"invalid register list %s, no POWERON mode found\n"

l_.str.6:                               ; @.str.6
	.asciz	"can not read OTP (EEPROM) memory from sensor\n"

	.no_dead_strip	_et8ek8_dev_init
.subsections_via_symbols
