	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_kiq_init            ## -- Begin function amdgpu_gfx_kiq_init
	.p2align	4, 0x90
_amdgpu_gfx_kiq_init:                   ## @amdgpu_gfx_kiq_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	%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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AMDGPU_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	4(%rdi), %r14
	leaq	8(%rdi), %r9
	leaq	-40(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r14, %r8
	callq	_amdgpu_bo_create_kernel
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_warn
	jmp	LBB0_5
LBB0_2:
	movq	-40(%rbp), %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_amdgpu_bo_reserve
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_warn
LBB0_4:
	movl	(%r14), %edi
	callq	_amdgpu_bo_kunmap
	movl	(%r14), %edi
	callq	_amdgpu_bo_unreserve
LBB0_5:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ## @AMDGPU_GEM_DOMAIN_GTT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create KIQ bo (%d).\n"

L_.str.1:                               ## @.str.1
	.asciz	"(%d) reserve kiq eop bo failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_kiq_init            ; -- Begin function amdgpu_gfx_kiq_init
	.p2align	2
_amdgpu_gfx_kiq_init:                   ; @amdgpu_gfx_kiq_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x20, x0, #4
	add	x5, x0, #8
	add	x6, sp, #8
	mov	x4, x20
	bl	_amdgpu_bo_create_kernel
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_warn
	b	LBB0_5
LBB0_2:
	ldr	x0, [sp, #8]
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	ldr	w0, [x20]
	mov	w1, #1
	bl	_amdgpu_bo_reserve
	mov	x22, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_dev_warn
LBB0_4:
	ldr	w0, [x20]
	bl	_amdgpu_bo_kunmap
	ldr	w0, [x20]
	bl	_amdgpu_bo_unreserve
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ; @AMDGPU_GEM_DOMAIN_GTT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create KIQ bo (%d).\n"

l_.str.1:                               ; @.str.1
	.asciz	"(%d) reserve kiq eop bo failed\n"

.subsections_via_symbols
