	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function lm3532_init_registers
LCPI0_0:
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_lm3532_init_registers:                 ## @lm3532_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	32(%rdi), %r15
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movl	$1, %esi
	callq	_gpiod_direction_output
LBB0_2:
	movq	_LM3532_REG_ZONE_CFG_A@GOTPCREL(%rip), %rax
	movl	(%r14), %ebx
	addl	%ebx, %ebx
	addl	(%rax), %ebx
	movl	8(%r15), %edi
	leaq	4(%r14), %rdx
	movl	%ebx, %esi
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_19
## %bb.3:
	movq	_LM3532_ZONE_MASK@GOTPCREL(%rip), %rax
	movl	4(%r14), %edx
	andl	(%rax), %edx
	movl	%edx, 4(%r14)
	orl	8(%r14), %edx
	movl	8(%r15), %edi
	movl	%ebx, %esi
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_4
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	12(%r14), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_LM3532_REG_CTRL_A_FS_CURR@GOTPCREL(%rip), %rcx
	movl	(%r14), %esi
	addl	%esi, %esi
	addl	(%rcx), %esi
	movq	_LM3532_FS_CURR_MIN@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movq	_LM3532_FS_CURR_STEP@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	8(%r15), %edi
	movl	%eax, %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_19
LBB0_6:
	movl	16(%r14), %r10d
	testl	%r10d, %r10d
	jle	LBB0_7
## %bb.8:
	movq	24(%r14), %r11
	movl	(%r14), %r8d
	movq	_LM3532_OUTPUT_CFG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	cmpl	$8, %r10d
	jae	LBB0_10
## %bb.9:
	xorl	%esi, %esi
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	LBB0_17
LBB0_7:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_10:
	movl	%r10d, %esi
	andl	$-8, %esi
	movd	%r8d, %xmm0
	pshufd	$0, %xmm0, %xmm10               ## xmm10 = xmm0[0,0,0,0]
	movd	%r9d, %xmm0
	pshufd	$0, %xmm0, %xmm9                ## xmm9 = xmm0[0,0,0,0]
	leaq	-8(%rsi), %rcx
	movq	%rcx, %rax
	shrq	$3, %rax
	incq	%rax
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.12:
	movq	%rax, %rdx
	andq	$-2, %rdx
	pxor	%xmm11, %xmm11
	xorl	%ecx, %ecx
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [1065353216,1065353216,1065353216,1065353216]
	pxor	%xmm5, %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r11,%rcx,4), %xmm0
	movdqu	16(%r11,%rcx,4), %xmm6
	movdqu	32(%r11,%rcx,4), %xmm1
	movdqu	48(%r11,%rcx,4), %xmm7
	paddd	%xmm0, %xmm0
	paddd	%xmm6, %xmm6
	pslld	$23, %xmm0
	paddd	%xmm8, %xmm0
	cvttps2dq	%xmm0, %xmm12
	movdqa	%xmm10, %xmm2
	pmulld	%xmm12, %xmm2
	por	%xmm11, %xmm2
	pslld	$23, %xmm6
	paddd	%xmm8, %xmm6
	cvttps2dq	%xmm6, %xmm0
	movdqa	%xmm10, %xmm6
	pmulld	%xmm0, %xmm6
	por	%xmm5, %xmm6
	pmulld	%xmm9, %xmm12
	por	%xmm3, %xmm12
	pmulld	%xmm9, %xmm0
	por	%xmm4, %xmm0
	paddd	%xmm1, %xmm1
	paddd	%xmm7, %xmm7
	pslld	$23, %xmm1
	paddd	%xmm8, %xmm1
	cvttps2dq	%xmm1, %xmm3
	movdqa	%xmm10, %xmm11
	pmulld	%xmm3, %xmm11
	por	%xmm2, %xmm11
	pslld	$23, %xmm7
	paddd	%xmm8, %xmm7
	cvttps2dq	%xmm7, %xmm4
	movdqa	%xmm10, %xmm5
	pmulld	%xmm4, %xmm5
	por	%xmm6, %xmm5
	pmulld	%xmm9, %xmm3
	por	%xmm12, %xmm3
	pmulld	%xmm9, %xmm4
	por	%xmm0, %xmm4
	addq	$16, %rcx
	addq	$-2, %rdx
	jne	LBB0_13
	jmp	LBB0_14
LBB0_11:
	pxor	%xmm11, %xmm11
	xorl	%ecx, %ecx
	pxor	%xmm5, %xmm5
	pxor	%xmm3, %xmm3
	pxor	%xmm4, %xmm4
LBB0_14:
	testb	$1, %al
	je	LBB0_16
## %bb.15:
	movdqu	(%r11,%rcx,4), %xmm0
	movdqu	16(%r11,%rcx,4), %xmm1
	paddd	%xmm0, %xmm0
	paddd	%xmm1, %xmm1
	pslld	$23, %xmm0
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [1065353216,1065353216,1065353216,1065353216]
	paddd	%xmm2, %xmm0
	cvttps2dq	%xmm0, %xmm0
	movdqa	%xmm10, %xmm6
	pmulld	%xmm0, %xmm6
	por	%xmm6, %xmm11
	pslld	$23, %xmm1
	paddd	%xmm2, %xmm1
	cvttps2dq	%xmm1, %xmm1
	pmulld	%xmm1, %xmm10
	por	%xmm10, %xmm5
	pmulld	%xmm9, %xmm0
	por	%xmm0, %xmm3
	pmulld	%xmm1, %xmm9
	por	%xmm9, %xmm4
LBB0_16:
	por	%xmm5, %xmm11
	por	%xmm4, %xmm3
	pshufd	$238, %xmm3, %xmm0              ## xmm0 = xmm3[2,3,2,3]
	por	%xmm3, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	pshufd	$238, %xmm11, %xmm0             ## xmm0 = xmm11[2,3,2,3]
	por	%xmm11, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	por	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpq	%r10, %rsi
	je	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%r11,%rsi,4), %ecx
	addb	%cl, %cl
	movl	%r8d, %ebx
	shll	%cl, %ebx
	movl	%r9d, %edi
	shll	%cl, %edi
	orl	%ebx, %eax
	orl	%edi, %edx
	incq	%rsi
	cmpq	%rsi, %r10
	jne	LBB0_17
LBB0_18:
	movl	8(%r15), %edi
	movq	_LM3532_REG_OUTPUT_CFG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_19
## %bb.20:
	movq	_LM3532_RAMP_DOWN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	4(%r15), %edx
	movl	8(%r15), %edi
	shll	%cl, %edx
	orl	(%r15), %edx
	movq	_LM3532_REG_RT_RAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LM3532_REG_ZONE_CFG_A,4,2      ## @LM3532_REG_ZONE_CFG_A
	.comm	_LM3532_ZONE_MASK,4,2           ## @LM3532_ZONE_MASK
	.comm	_LM3532_REG_CTRL_A_FS_CURR,4,2  ## @LM3532_REG_CTRL_A_FS_CURR
	.comm	_LM3532_FS_CURR_MIN,4,2         ## @LM3532_FS_CURR_MIN
	.comm	_LM3532_FS_CURR_STEP,4,2        ## @LM3532_FS_CURR_STEP
	.comm	_LM3532_OUTPUT_CFG_MASK,4,2     ## @LM3532_OUTPUT_CFG_MASK
	.comm	_LM3532_REG_OUTPUT_CFG,4,2      ## @LM3532_REG_OUTPUT_CFG
	.comm	_LM3532_RAMP_DOWN_SHIFT,4,2     ## @LM3532_RAMP_DOWN_SHIFT
	.comm	_LM3532_REG_RT_RAMP,4,2         ## @LM3532_REG_RT_RAMP
	.no_dead_strip	_lm3532_init_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3532_init_registers
_lm3532_init_registers:                 ; @lm3532_init_registers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x21, [x0, #32]
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_2
; %bb.1:
	mov	w1, #1
	bl	_gpiod_direction_output
LBB0_2:
Lloh0:
	adrp	x8, _LM3532_REG_ZONE_CFG_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LM3532_REG_ZONE_CFG_A@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x2, x19
	ldr	w9, [x2], #4
	add	w20, w8, w9, lsl #1
	ldr	w0, [x21, #8]
	mov	x1, x20
	bl	_regmap_read
	cbnz	w0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _LM3532_ZONE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LM3532_ZONE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #4]
	and	w8, w9, w8
	str	w8, [x19, #4]
	orr	w2, w10, w8
	ldr	w0, [x21, #8]
	mov	x1, x20
	bl	_regmap_write
	cbz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_7
; %bb.6:
Lloh6:
	adrp	x9, _LM3532_REG_CTRL_A_FS_CURR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LM3532_REG_CTRL_A_FS_CURR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	w10, [x19]
	add	w1, w9, w10, lsl #1
Lloh9:
	adrp	x9, _LM3532_FS_CURR_MIN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LM3532_FS_CURR_MIN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	sub	w8, w8, w9
Lloh12:
	adrp	x9, _LM3532_FS_CURR_STEP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _LM3532_FS_CURR_STEP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	sdiv	w2, w8, w9
	ldr	w0, [x21, #8]
	bl	_regmap_write
	cbnz	w0, LBB0_4
LBB0_7:
	ldr	w10, [x19, #16]
	cmp	w10, #1
	b.lt	LBB0_10
; %bb.8:
	ldr	x11, [x19, #24]
	ldr	w8, [x19]
Lloh15:
	adrp	x9, _LM3532_OUTPUT_CFG_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _LM3532_OUTPUT_CFG_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w10, #16
	b.hs	LBB0_11
; %bb.9:
	mov	x12, #0
	mov	w3, #0
	mov	w2, #0
	b	LBB0_14
LBB0_10:
	mov	w2, #0
	mov	w3, #0
	b	LBB0_16
LBB0_11:
	dup.4s	v4, w8
	dup.4s	v5, w9
	movi.2d	v0, #0000000000000000
	and	x12, x10, #0xfffffff0
	movi.2d	v1, #0000000000000000
	add	x13, x11, #32
	mov	x14, x12
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldp	q18, q19, [x13, #-32]
	shl.4s	v18, v18, #1
	shl.4s	v19, v19, #1
	ldp	q20, q21, [x13], #64
	shl.4s	v20, v20, #1
	shl.4s	v21, v21, #1
	ushl.4s	v22, v4, v18
	ushl.4s	v23, v4, v19
	ushl.4s	v24, v4, v20
	ushl.4s	v25, v4, v21
	orr.16b	v0, v22, v0
	orr.16b	v1, v23, v1
	orr.16b	v2, v24, v2
	orr.16b	v3, v25, v3
	ushl.4s	v18, v5, v18
	ushl.4s	v19, v5, v19
	ushl.4s	v20, v5, v20
	ushl.4s	v21, v5, v21
	orr.16b	v6, v18, v6
	orr.16b	v7, v19, v7
	orr.16b	v16, v20, v16
	orr.16b	v17, v21, v17
	subs	x14, x14, #16
	b.ne	LBB0_12
; %bb.13:
	orr.16b	v4, v7, v6
	orr.16b	v4, v16, v4
	orr.16b	v4, v17, v4
	ext.16b	v5, v4, v4, #8
	orr.8b	v4, v4, v5
	mov.s	w13, v4[1]
	fmov	w14, s4
	orr	w2, w14, w13
	orr.16b	v0, v1, v0
	orr.16b	v0, v2, v0
	orr.16b	v0, v3, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	mov.s	w13, v0[1]
	fmov	w14, s0
	orr	w3, w14, w13
	cmp	x12, x10
	b.eq	LBB0_16
LBB0_14:
	add	x11, x11, x12, lsl #2
	sub	x10, x10, x12
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	lsl	w12, w12, #1
	lsl	w13, w8, w12
	orr	w3, w13, w3
	lsl	w12, w9, w12
	orr	w2, w12, w2
	subs	x10, x10, #1
	b.ne	LBB0_15
LBB0_16:
	ldr	w0, [x21, #8]
Lloh18:
	adrp	x8, _LM3532_REG_OUTPUT_CFG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LM3532_REG_OUTPUT_CFG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_regmap_update_bits
	cbnz	w0, LBB0_4
; %bb.17:
	ldp	w8, w9, [x21]
Lloh21:
	adrp	x10, _LM3532_RAMP_DOWN_SHIFT@GOTPAGE
Lloh22:
	ldr	x10, [x10, _LM3532_RAMP_DOWN_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w2, w9, w8
	ldr	w0, [x21, #8]
Lloh24:
	adrp	x8, _LM3532_REG_RT_RAMP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LM3532_REG_RT_RAMP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_regmap_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_LM3532_REG_ZONE_CFG_A,4,2      ; @LM3532_REG_ZONE_CFG_A
	.comm	_LM3532_ZONE_MASK,4,2           ; @LM3532_ZONE_MASK
	.comm	_LM3532_REG_CTRL_A_FS_CURR,4,2  ; @LM3532_REG_CTRL_A_FS_CURR
	.comm	_LM3532_FS_CURR_MIN,4,2         ; @LM3532_FS_CURR_MIN
	.comm	_LM3532_FS_CURR_STEP,4,2        ; @LM3532_FS_CURR_STEP
	.comm	_LM3532_OUTPUT_CFG_MASK,4,2     ; @LM3532_OUTPUT_CFG_MASK
	.comm	_LM3532_REG_OUTPUT_CFG,4,2      ; @LM3532_REG_OUTPUT_CFG
	.comm	_LM3532_RAMP_DOWN_SHIFT,4,2     ; @LM3532_RAMP_DOWN_SHIFT
	.comm	_LM3532_REG_RT_RAMP,4,2         ; @LM3532_REG_RT_RAMP
	.no_dead_strip	_lm3532_init_registers
.subsections_via_symbols
