	.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_data2reg_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_data2reg_direct:                 ## @pmbus_data2reg_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rax
	movq	(%rdi), %rdi
	movq	(%rsi), %rcx
	movq	(%rdi), %r8
	movq	8(%rdi), %rsi
	movl	(%rsi,%rcx,4), %ebx
	movq	16(%rdi), %rdi
	movl	(%rdi,%rcx,4), %edi
	movq	_PSC_POWER@GOTPCREL(%rip), %r9
	leal	-3(%rdi), %r10d
	imull	$1000, %ebx, %esi               ## imm = 0x3E8
	cmpq	(%r9), %rcx
	cmovnel	%ebx, %esi
	cmovnel	%edi, %r10d
	movq	_PSC_FAN@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rcx
	sete	%bl
	movq	_PSC_PWM@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rcx
	sete	%dl
	orb	%bl, %dl
	leal	-3(%r10), %ebx
	imull	$1000, %esi, %edi               ## imm = 0x3E8
	testb	%dl, %dl
	cmovnel	%esi, %edi
	cmovnel	%r10d, %ebx
	imull	(%r8,%rcx,4), %eax
	addl	%edi, %eax
	testl	%ebx, %ebx
	jle	LBB0_13
## %bb.1:
	cmpl	$8, %ebx
	jb	LBB0_11
## %bb.2:
	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_4
## %bb.3:
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [1,1,1,1]
	jmp	LBB0_6
LBB0_13:
	jns	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	addl	$5, %eax
	movl	$10, %esi
	movl	%eax, %edi
	callq	_div_s64
                                        ## kill: def $eax killed $eax def $rax
	incl	%ebx
	jne	LBB0_14
	jmp	LBB0_15
LBB0_4:
	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_5:                                 ## =>This Inner Loop Header: Depth=1
	pmulld	%xmm2, %xmm0
	pmulld	%xmm2, %xmm1
	addl	$-8, %edx
	jne	LBB0_5
LBB0_6:
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [10,10,10,10]
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	pmulld	%xmm2, %xmm0
	pmulld	%xmm2, %xmm1
	decl	%eax
	jne	LBB0_8
LBB0_9:
	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_15
## %bb.10:
	andl	$7, %ebx
LBB0_11:
	incl	%ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_12
LBB0_15:
	movq	_S16_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_S16_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_clamp_val                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PSC_POWER,8,3                  ## @PSC_POWER
	.comm	_PSC_FAN,8,3                    ## @PSC_FAN
	.comm	_PSC_PWM,8,3                    ## @PSC_PWM
	.comm	_S16_MIN,4,2                    ## @S16_MIN
	.comm	_S16_MAX,4,2                    ## @S16_MAX
	.no_dead_strip	_pmbus_data2reg_direct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmbus_data2reg_direct
_pmbus_data2reg_direct:                 ; @pmbus_data2reg_direct
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldr	x9, [x1]
	lsl	x10, x9, #2
	ldp	x11, x12, [x8]
	ldr	w11, [x11, x10]
	ldr	w12, [x12, x10]
	ldr	x8, [x8, #16]
	ldr	w8, [x8, x10]
Lloh0:
	adrp	x10, _PSC_POWER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PSC_POWER@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	sub	w13, w8, #3
	mov	w14, #1000
	mul	w15, w12, w14
	cmp	x9, x10
	csel	w10, w15, w12, eq
	csel	w8, w13, w8, eq
Lloh3:
	adrp	x12, _PSC_FAN@GOTPAGE
Lloh4:
	ldr	x12, [x12, _PSC_FAN@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x12]
	cmp	x9, x12
Lloh6:
	adrp	x12, _PSC_PWM@GOTPAGE
Lloh7:
	ldr	x12, [x12, _PSC_PWM@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	ccmp	x9, x12, #4, ne
	sub	w9, w8, #3
	mul	w12, w10, w14
	csel	w10, w10, w12, eq
	csel	w8, w8, w9, eq
	mov	x19, x8
	madd	w0, w11, w2, w10
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	cmp	w8, #16
	b.lo	LBB0_5
; %bb.2:
	and	w9, w8, #0xfffffff0
	and	w19, w8, #0xf
	movi.4s	v0, #1
	movi.4s	v1, #1
	mov.s	v1[0], w0
	movi.4s	v2, #10
	mov	x10, x9
	movi.4s	v3, #1
	movi.4s	v4, #1
LBB0_3:                                 ; =>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_3
; %bb.4:
	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	w8, w9
	b.eq	LBB0_9
LBB0_5:
	add	w8, w19, #1
LBB0_6:                                 ; =>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_6
	b	LBB0_9
LBB0_7:
	tbz	w19, #31, LBB0_9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w0, w0, #5
	mov	w1, #10
	bl	_div_s64
	adds	w19, w19, #1
	b.lo	LBB0_8
LBB0_9:
Lloh9:
	adrp	x8, _S16_MIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S16_MIN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _S16_MAX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S16_MAX@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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_POWER,8,3                  ; @PSC_POWER
	.comm	_PSC_FAN,8,3                    ; @PSC_FAN
	.comm	_PSC_PWM,8,3                    ; @PSC_PWM
	.comm	_S16_MIN,4,2                    ; @S16_MIN
	.comm	_S16_MAX,4,2                    ; @S16_MAX
	.no_dead_strip	_pmbus_data2reg_direct
.subsections_via_symbols
