	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3530_init_registers
_lm3530_init_registers:                 ## @lm3530_init_registers
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_LM3530_REG_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	16(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %rbx
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_LM3530_RAMP_LAW_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	(%rbx), %eax
	shll	%cl, %eax
	movl	4(%rbx), %r12d
	andl	$7, %r12d
	movq	_LM3530_MAX_CURR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	orl	%eax, %r12d
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_6
## %bb.3:
	movq	_LM3530_ENABLE_I2C@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	jmp	LBB0_6
LBB0_5:
	movl	8(%rbx), %eax
	movq	_LM3530_PWM_POL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_LM3530_ENABLE_PWM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
	movq	_LM3530_ENABLE_PWM_SIMPLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
	orl	%eax, %r12d
	jmp	LBB0_6
LBB0_4:
	movq	_LM3530_ENABLE_I2C@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_lm3530_als_configure
LBB0_6:
	movq	_LM3530_BRT_RAMP_FALL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	12(%rbx), %edx
	movl	16(%rbx), %eax
	shll	%cl, %edx
	movq	_LM3530_BRT_RAMP_RISE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%edx, %eax
	movl	4(%r13), %ecx
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.7:
	movl	20(%rbx), %ecx
	movl	%ecx, 4(%r13)
LBB0_8:
	movl	8(%r13), %edx
	cmpl	%edx, %ecx
	cmovll	%ecx, %edx
	movl	%r12d, (%r14)
	movl	-64(%rbp), %ecx
	movl	%ecx, 4(%r14)
	movl	%eax, 8(%r14)
	movl	-60(%rbp), %eax
	movl	%eax, 12(%r14)
	movl	%edx, 16(%r14)
	movq	-56(%rbp), %rax
	movups	(%rax), %xmm0
	movups	%xmm0, 20(%r14)
	movq	_LM3530_DEF_ZT_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_LM3530_DEF_ZT_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_LM3530_DEF_ZT_2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_LM3530_DEF_ZT_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_LM3530_DEF_ZT_4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movq	%r13, %rdi
	callq	_lm3530_led_enable
	testl	%eax, %eax
	jne	LBB0_18
## %bb.9:
	movq	_LM3530_REG_MAX@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.10:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_lm3530_reg@GOTPCREL(%rip), %r12
	movq	_LM3530_BRT_CTRL_REG@GOTPCREL(%rip), %r15
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14,%rbx,4), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	jne	LBB0_18
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	movq	_LM3530_REG_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	cmpq	(%r15), %rsi
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$128, (%r13)
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14,%rbx,4), %edi
	movl	8(%r13), %esi
	callq	*%rax
	jmp	LBB0_16
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LM3530_REG_MAX,4,2             ## @LM3530_REG_MAX
	.comm	_LM3530_RAMP_LAW_SHIFT,4,2      ## @LM3530_RAMP_LAW_SHIFT
	.comm	_LM3530_MAX_CURR_SHIFT,4,2      ## @LM3530_MAX_CURR_SHIFT
	.comm	_LM3530_ENABLE_I2C,4,2          ## @LM3530_ENABLE_I2C
	.comm	_LM3530_ENABLE_PWM,4,2          ## @LM3530_ENABLE_PWM
	.comm	_LM3530_ENABLE_PWM_SIMPLE,4,2   ## @LM3530_ENABLE_PWM_SIMPLE
	.comm	_LM3530_PWM_POL_SHIFT,4,2       ## @LM3530_PWM_POL_SHIFT
	.comm	_LM3530_BRT_RAMP_FALL_SHIFT,4,2 ## @LM3530_BRT_RAMP_FALL_SHIFT
	.comm	_LM3530_BRT_RAMP_RISE_SHIFT,4,2 ## @LM3530_BRT_RAMP_RISE_SHIFT
	.comm	_LM3530_DEF_ZT_0,4,2            ## @LM3530_DEF_ZT_0
	.comm	_LM3530_DEF_ZT_1,4,2            ## @LM3530_DEF_ZT_1
	.comm	_LM3530_DEF_ZT_2,4,2            ## @LM3530_DEF_ZT_2
	.comm	_LM3530_DEF_ZT_3,4,2            ## @LM3530_DEF_ZT_3
	.comm	_LM3530_DEF_ZT_4,4,2            ## @LM3530_DEF_ZT_4
	.comm	_lm3530_reg,8,3                 ## @lm3530_reg
	.comm	_LM3530_BRT_CTRL_REG,8,3        ## @LM3530_BRT_CTRL_REG
	.no_dead_strip	_lm3530_init_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3530_init_registers
_lm3530_init_registers:                 ; @lm3530_init_registers
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x22, _LM3530_REG_MAX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _LM3530_REG_MAX@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	ldp	x21, x20, [x0, #16]
	sub	x0, x29, #88
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh7:
	adrp	x8, _LM3530_RAMP_LAW_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LM3530_RAMP_LAW_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldp	w9, w10, [x20]
	lsl	w8, w9, w8
Lloh10:
	adrp	x9, _LM3530_MAX_CURR_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LM3530_MAX_CURR_SHIFT@GOTPAGEOFF]
	and	w10, w10, #0x7
Lloh12:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w24, w9, w8
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.3:
Lloh13:
	adrp	x8, _LM3530_ENABLE_I2C@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LM3530_ENABLE_I2C@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w24, w8, w24
	b	LBB0_6
LBB0_4:
Lloh16:
	adrp	x8, _LM3530_ENABLE_PWM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LM3530_ENABLE_PWM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _LM3530_ENABLE_PWM_SIMPLE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LM3530_ENABLE_PWM_SIMPLE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _LM3530_PWM_POL_SHIFT@GOTPAGE
Lloh23:
	ldr	x10, [x10, _LM3530_PWM_POL_SHIFT@GOTPAGEOFF]
	ldr	w11, [x20, #8]
Lloh24:
	ldr	w10, [x10]
	lsl	w10, w11, w10
	orr	w8, w8, w24
	orr	w8, w8, w9
	orr	w24, w8, w10
	b	LBB0_6
LBB0_5:
Lloh25:
	adrp	x8, _LM3530_ENABLE_I2C@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LM3530_ENABLE_I2C@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w24, w8, w24
	sub	x1, x29, #88
	mov	x0, x20
	bl	_lm3530_als_configure
LBB0_6:
Lloh28:
	adrp	x8, _LM3530_BRT_RAMP_FALL_SHIFT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _LM3530_BRT_RAMP_FALL_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldp	w9, w10, [x20, #12]
	lsl	w8, w9, w8
Lloh31:
	adrp	x9, _LM3530_BRT_RAMP_RISE_SHIFT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _LM3530_BRT_RAMP_RISE_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w8, w9, w8
	ldr	w9, [x19, #4]
	cbnz	w9, LBB0_8
; %bb.7:
	ldr	w9, [x20, #20]
	str	w9, [x19, #4]
LBB0_8:
	ldr	w10, [x19, #8]
	cmp	w9, w10
	csel	w9, w9, w10, lt
	ldp	w10, w11, [x29, #-88]
	stp	w24, w10, [x23]
	stp	w8, w11, [x23, #8]
	str	w9, [x23, #16]
	ldur	x8, [x29, #-80]
	ldr	q0, [x8]
	stur	q0, [x23, #20]
Lloh34:
	adrp	x8, _LM3530_DEF_ZT_0@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LM3530_DEF_ZT_0@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _LM3530_DEF_ZT_1@GOTPAGE
Lloh38:
	ldr	x9, [x9, _LM3530_DEF_ZT_1@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	stp	w8, w9, [x23, #36]
Lloh40:
	adrp	x8, _LM3530_DEF_ZT_2@GOTPAGE
Lloh41:
	ldr	x8, [x8, _LM3530_DEF_ZT_2@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
Lloh43:
	adrp	x9, _LM3530_DEF_ZT_3@GOTPAGE
Lloh44:
	ldr	x9, [x9, _LM3530_DEF_ZT_3@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	stp	w8, w9, [x23, #44]
Lloh46:
	adrp	x8, _LM3530_DEF_ZT_4@GOTPAGE
Lloh47:
	ldr	x8, [x8, _LM3530_DEF_ZT_4@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	str	w8, [x23, #52]
	mov	x0, x19
	bl	_lm3530_led_enable
	cbnz	w0, LBB0_18
; %bb.9:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:
	mov	x24, #0
Lloh49:
	adrp	x25, _lm3530_reg@GOTPAGE
Lloh50:
	ldr	x25, [x25, _lm3530_reg@GOTPAGEOFF]
Lloh51:
	adrp	x26, _LM3530_BRT_CTRL_REG@GOTPAGE
Lloh52:
	ldr	x26, [x26, _LM3530_BRT_CTRL_REG@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w2, [x23, x24, lsl #2]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	cbnz	w0, LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.ge	LBB0_17
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	x1, [x8, x24, lsl #3]
	ldr	x8, [x26]
	cmp	x1, x8
	b.ne	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x19]
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x23, x24, lsl #2]
	ldr	w1, [x19, #8]
	blr	x8
	b	LBB0_12
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldur	x8, [x29, #-72]
Lloh53:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh54:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_LM3530_REG_MAX,4,2             ; @LM3530_REG_MAX
	.comm	_LM3530_RAMP_LAW_SHIFT,4,2      ; @LM3530_RAMP_LAW_SHIFT
	.comm	_LM3530_MAX_CURR_SHIFT,4,2      ; @LM3530_MAX_CURR_SHIFT
	.comm	_LM3530_ENABLE_I2C,4,2          ; @LM3530_ENABLE_I2C
	.comm	_LM3530_ENABLE_PWM,4,2          ; @LM3530_ENABLE_PWM
	.comm	_LM3530_ENABLE_PWM_SIMPLE,4,2   ; @LM3530_ENABLE_PWM_SIMPLE
	.comm	_LM3530_PWM_POL_SHIFT,4,2       ; @LM3530_PWM_POL_SHIFT
	.comm	_LM3530_BRT_RAMP_FALL_SHIFT,4,2 ; @LM3530_BRT_RAMP_FALL_SHIFT
	.comm	_LM3530_BRT_RAMP_RISE_SHIFT,4,2 ; @LM3530_BRT_RAMP_RISE_SHIFT
	.comm	_LM3530_DEF_ZT_0,4,2            ; @LM3530_DEF_ZT_0
	.comm	_LM3530_DEF_ZT_1,4,2            ; @LM3530_DEF_ZT_1
	.comm	_LM3530_DEF_ZT_2,4,2            ; @LM3530_DEF_ZT_2
	.comm	_LM3530_DEF_ZT_3,4,2            ; @LM3530_DEF_ZT_3
	.comm	_LM3530_DEF_ZT_4,4,2            ; @LM3530_DEF_ZT_4
	.comm	_lm3530_reg,8,3                 ; @lm3530_reg
	.comm	_LM3530_BRT_CTRL_REG,8,3        ; @LM3530_BRT_CTRL_REG
	.no_dead_strip	_lm3530_init_registers
.subsections_via_symbols
