	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ucode_get_load_type     ## -- Begin function amdgpu_ucode_get_load_type
	.p2align	4, 0x90
_amdgpu_ucode_get_load_type:            ## @amdgpu_ucode_get_load_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$-129, %eax
	addl	(%rdi), %eax
	cmpl	$26, %eax
	ja	LBB0_5
## %bb.1:
	movl	$25173169, %ecx                 ## imm = 0x1801CB1
	btl	%eax, %ecx
	jb	LBB0_2
## %bb.3:
	movl	$230158, %ecx                   ## imm = 0x3830E
	btl	%eax, %ecx
	jae	LBB0_4
## %bb.7:
	testl	%esi, %esi
	je	LBB0_6
## %bb.8:
	movq	_AMDGPU_FW_LOAD_PSP@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	_AMDGPU_FW_LOAD_SMU@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	cmpl	$26, %eax
	je	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_6:
	movq	_AMDGPU_FW_LOAD_DIRECT@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_FW_LOAD_SMU,4,2         ## @AMDGPU_FW_LOAD_SMU
	.comm	_AMDGPU_FW_LOAD_DIRECT,4,2      ## @AMDGPU_FW_LOAD_DIRECT
	.comm	_AMDGPU_FW_LOAD_PSP,4,2         ## @AMDGPU_FW_LOAD_PSP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown firmware load type\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ucode_get_load_type     ; -- Begin function amdgpu_ucode_get_load_type
	.p2align	2
_amdgpu_ucode_get_load_type:            ; @amdgpu_ucode_get_load_type
	.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
	ldr	w8, [x0]
	sub	w8, w8, #129
	cmp	w8, #26
	b.hi	LBB0_7
; %bb.1:
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #7345
	movk	w10, #384, lsl #16
	tst	w9, w10
	b.ne	LBB0_4
; %bb.2:
	mov	w10, #33550
	movk	w10, #3, lsl #16
	tst	w9, w10
	b.eq	LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _AMDGPU_FW_LOAD_PSP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMDGPU_FW_LOAD_PSP@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AMDGPU_FW_LOAD_DIRECT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AMDGPU_FW_LOAD_DIRECT@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _AMDGPU_FW_LOAD_SMU@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AMDGPU_FW_LOAD_SMU@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	cmp	w8, #26
	b.eq	LBB0_8
LBB0_7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_8:
Lloh8:
	adrp	x8, _AMDGPU_FW_LOAD_DIRECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AMDGPU_FW_LOAD_DIRECT@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_FW_LOAD_SMU,4,2         ; @AMDGPU_FW_LOAD_SMU
	.comm	_AMDGPU_FW_LOAD_DIRECT,4,2      ; @AMDGPU_FW_LOAD_DIRECT
	.comm	_AMDGPU_FW_LOAD_PSP,4,2         ; @AMDGPU_FW_LOAD_PSP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown firmware load type\n"

.subsections_via_symbols
