	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ucode_create_bo         ## -- Begin function amdgpu_ucode_create_bo
	.p2align	4, 0x90
_amdgpu_ucode_create_bo:                ## @amdgpu_ucode_create_bo
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_AMDGPU_FW_LOAD_DIRECT@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movl	8(%rdi), %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	callq	_amdgpu_sriov_vf
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_AMDGPU_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_AMDGPU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	leaq	16(%rbx), %r8
	leaq	20(%rbx), %r9
	leaq	12(%rbx), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_amdgpu_bo_create_kernel
	cmpl	$0, 16(%rbx)
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_amdgpu_sriov_vf
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	8(%rbx), %edx
	movl	12(%rbx), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_8
LBB0_5:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_FW_LOAD_DIRECT,8,3      ## @AMDGPU_FW_LOAD_DIRECT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ## @AMDGPU_GEM_DOMAIN_VRAM
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ## @AMDGPU_GEM_DOMAIN_GTT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create kernel buffer for firmware.fw_buf\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ucode_create_bo         ; -- Begin function amdgpu_ucode_create_bo
	.p2align	2
_amdgpu_ucode_create_bo:                ; @amdgpu_ucode_create_bo
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AMDGPU_FW_LOAD_DIRECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMDGPU_FW_LOAD_DIRECT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w20, [x0, #8]
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	bl	_amdgpu_sriov_vf
Lloh6:
	adrp	x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh8:
	adrp	x9, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w3, [x8]
	add	x4, x19, #16
	add	x5, x19, #20
	add	x6, x19, #12
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_amdgpu_bo_create_kernel
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_amdgpu_sriov_vf
	cbz	x0, LBB0_6
; %bb.3:
	ldp	w2, w0, [x19, #8]
	mov	w1, #0
	bl	_memset
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19, #24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_FW_LOAD_DIRECT,8,3      ; @AMDGPU_FW_LOAD_DIRECT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_VRAM,4,2     ; @AMDGPU_GEM_DOMAIN_VRAM
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ; @AMDGPU_GEM_DOMAIN_GTT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create kernel buffer for firmware.fw_buf\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
