	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_kq
_test_kq:                               ## @test_kq
	.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
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_KFD_QUEUE_TYPE_HIQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kernel_queue_init
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	leaq	L_.str.2(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_1:
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	*8(%rbx)
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_2:
	movq	-16(%rbp), %rax
	movl	(%rbx), %ecx
	movl	%ecx, (%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 8(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 12(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 16(%rax)
	movq	%rbx, %rdi
	callq	*16(%rbx)
	leaq	L_.str.4(%rip), %rdi
LBB0_4:
	callq	_pr_err
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Starting kernel queue test\n"

	.comm	_KFD_QUEUE_TYPE_HIQ,4,2         ## @KFD_QUEUE_TYPE_HIQ
L_.str.1:                               ## @.str.1
	.asciz	"  Failed to initialize HIQ\n"

L_.str.2:                               ## @.str.2
	.asciz	"Kernel queue test failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"  Failed to acquire packet buffer\n"

L_.str.4:                               ## @.str.4
	.asciz	"Ending kernel queue test\n"

	.no_dead_strip	_test_kq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_kq
_test_kq:                               ; @test_kq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh2:
	adrp	x8, _KFD_QUEUE_TYPE_HIQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KFD_QUEUE_TYPE_HIQ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kernel_queue_init
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_pr_err
LBB0_2:
	ldr	x8, [x19, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #5
	blr	x8
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
	ldr	x8, [sp, #8]
	ldr	w9, [x19]
	str	w9, [x8]
	ldr	w9, [x19]
	str	w9, [x8, #4]
	ldr	w9, [x19]
	str	w9, [x8, #8]
	ldr	w9, [x19]
	str	w9, [x8, #12]
	ldr	w9, [x19]
	str	w9, [x8, #16]
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_5:
	bl	_pr_err
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Starting kernel queue test\n"

	.comm	_KFD_QUEUE_TYPE_HIQ,4,2         ; @KFD_QUEUE_TYPE_HIQ
l_.str.1:                               ; @.str.1
	.asciz	"  Failed to initialize HIQ\n"

l_.str.2:                               ; @.str.2
	.asciz	"Kernel queue test failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"  Failed to acquire packet buffer\n"

l_.str.4:                               ; @.str.4
	.asciz	"Ending kernel queue test\n"

	.no_dead_strip	_test_kq
.subsections_via_symbols
