	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_device_need_post        ## -- Begin function amdgpu_device_need_post
	.p2align	4, 0x90
_amdgpu_device_need_post:               ## @amdgpu_device_need_post
	.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	%rdi, %rbx
	callq	_amdgpu_sriov_vf
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_amdgpu_passthrough
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%rbx), %rax
	movq	_CHIP_FIJI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	leaq	16(%rbx), %r14
	movl	24(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_request_firmware
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.4:
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	cmpl	$1445376, 276(%rcx)             ## imm = 0x160E00
	jl	LBB0_9
LBB0_5:
	cmpl	$0, 8(%rbx)
	je	LBB0_7
## %bb.6:
	movl	$0, 8(%rbx)
	movl	$1, %eax
	jmp	LBB0_9
LBB0_7:
	movq	(%rbx), %rax
	movq	_CHIP_BONAIRE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_amdgpu_asic_get_config_memsize
	movl	%eax, %ecx
	incl	%ecx
	xorl	%eax, %eax
	cmpl	$2, %ecx
	setb	%al
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_amdgpu_atombios_scratch_need_asic_init ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_FIJI,8,3                  ## @CHIP_FIJI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amdgpu/fiji_smc.bin"

	.comm	_CHIP_BONAIRE,8,3               ## @CHIP_BONAIRE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_device_need_post        ; -- Begin function amdgpu_device_need_post
	.p2align	2
_amdgpu_device_need_post:               ; @amdgpu_device_need_post
	.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
	bl	_amdgpu_sriov_vf
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
	mov	x0, x19
	bl	_amdgpu_passthrough
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _CHIP_FIJI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_FIJI@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	add	x20, x19, #16
	ldr	w2, [x19, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_request_firmware
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w8, [x8, #276]
	mov	w9, #3584
	movk	w9, #22, lsl #16
	cmp	w8, w9
	b.lt	LBB0_8
LBB0_6:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_10
; %bb.7:
	str	wzr, [x19, #8]
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _CHIP_BONAIRE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHIP_BONAIRE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	mov	x0, x19
	cmp	x8, x9
	b.ge	LBB0_12
; %bb.11:
	bl	_amdgpu_asic_get_config_memsize
	add	w8, w0, #1
	cmp	w8, #2
	cset	w0, lo
	b	LBB0_9
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_amdgpu_atombios_scratch_need_asic_init
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_FIJI,8,3                  ; @CHIP_FIJI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amdgpu/fiji_smc.bin"

	.comm	_CHIP_BONAIRE,8,3               ; @CHIP_BONAIRE
.subsections_via_symbols
