	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_amdkfd_get_local_mem_info ## -- Begin function amdgpu_amdkfd_get_local_mem_info
	.p2align	4, 0x90
_amdgpu_amdkfd_get_local_mem_info:      ## @amdgpu_amdkfd_get_local_mem_info
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	48(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rax), %r12d
	notl	%r12d
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_3:
	leaq	16(%r13), %r15
	movl	20(%r13), %ebx
	addl	16(%r13), %ebx
	movl	%ebx, -44(%rbp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	orl	16(%r13), %ebx
	testl	%r12d, %ebx
	jne	LBB0_5
## %bb.4:
	movq	40(%r13), %rcx
	movq	%rcx, 16(%r14)
	movq	32(%r13), %r8
	subq	%rcx, %r8
	jmp	LBB0_6
LBB0_5:
	movq	$0, 16(%r14)
	movq	32(%r13), %r8
	xorl	%ecx, %ecx
LBB0_6:
	movq	%r8, 8(%r14)
	movl	24(%r13), %eax
	movl	%eax, 24(%r14)
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rsi
	callq	_pr_debug
	movq	%r13, %rdi
	callq	_amdgpu_sriov_vf
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movslq	8(%r13), %rax
LBB0_12:
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
LBB0_13:
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpq	$0, (%r13)
	je	LBB0_9
## %bb.10:
	movq	_amdgpu_emu_mode@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	$1, (%rcx)
	je	LBB0_13
## %bb.11:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_dpm_get_mclk
	cltq
	jmp	LBB0_12
LBB0_9:
	movl	$100, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Address base: %pap limit %pap public 0x%llx private 0x%llx\n"

	.comm	_amdgpu_emu_mode,4,2            ## @amdgpu_emu_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_amdkfd_get_local_mem_info ; -- Begin function amdgpu_amdkfd_get_local_mem_info
	.p2align	2
_amdgpu_amdkfd_get_local_mem_info:      ; @amdgpu_amdkfd_get_local_mem_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #48]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x8]
	mvn	w22, w8
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
	mov	x21, x20
	ldp	w8, w9, [x21, #16]!
	add	w23, w9, w8
	str	w23, [sp, #12]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w8, [x21]
	orr	w8, w8, w23
	tst	w8, w22
	b.ne	LBB0_5
; %bb.4:
	ldp	x8, x3, [x20, #32]
	str	x3, [x19, #16]
	sub	x4, x8, x3
	b	LBB0_6
LBB0_5:
	mov	x3, #0
	str	xzr, [x19, #16]
	ldr	x4, [x20, #32]
LBB0_6:
	str	x4, [x19, #8]
	ldr	w8, [x20, #24]
	str	w8, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x1, x21
	bl	_pr_debug
	mov	x0, x20
	bl	_amdgpu_sriov_vf
	cbz	x0, LBB0_10
; %bb.7:
	ldrsw	x8, [x20, #8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
LBB0_8:
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
LBB0_9:
	str	w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.11:
Lloh2:
	adrp	x8, _amdgpu_emu_mode@GOTPAGE
Lloh3:
	ldr	x8, [x8, _amdgpu_emu_mode@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_14
; %bb.12:
	mov	w8, #0
	b	LBB0_9
LBB0_13:
	mov	w8, #100
	b	LBB0_9
LBB0_14:
	mov	x0, x20
	mov	w1, #0
	bl	_amdgpu_dpm_get_mclk
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x8, w0, w8
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Address base: %pap limit %pap public 0x%llx private 0x%llx\n"

	.comm	_amdgpu_emu_mode,4,2            ; @amdgpu_emu_mode
.subsections_via_symbols
