	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp8xx_regnode_voltage_to_reg
_axp8xx_regnode_voltage_to_reg:         ## @axp8xx_regnode_voltage_to_reg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %r8
	imull	$1000, (%r8), %eax              ## imm = 0x3E8
	movl	4(%r8), %r9d
	xorl	%r10d, %r10d
	testl	%r9d, %r9d
	jle	LBB0_4
## %bb.1:
	cmpl	%esi, %eax
	jge	LBB0_4
## %bb.2:
	imull	$1000, 8(%r8), %edi             ## imm = 0x3E8
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	%edi, %eax
	incq	%r10
	cmpl	%r10d, %r9d
	jle	LBB0_4
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%esi, %eax
	jl	LBB0_3
LBB0_4:
	movl	12(%r8), %r9d
	testl	%r9d, %r9d
	jle	LBB0_9
## %bb.5:
	cmpl	%esi, %eax
	jge	LBB0_9
## %bb.6:
	imull	$1000, 16(%r8), %r8d            ## imm = 0x3E8
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addl	%r8d, %eax
	incq	%r10
	cmpl	%r9d, %edi
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incl	%edi
	cmpl	%esi, %eax
	jl	LBB0_7
LBB0_9:
	cmpl	%edx, %eax
	jle	LBB0_11
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_11:
	movq	%r10, (%rcx)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_axp8xx_regnode_voltage_to_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp8xx_regnode_voltage_to_reg
_axp8xx_regnode_voltage_to_reg:         ; @axp8xx_regnode_voltage_to_reg
	.cfi_startproc
; %bb.0:
	ldr	x10, [x0]
	mov	w12, #1000
	ldp	w8, w11, [x10]
	mul	w8, w8, w12
	cmp	w11, #1
	mov	x9, #0
	ccmp	w8, w1, #0, ge
	b.ge	LBB0_3
; %bb.1:
	ldr	w13, [x10, #8]
	mul	w12, w13, w12
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x9, x9, #1
	add	w8, w12, w8
	cmp	w11, w9
	ccmp	w8, w1, #0, gt
	b.lt	LBB0_2
LBB0_3:
	ldr	w11, [x10, #12]
	cmp	w11, #1
	ccmp	w8, w1, #0, ge
	b.ge	LBB0_7
; %bb.4:
	mov	x12, #0
	ldr	w10, [x10, #16]
	mov	w13, #1000
	mul	w10, w10, w13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w10, w8
	add	x12, x12, #1
	cmp	w12, w11
	ccmp	w8, w1, #0, lt
	b.lt	LBB0_5
; %bb.6:
	add	x9, x9, x12
LBB0_7:
	cmp	w8, w2
	b.le	LBB0_9
; %bb.8:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ret
LBB0_9:
	mov	w0, #0
	str	x9, [x3]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_axp8xx_regnode_voltage_to_reg
.subsections_via_symbols
