	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function is31fl32xx_init_regs
_is31fl32xx_init_regs:                  ## @is31fl32xx_init_regs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	callq	_is31fl32xx_reset_regs
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	(%r15), %rax
	movq	_IS31FL32XX_REG_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movl	8(%r15), %edi
	decl	%edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %r14d
	movl	12(%r15), %eax
	cltd
	idivl	8(%r15)
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	movl	%eax, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	addq	%r12, %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_is31fl32xx_write
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	cmpq	%r12, %r13
	jne	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_is31fl32xx_software_shutdown
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	16(%r15), %rsi
	movq	_IS31FL32XX_REG_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_is31fl32xx_write
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IS31FL32XX_REG_NONE,8,3        ## @IS31FL32XX_REG_NONE
	.no_dead_strip	_is31fl32xx_init_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function is31fl32xx_init_regs
_is31fl32xx_init_regs:                  ; @is31fl32xx_init_regs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x21, [x0]
	bl	_is31fl32xx_reset_regs
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x22, _IS31FL32XX_REG_NONE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IS31FL32XX_REG_NONE@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.2:
	ldr	w8, [x21, #8]
	sub	w0, w8, #1
	mov	w1, #0
	bl	_GENMASK
	ldp	w9, w8, [x21, #8]
	sdiv	w23, w8, w9
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x20, x0
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x1, x24, x8
	mov	x0, x19
	mov	x2, x20
	bl	_is31fl32xx_write
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x23, x24
	b.ne	LBB0_4
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_is31fl32xx_software_shutdown
	cbnz	w0, LBB0_10
; %bb.7:
	ldr	x1, [x21, #16]
	ldr	x8, [x22]
	cmp	x1, x8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	mov	w2, #0
	bl	_is31fl32xx_write
	cbnz	w0, LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IS31FL32XX_REG_NONE,8,3        ; @IS31FL32XX_REG_NONE
	.no_dead_strip	_is31fl32xx_init_regs
.subsections_via_symbols
