	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_qpd_vi
_update_qpd_vi:                         ## @update_qpd_vi
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_qpd_to_pdd
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_SH_MEM_ALIGNMENT_MODE_UNALIGNED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_MTYPE_CC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%esi, %edi
	shll	%cl, %edi
	orl	%edx, %edi
	movq	_SH_MEM_CONFIG__APE1_MTYPE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%edi, %esi
	movq	_SH_MEM_CONFIG__PRIVATE_ATC_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movl	%esi, (%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
LBB0_2:
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	callq	_get_sh_mem_bases_32
	movl	%eax, %r14d
	movq	_SH_MEM_BASES__SHARED_BASE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r14d, %eax
	shll	%cl, %eax
	movq	_SH_MEM_ADDRESS_MODE_HSA32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SH_MEM_CONFIG__ADDRESS_MODE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	(%rbx), %edx
	jmp	LBB0_5
LBB0_4:
	movq	%rax, %rdi
	callq	_get_sh_mem_bases_nybble_64
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_compute_sh_mem_bases_64bit
	movq	_SH_MEM_ADDRESS_MODE_HSA64@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SH_MEM_CONFIG__ADDRESS_MODE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	(%rbx), %edx
	movl	%edx, (%rbx)
	movq	_SH_MEM_CONFIG__PRIVATE_ATC__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %edx
LBB0_5:
	movl	%eax, 4(%rbx)
	movl	%edx, (%rbx)
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rsi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_pr_debug
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SH_MEM_ALIGNMENT_MODE_UNALIGNED,4,2 ## @SH_MEM_ALIGNMENT_MODE_UNALIGNED
	.comm	_SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT,4,2 ## @SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT
	.comm	_MTYPE_CC,4,2                   ## @MTYPE_CC
	.comm	_SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT,4,2 ## @SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT
	.comm	_SH_MEM_CONFIG__APE1_MTYPE__SHIFT,4,2 ## @SH_MEM_CONFIG__APE1_MTYPE__SHIFT
	.comm	_SH_MEM_CONFIG__PRIVATE_ATC_MASK,4,2 ## @SH_MEM_CONFIG__PRIVATE_ATC_MASK
	.comm	_SH_MEM_BASES__SHARED_BASE__SHIFT,4,2 ## @SH_MEM_BASES__SHARED_BASE__SHIFT
	.comm	_SH_MEM_ADDRESS_MODE_HSA32,4,2  ## @SH_MEM_ADDRESS_MODE_HSA32
	.comm	_SH_MEM_CONFIG__ADDRESS_MODE__SHIFT,4,2 ## @SH_MEM_CONFIG__ADDRESS_MODE__SHIFT
	.comm	_SH_MEM_ADDRESS_MODE_HSA64,4,2  ## @SH_MEM_ADDRESS_MODE_HSA64
	.comm	_SH_MEM_CONFIG__PRIVATE_ATC__SHIFT,4,2 ## @SH_MEM_CONFIG__PRIVATE_ATC__SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"is32bit process: %d sh_mem_bases nybble: 0x%X and register 0x%X\n"

	.no_dead_strip	_update_qpd_vi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_qpd_vi
_update_qpd_vi:                         ; @update_qpd_vi
	.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
	mov	x19, x1
	mov	x0, x1
	bl	_qpd_to_pdd
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SH_MEM_ALIGNMENT_MODE_UNALIGNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SH_MEM_ALIGNMENT_MODE_UNALIGNED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh6:
	adrp	x9, _MTYPE_CC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MTYPE_CC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	lsl	w10, w9, w10
	orr	w8, w10, w8
Lloh12:
	adrp	x10, _SH_MEM_CONFIG__APE1_MTYPE__SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SH_MEM_CONFIG__APE1_MTYPE__SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh15:
	adrp	x10, _SH_MEM_CONFIG__PRIVATE_ATC_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SH_MEM_CONFIG__PRIVATE_ATC_MASK@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh17:
	ldr	w9, [x10]
	orr	w8, w8, w9
	str	w8, [x19]
	stp	xzr, xzr, [x19, #16]
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	bl	_get_sh_mem_bases_32
	mov	x20, x0
Lloh18:
	adrp	x8, _SH_MEM_BASES__SHARED_BASE__SHIFT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SH_MEM_BASES__SHARED_BASE__SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w3, w0, w8
Lloh21:
	adrp	x8, _SH_MEM_ADDRESS_MODE_HSA32@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SH_MEM_ADDRESS_MODE_HSA32@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _SH_MEM_CONFIG__ADDRESS_MODE__SHIFT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SH_MEM_CONFIG__ADDRESS_MODE__SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x19]
	b	LBB0_5
LBB0_4:
	bl	_get_sh_mem_bases_nybble_64
	mov	x20, x0
	bl	_compute_sh_mem_bases_64bit
	mov	x3, x0
Lloh27:
	adrp	x8, _SH_MEM_ADDRESS_MODE_HSA64@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SH_MEM_ADDRESS_MODE_HSA64@GOTPAGEOFF]
Lloh29:
	adrp	x9, _SH_MEM_CONFIG__ADDRESS_MODE__SHIFT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SH_MEM_CONFIG__ADDRESS_MODE__SHIFT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh33:
	adrp	x9, _SH_MEM_CONFIG__PRIVATE_ATC__SHIFT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SH_MEM_CONFIG__PRIVATE_ATC__SHIFT@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
LBB0_5:
	orr	w8, w9, w8
	stp	w8, w3, [x19]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x1, [x8]
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_pr_debug
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_SH_MEM_ALIGNMENT_MODE_UNALIGNED,4,2 ; @SH_MEM_ALIGNMENT_MODE_UNALIGNED
	.comm	_SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT,4,2 ; @SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT
	.comm	_MTYPE_CC,4,2                   ; @MTYPE_CC
	.comm	_SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT,4,2 ; @SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT
	.comm	_SH_MEM_CONFIG__APE1_MTYPE__SHIFT,4,2 ; @SH_MEM_CONFIG__APE1_MTYPE__SHIFT
	.comm	_SH_MEM_CONFIG__PRIVATE_ATC_MASK,4,2 ; @SH_MEM_CONFIG__PRIVATE_ATC_MASK
	.comm	_SH_MEM_BASES__SHARED_BASE__SHIFT,4,2 ; @SH_MEM_BASES__SHARED_BASE__SHIFT
	.comm	_SH_MEM_ADDRESS_MODE_HSA32,4,2  ; @SH_MEM_ADDRESS_MODE_HSA32
	.comm	_SH_MEM_CONFIG__ADDRESS_MODE__SHIFT,4,2 ; @SH_MEM_CONFIG__ADDRESS_MODE__SHIFT
	.comm	_SH_MEM_ADDRESS_MODE_HSA64,4,2  ; @SH_MEM_ADDRESS_MODE_HSA64
	.comm	_SH_MEM_CONFIG__PRIVATE_ATC__SHIFT,4,2 ; @SH_MEM_CONFIG__PRIVATE_ATC__SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"is32bit process: %d sh_mem_bases nybble: 0x%X and register 0x%X\n"

	.no_dead_strip	_update_qpd_vi
.subsections_via_symbols
