	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function pmbus_reg2data_direct
LCPI0_0:
	.space	4
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_1:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_2:
	.long	100000000                       ## 0x5f5e100
	.long	100000000                       ## 0x5f5e100
	.long	100000000                       ## 0x5f5e100
	.long	100000000                       ## 0x5f5e100
LCPI0_3:
	.long	10                              ## 0xa
	.long	10                              ## 0xa
	.long	10                              ## 0xa
	.long	10                              ## 0xa
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_pmbus_reg2data_direct:                 ## @pmbus_reg2data_direct
	.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), %rax
	movq	(%rax), %rdx
	movq	(%rsi), %rcx
	movl	(%rdx,%rcx,4), %r14d
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.1:
	movq	8(%rax), %rdx
	movq	16(%rax), %rdi
	movl	(%rdx,%rcx,4), %eax
	movq	_PSC_FAN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	sete	%dl
	movq	_PSC_PWM@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rcx
	sete	%bl
	orb	%dl, %bl
	imull	$1000, %eax, %edx               ## imm = 0x3E8
	testb	%bl, %bl
	cmovnel	%eax, %edx
	movl	8(%rsi), %eax
	xorb	$1, %bl
	movzbl	%bl, %esi
	leal	(%rsi,%rsi,2), %esi
	subl	(%rdi,%rcx,4), %esi
	movq	_PSC_POWER@GOTPCREL(%rip), %rdi
	imull	$1000, %edx, %r15d              ## imm = 0x3E8
	cmpq	(%rdi), %rcx
	cmovnel	%edx, %r15d
	leal	3(%rsi), %ebx
	cmovnel	%esi, %ebx
	testl	%ebx, %ebx
	jle	LBB0_14
## %bb.2:
	cmpl	$8, %ebx
	jb	LBB0_12
## %bb.3:
	movl	%ebx, %ecx
	andl	$-8, %ecx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = <u,1,1,1>
	pinsrd	$0, %eax, %xmm0
	leal	-8(%rcx), %esi
	movl	%esi, %edx
	shrl	$3, %edx
	incl	%edx
	movl	%edx, %eax
	andl	$7, %eax
	cmpl	$56, %esi
	jae	LBB0_5
## %bb.4:
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [1,1,1,1]
	jmp	LBB0_7
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	jns	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	addl	$5, %eax
	movl	%eax, %edi
	movl	$10, %esi
	callq	_div_s64
                                        ## kill: def $eax killed $eax def $rax
	incl	%ebx
	jne	LBB0_15
	jmp	LBB0_16
LBB0_5:
	andl	$-8, %edx
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [1,1,1,1]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [100000000,100000000,100000000,100000000]
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	pmulld	%xmm2, %xmm0
	pmulld	%xmm2, %xmm1
	addl	$-8, %edx
	jne	LBB0_6
LBB0_7:
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [10,10,10,10]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	pmulld	%xmm2, %xmm0
	pmulld	%xmm2, %xmm1
	decl	%eax
	jne	LBB0_9
LBB0_10:
	pmulld	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	pmulld	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	pmulld	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, %ebx
	je	LBB0_16
## %bb.11:
	andl	$7, %ebx
LBB0_12:
	incl	%ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_13
LBB0_16:
	subl	%r15d, %eax
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_div_s64
	movq	_LONG_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_LONG_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clamp_val                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PSC_FAN,8,3                    ## @PSC_FAN
	.comm	_PSC_PWM,8,3                    ## @PSC_PWM
	.comm	_PSC_POWER,8,3                  ## @PSC_POWER
	.comm	_LONG_MIN,4,2                   ## @LONG_MIN
	.comm	_LONG_MAX,4,2                   ## @LONG_MAX
	.no_dead_strip	_pmbus_reg2data_direct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmbus_reg2data_direct
_pmbus_reg2data_direct:                 ; @pmbus_reg2data_direct
	.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
	ldr	x9, [x0]
	ldr	x10, [x9]
	ldr	x8, [x1]
	ldr	w19, [x10, x8, lsl #2]
	cbz	w19, LBB0_8
; %bb.1:
	lsl	x10, x8, #2
	ldp	x11, x9, [x9, #8]
	ldr	w11, [x11, x10]
	ldr	w9, [x9, x10]
	ldr	w0, [x1, #8]
Lloh0:
	adrp	x10, _PSC_FAN@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PSC_FAN@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x12, _PSC_PWM@GOTPAGE
Lloh4:
	ldr	x12, [x12, _PSC_PWM@GOTPAGEOFF]
	cmp	x8, x10
Lloh5:
	ldr	x10, [x12]
	ccmp	x8, x10, #4, ne
	mov	w10, #1000
	mul	w12, w11, w10
	csel	w11, w11, w12, eq
	mov	w12, #3
	csel	w12, wzr, w12, eq
	sub	w9, w12, w9
Lloh6:
	adrp	x12, _PSC_POWER@GOTPAGE
Lloh7:
	ldr	x12, [x12, _PSC_POWER@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	add	w13, w9, #3
	mul	w10, w11, w10
	cmp	x8, x12
	csel	w20, w10, w11, eq
	csel	w21, w13, w9, eq
	cmp	w21, #1
	b.lt	LBB0_9
; %bb.2:
	cmp	w21, #16
	b.lo	LBB0_6
; %bb.3:
	and	w8, w21, #0xfffffff0
	and	w9, w21, #0xf
	movi.4s	v0, #1
	movi.4s	v1, #1
	mov.s	v1[0], w0
	movi.4s	v2, #10
	mov	x10, x8
	movi.4s	v3, #1
	movi.4s	v4, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mul.4s	v1, v1, v2
	mul.4s	v0, v0, v2
	mul.4s	v3, v3, v2
	mul.4s	v4, v4, v2
	subs	w10, w10, #16
	b.ne	LBB0_4
; %bb.5:
	mul.4s	v0, v0, v1
	mul.4s	v0, v3, v0
	mul.4s	v0, v4, v0
	ext.16b	v1, v0, v0, #8
	mul.2s	v0, v0, v1
	fmov	w10, s0
	mov.s	w11, v0[1]
	mul	w0, w10, w11
	cmp	w21, w8
	mov	x21, x9
	b.eq	LBB0_11
LBB0_6:
	add	w8, w21, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w9, w0, w0, lsl #2
	lsl	w0, w9, #1
	sub	w8, w8, #1
	cmp	w8, #1
	b.hi	LBB0_7
	b	LBB0_11
LBB0_8:
	mov	x0, #0
	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_9:
	tbz	w21, #31, LBB0_11
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	w0, w0, #5
	mov	w1, #10
	bl	_div_s64
	adds	w21, w21, #1
	b.lo	LBB0_10
LBB0_11:
	sub	w0, w0, w20
	mov	x1, x19
	bl	_div_s64
Lloh9:
	adrp	x8, _LONG_MIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LONG_MIN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _LONG_MAX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LONG_MAX@GOTPAGEOFF]
Lloh14:
	ldr	w2, [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	_clamp_val
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PSC_FAN,8,3                    ; @PSC_FAN
	.comm	_PSC_PWM,8,3                    ; @PSC_PWM
	.comm	_PSC_POWER,8,3                  ; @PSC_POWER
	.comm	_LONG_MIN,4,2                   ; @LONG_MIN
	.comm	_LONG_MAX,4,2                   ; @LONG_MAX
	.no_dead_strip	_pmbus_reg2data_direct
.subsections_via_symbols
