	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jsa1212_read_als_data
_jsa1212_read_als_data:                 ## @jsa1212_read_als_data
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_JSA1212_CONF_ALS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_jsa1212_als_enable
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	_JSA1212_ALS_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movl	8(%rbx), %edi
	movq	_JSA1212_ALS_DT1_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	-20(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, (%r14)
	jmp	LBB0_4
LBB0_2:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movq	_JSA1212_CONF_ALS_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_jsa1212_als_enable
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JSA1212_CONF_ALS_ENABLE,4,2    ## @JSA1212_CONF_ALS_ENABLE
	.comm	_JSA1212_ALS_DELAY_MS,4,2       ## @JSA1212_ALS_DELAY_MS
	.comm	_JSA1212_ALS_DT1_REG,4,2        ## @JSA1212_ALS_DT1_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"als data read err\n"

	.comm	_JSA1212_CONF_ALS_DISABLE,4,2   ## @JSA1212_CONF_ALS_DISABLE
	.no_dead_strip	_jsa1212_read_als_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jsa1212_read_als_data
_jsa1212_read_als_data:                 ; @jsa1212_read_als_data
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _JSA1212_CONF_ALS_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JSA1212_CONF_ALS_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_jsa1212_als_enable
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _JSA1212_ALS_DELAY_MS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JSA1212_ALS_DELAY_MS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msleep
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _JSA1212_ALS_DT1_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _JSA1212_ALS_DT1_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_le16_to_cpu
	str	w0, [x20]
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_4:
Lloh11:
	adrp	x8, _JSA1212_CONF_ALS_DISABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _JSA1212_CONF_ALS_DISABLE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jsa1212_als_enable
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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_JSA1212_CONF_ALS_ENABLE,4,2    ; @JSA1212_CONF_ALS_ENABLE
	.comm	_JSA1212_ALS_DELAY_MS,4,2       ; @JSA1212_ALS_DELAY_MS
	.comm	_JSA1212_ALS_DT1_REG,4,2        ; @JSA1212_ALS_DT1_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"als data read err\n"

	.comm	_JSA1212_CONF_ALS_DISABLE,4,2   ; @JSA1212_CONF_ALS_DISABLE
	.no_dead_strip	_jsa1212_read_als_data
.subsections_via_symbols
