	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_reg_base_init
_nv_reg_base_init:                      ## @nv_reg_base_init
	.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	%rdi, %rbx
	movq	_amdgpu_discovery@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_amdgpu_discovery_reg_base_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_WARN
LBB0_3:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.5:
	cmpl	$130, %eax
	jne	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_navi10_reg_base_init
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movq	%rbx, %rdi
	callq	_navi14_reg_base_init
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_navi12_reg_base_init
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_amdgpu_discovery,8,3           ## @amdgpu_discovery
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to init reg base from ip discovery table, fallback to legacy init method\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nv_reg_base_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv_reg_base_init
_nv_reg_base_init:                      ; @nv_reg_base_init
	.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, x0
Lloh0:
	adrp	x8, _amdgpu_discovery@GOTPAGE
Lloh1:
	ldr	x8, [x8, _amdgpu_discovery@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_amdgpu_discovery_reg_base_init
	cbz	w0, LBB0_10
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_WARN
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_navi10_reg_base_init
	mov	w0, #0
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_navi14_reg_base_init
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_navi12_reg_base_init
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_amdgpu_discovery,8,3           ; @amdgpu_discovery
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to init reg base from ip discovery table, fallback to legacy init method\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nv_reg_base_init
.subsections_via_symbols
