	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk3310_init
_stk3310_init:                          ## @stk3310_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_iio_priv
	movq	%rax, %r15
	movq	8(%rax), %r14
	movl	4(%rax), %edi
	movq	_STK3310_REG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-28(%rbp), %edx
	movq	_STK3310_CHIP_ID_VAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_6
## %bb.3:
	movq	_STK3311_CHIP_ID_VAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_6
## %bb.4:
	movq	_STK3335_CHIP_ID_VAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_STK3310_STATE_EN_ALS@GOTPCREL(%rip), %rax
	movq	_STK3310_STATE_EN_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_stk3310_set_state
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	(%r15), %edi
	movq	_STK3310_PSINT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_field_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STK3310_REG_ID,4,2             ## @STK3310_REG_ID
	.comm	_STK3310_CHIP_ID_VAL,4,2        ## @STK3310_CHIP_ID_VAL
	.comm	_STK3311_CHIP_ID_VAL,4,2        ## @STK3311_CHIP_ID_VAL
	.comm	_STK3335_CHIP_ID_VAL,4,2        ## @STK3335_CHIP_ID_VAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid chip id: 0x%x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_STK3310_STATE_EN_ALS,4,2       ## @STK3310_STATE_EN_ALS
	.comm	_STK3310_STATE_EN_PS,4,2        ## @STK3310_STATE_EN_PS
L_.str.1:                               ## @.str.1
	.asciz	"failed to enable sensor"

	.comm	_STK3310_PSINT_EN,4,2           ## @STK3310_PSINT_EN
L_.str.2:                               ## @.str.2
	.asciz	"failed to enable interrupts!\n"

	.no_dead_strip	_stk3310_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk3310_init
_stk3310_init:                          ; @stk3310_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_iio_priv
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _STK3310_REG_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STK3310_REG_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _STK3310_CHIP_ID_VAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STK3310_CHIP_ID_VAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _STK3311_CHIP_ID_VAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _STK3311_CHIP_ID_VAL@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _STK3335_CHIP_ID_VAL@GOTPAGE
Lloh10:
	ldr	x11, [x11, _STK3335_CHIP_ID_VAL@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _STK3310_STATE_EN_ALS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STK3310_STATE_EN_ALS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _STK3310_STATE_EN_PS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STK3310_STATE_EN_PS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_stk3310_set_state
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w0, [x20]
Lloh18:
	adrp	x8, _STK3310_PSINT_EN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STK3310_PSINT_EN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_regmap_field_write
	mov	x21, x0
	tbz	w0, #31, LBB0_9
; %bb.4:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_5:
	mov	x21, x0
	b	LBB0_9
LBB0_6:
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
	mov	x21, x0
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_dev_err
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_STK3310_REG_ID,4,2             ; @STK3310_REG_ID
	.comm	_STK3310_CHIP_ID_VAL,4,2        ; @STK3310_CHIP_ID_VAL
	.comm	_STK3311_CHIP_ID_VAL,4,2        ; @STK3311_CHIP_ID_VAL
	.comm	_STK3335_CHIP_ID_VAL,4,2        ; @STK3335_CHIP_ID_VAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid chip id: 0x%x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_STK3310_STATE_EN_ALS,4,2       ; @STK3310_STATE_EN_ALS
	.comm	_STK3310_STATE_EN_PS,4,2        ; @STK3310_STATE_EN_PS
l_.str.1:                               ; @.str.1
	.asciz	"failed to enable sensor"

	.comm	_STK3310_PSINT_EN,4,2           ; @STK3310_PSINT_EN
l_.str.2:                               ; @.str.2
	.asciz	"failed to enable interrupts!\n"

	.no_dead_strip	_stk3310_init
.subsections_via_symbols
