	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3532_parse_als
_lm3532_parse_als:                      ## @lm3532_parse_als
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %r14
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	$0, (%r14)
LBB0_5:
	movq	8(%r15), %rdi
	leaq	4(%r12), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	_LM3532_ALS_WINDOW_mV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%eax, (%rbx)
	movl	%eax, %ecx
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	movl	(%rbx), %ecx
	movq	_LM3532_ALS_WINDOW_mV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:
	movslq	%ecx, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_9
## %bb.10:
	movq	8(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	leaq	-36(%rbp), %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_12:
	movl	-36(%rbp), %edi
	callq	_lm3532_get_als_imp_index
LBB0_13:
	movq	%rax, 32(%r14)
	movq	8(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	leaq	-36(%rbp), %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_15:
	movl	-36(%rbp), %edi
	callq	_lm3532_get_als_imp_index
LBB0_16:
	movq	%rax, 24(%r14)
	movq	8(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	leaq	-40(%rbp), %rdx
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_18:
	movl	-40(%rbp), %edi
	callq	_lm3532_get_als_avg_index
LBB0_19:
	movq	%rax, 16(%r14)
	movq	8(%r15), %rdi
	addq	$8, %r12
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdx
	callq	_device_property_read_u8
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movq	$0, (%r12)
	xorl	%ecx, %ecx
	jmp	LBB0_22
LBB0_20:
	movq	(%r12), %rcx
LBB0_22:
	movq	_LM3532_BL_MODE_ALS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jle	LBB0_23
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_24:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	%r14, (%r15)
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ti,als-vmin"

L_.str.1:                               ## @.str.1
	.asciz	"ti,als-vmax"

	.comm	_LM3532_ALS_WINDOW_mV,8,3       ## @LM3532_ALS_WINDOW_mV
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"ti,als1-imp-sel"

L_.str.3:                               ## @.str.3
	.asciz	"ti,als2-imp-sel"

L_.str.4:                               ## @.str.4
	.asciz	"ti,als-avrg-time-us"

L_.str.5:                               ## @.str.5
	.asciz	"ti,als-input-mode"

	.comm	_LM3532_BL_MODE_ALS,8,3         ## @LM3532_BL_MODE_ALS
	.no_dead_strip	_lm3532_parse_als
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3532_parse_als
_lm3532_parse_als:                      ; @lm3532_parse_als
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_device_property_read_u32
	cbz	w0, LBB0_3
; %bb.2:
	str	wzr, [x20]
LBB0_3:
	ldr	x0, [x19, #8]
	add	x21, x20, #4
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_device_property_read_u32
	cbz	w0, LBB0_6
; %bb.4:
Lloh7:
	adrp	x8, _LM3532_ALS_WINDOW_mV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LM3532_ALS_WINDOW_mV@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	w8, [x21]
	mov	x9, x8
	cmp	x8, w9, sxtw
	b.ge	LBB0_7
	b	LBB0_20
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_21
LBB0_6:
	ldr	w9, [x21]
Lloh12:
	adrp	x8, _LM3532_ALS_WINDOW_mV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LM3532_ALS_WINDOW_mV@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x8, w9, sxtw
	b.lt	LBB0_20
LBB0_7:
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #8
	bl	_device_property_read_u32
	cbz	w0, LBB0_9
; %bb.8:
	mov	x0, #0
	b	LBB0_10
LBB0_9:
	ldr	w0, [sp, #8]
	bl	_lm3532_get_als_imp_index
LBB0_10:
	str	x0, [x20, #32]
	ldr	x0, [x19, #8]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #8
	bl	_device_property_read_u32
	cbz	w0, LBB0_12
; %bb.11:
	mov	x0, #0
	b	LBB0_13
LBB0_12:
	ldr	w0, [sp, #8]
	bl	_lm3532_get_als_imp_index
LBB0_13:
	str	x0, [x20, #24]
	ldr	x0, [x19, #8]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x2, sp, #12
	bl	_device_property_read_u32
	cbz	w0, LBB0_15
; %bb.14:
	mov	x0, #0
	b	LBB0_16
LBB0_15:
	ldr	w0, [sp, #12]
	bl	_lm3532_get_als_avg_index
LBB0_16:
	str	x0, [x20, #16]
	ldr	x0, [x19, #8]
	add	x21, x20, #8
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x21
	bl	_device_property_read_u8
	cbz	w0, LBB0_18
; %bb.17:
	mov	x8, #0
	str	xzr, [x21]
	b	LBB0_19
LBB0_18:
	ldr	x8, [x21]
LBB0_19:
Lloh23:
	adrp	x9, _LM3532_BL_MODE_ALS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _LM3532_BL_MODE_ALS@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_23
LBB0_20:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
	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
LBB0_23:
	str	x20, [x19]
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ti,als-vmin"

l_.str.1:                               ; @.str.1
	.asciz	"ti,als-vmax"

	.comm	_LM3532_ALS_WINDOW_mV,8,3       ; @LM3532_ALS_WINDOW_mV
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"ti,als1-imp-sel"

l_.str.3:                               ; @.str.3
	.asciz	"ti,als2-imp-sel"

l_.str.4:                               ; @.str.4
	.asciz	"ti,als-avrg-time-us"

l_.str.5:                               ; @.str.5
	.asciz	"ti,als-input-mode"

	.comm	_LM3532_BL_MODE_ALS,8,3         ; @LM3532_BL_MODE_ALS
	.no_dead_strip	_lm3532_parse_als
.subsections_via_symbols
