	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function kv_calculate_dpm_settings
LCPI0_0:
	.quad	2                               ## 0x2
	.quad	3                               ## 0x3
LCPI0_1:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_2:
	.quad	4                               ## 0x4
	.quad	4                               ## 0x4
LCPI0_3:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_4:
	.quad	8                               ## 0x8
	.quad	8                               ## 0x8
LCPI0_5:
	.quad	12                              ## 0xc
	.quad	12                              ## 0xc
LCPI0_6:
	.quad	16                              ## 0x10
	.quad	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_kv_calculate_dpm_settings:             ## @kv_calculate_dpm_settings
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_kv_get_pi
	movq	(%rax), %rcx
	movq	8(%rax), %rdx
	cmpq	%rdx, %rcx
	jle	LBB0_1
## %bb.14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_1:
	cmpq	%rdx, %rcx
	ja	LBB0_12
## %bb.2:
	leaq	1(%rcx), %rsi
	leaq	1(%rdx), %r10
	cmpq	%r10, %rsi
	cmovaq	%rsi, %r10
	movq	16(%rax), %r11
	subq	%rcx, %r10
	cmpq	$8, %r10
	jb	LBB0_11
## %bb.3:
	movq	%r10, %r8
	andq	$-8, %r8
	movq	%rcx, %xmm0
	pshufd	$68, %xmm0, %xmm6               ## xmm6 = xmm0[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm7            ## xmm7 = [2,3]
	paddq	%xmm6, %xmm7
	paddq	LCPI0_1(%rip), %xmm6
	movq	%rdx, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	leaq	-8(%r8), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r9, %rdi
	andq	$-2, %rdi
	leaq	(%r11,%rcx,4), %rsi
	addq	$48, %rsi
	xorl	%eax, %eax
	movdqa	LCPI0_2(%rip), %xmm8            ## xmm8 = [4,4]
	movdqa	LCPI0_3(%rip), %xmm4            ## xmm4 = [1,1,1,1]
	movdqa	LCPI0_4(%rip), %xmm9            ## xmm9 = [8,8]
	movdqa	LCPI0_5(%rip), %xmm10           ## xmm10 = [12,12]
	movdqa	LCPI0_6(%rip), %xmm11           ## xmm11 = [16,16]
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm7, %xmm2
	paddq	%xmm8, %xmm2
	movdqa	%xmm6, %xmm0
	paddq	%xmm8, %xmm0
	movdqa	%xmm6, %xmm5
	pcmpeqq	%xmm1, %xmm5
	movdqa	%xmm7, %xmm3
	pcmpeqq	%xmm1, %xmm3
	packssdw	%xmm3, %xmm5
	pand	%xmm4, %xmm5
	pcmpeqq	%xmm1, %xmm0
	pcmpeqq	%xmm1, %xmm2
	packssdw	%xmm2, %xmm0
	pand	%xmm4, %xmm0
	movdqu	%xmm5, -48(%rsi,%rax,4)
	movdqu	%xmm0, -32(%rsi,%rax,4)
	movdqa	%xmm7, %xmm0
	paddq	%xmm9, %xmm0
	movdqa	%xmm6, %xmm2
	paddq	%xmm9, %xmm2
	movdqa	%xmm7, %xmm3
	paddq	%xmm10, %xmm3
	movdqa	%xmm6, %xmm5
	paddq	%xmm10, %xmm5
	pcmpeqq	%xmm1, %xmm2
	pcmpeqq	%xmm1, %xmm0
	packssdw	%xmm0, %xmm2
	pand	%xmm4, %xmm2
	pcmpeqq	%xmm1, %xmm5
	pcmpeqq	%xmm1, %xmm3
	packssdw	%xmm3, %xmm5
	pand	%xmm4, %xmm5
	movdqu	%xmm2, -16(%rsi,%rax,4)
	movdqu	%xmm5, (%rsi,%rax,4)
	addq	$16, %rax
	paddq	%xmm11, %xmm6
	paddq	%xmm11, %xmm7
	addq	$-2, %rdi
	jne	LBB0_6
## %bb.7:
	testb	$1, %r9b
	je	LBB0_9
LBB0_8:
	movdqa	LCPI0_2(%rip), %xmm0            ## xmm0 = [4,4]
	movdqa	%xmm7, %xmm2
	paddq	%xmm0, %xmm2
	paddq	%xmm6, %xmm0
	addq	%rcx, %rax
	pcmpeqq	%xmm1, %xmm6
	pcmpeqq	%xmm1, %xmm7
	packssdw	%xmm7, %xmm6
	movdqa	LCPI0_3(%rip), %xmm3            ## xmm3 = [1,1,1,1]
	pand	%xmm3, %xmm6
	pcmpeqq	%xmm1, %xmm0
	pcmpeqq	%xmm1, %xmm2
	packssdw	%xmm2, %xmm0
	pand	%xmm3, %xmm0
	movdqu	%xmm6, (%r11,%rax,4)
	movdqu	%xmm0, 16(%r11,%rax,4)
LBB0_9:
	xorl	%eax, %eax
	cmpq	%r8, %r10
	je	LBB0_13
## %bb.10:
	addq	%r8, %rcx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	cmpq	%rcx, %rdx
	sete	%al
	movl	%eax, (%r11,%rcx,4)
	incq	%rcx
	cmpq	%rdx, %rcx
	jbe	LBB0_11
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	testb	$1, %r9b
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_kv_calculate_dpm_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function kv_calculate_dpm_settings
lCPI0_0:
	.quad	2                               ; 0x2
	.quad	3                               ; 0x3
lCPI0_1:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_kv_calculate_dpm_settings:             ; @kv_calculate_dpm_settings
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_kv_get_pi
	ldp	x13, x8, [x0]
	cmp	x13, x8
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
	b.hi	LBB0_8
; %bb.3:
	ldr	x9, [x0, #16]
	add	x10, x13, #1
	add	x11, x8, #1
	cmp	x10, x11
	csinc	x10, x10, x8, hi
	sub	x11, x10, x13
	mov	x10, x13
	cmp	x11, #16
	b.lo	LBB0_7
; %bb.4:
	and	x12, x11, #0xfffffffffffffff0
	add	x10, x13, x12
	dup.2d	v1, x13
Lloh3:
	adrp	x14, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x14, lCPI0_0@PAGEOFF]
	add.2d	v0, v1, v0
Lloh5:
	adrp	x14, lCPI0_1@PAGE
Lloh6:
	ldr	q2, [x14, lCPI0_1@PAGEOFF]
	add.2d	v1, v1, v2
	dup.2d	v2, x8
	add	x13, x9, x13, lsl #2
	mov	w14, #4
	dup.2d	v3, x14
	mov	w14, #8
	dup.2d	v4, x14
	mov	w14, #12
	dup.2d	v5, x14
	add	x13, x13, #32
	movi.4s	v6, #1
	mov	w14, #16
	dup.2d	v7, x14
	mov	x14, x12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add.2d	v16, v1, v3
	add.2d	v17, v0, v3
	add.2d	v18, v1, v4
	add.2d	v19, v0, v4
	add.2d	v20, v1, v5
	add.2d	v21, v0, v5
	cmeq.2d	v22, v1, v2
	cmeq.2d	v23, v0, v2
	uzp1.4s	v22, v22, v23
	and.16b	v22, v22, v6
	cmeq.2d	v17, v17, v2
	cmeq.2d	v16, v16, v2
	uzp1.4s	v16, v16, v17
	and.16b	v16, v16, v6
	cmeq.2d	v17, v19, v2
	cmeq.2d	v18, v18, v2
	uzp1.4s	v17, v18, v17
	and.16b	v17, v17, v6
	cmeq.2d	v18, v21, v2
	cmeq.2d	v19, v20, v2
	uzp1.4s	v18, v19, v18
	and.16b	v18, v18, v6
	stp	q22, q16, [x13, #-32]
	stp	q17, q18, [x13], #64
	add.2d	v0, v0, v7
	add.2d	v1, v1, v7
	subs	x14, x14, #16
	b.ne	LBB0_5
; %bb.6:
	cmp	x11, x12
	b.eq	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x8, x10
	cset	w11, eq
	str	w11, [x9, x10, lsl #2]
	add	x10, x10, #1
	cmp	x10, x8
	b.ls	LBB0_7
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_kv_calculate_dpm_settings
.subsections_via_symbols
