	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dbgdev_register_diq
_dbgdev_register_diq:                   ## @dbgdev_register_diq
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_KFD_QUEUE_TYPE_DIQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	8(%rdi), %edi
	movl	12(%r14), %esi
	leaq	-24(%rbp), %rcx
	leaq	-20(%rbp), %r8
	xorl	%edx, %edx
	callq	_pqm_create_queue
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_5
LBB0_2:
	movl	-20(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	movl	8(%r14), %edi
	movl	-20(%rbp), %esi
	callq	_pqm_get_kernel_queue
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	movl	8(%r14), %edi
	movl	-20(%rbp), %esi
	callq	_pqm_destroy_queue
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KFD_QUEUE_TYPE_DIQ,4,2         ## @KFD_QUEUE_TYPE_DIQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create DIQ\n"

L_.str.1:                               ## @.str.1
	.asciz	"DIQ Created with queue id: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error getting DIQ\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_dbgdev_register_diq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dbgdev_register_diq
_dbgdev_register_diq:                   ; @dbgdev_register_diq
	.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	x8, _KFD_QUEUE_TYPE_DIQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KFD_QUEUE_TYPE_DIQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x0, #8]
	ldr	w1, [x19, #12]
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x2, #0
	bl	_pqm_create_queue
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_5
LBB0_2:
	ldr	w1, [sp, #4]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	w0, [x19, #8]
	ldr	w1, [sp, #4]
	bl	_pqm_get_kernel_queue
	cbz	x0, LBB0_4
; %bb.3:
	mov	w20, #0
	str	x0, [x19]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	ldr	w0, [x19, #8]
	ldr	w1, [sp, #4]
	bl	_pqm_destroy_queue
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KFD_QUEUE_TYPE_DIQ,4,2         ; @KFD_QUEUE_TYPE_DIQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create DIQ\n"

l_.str.1:                               ; @.str.1
	.asciz	"DIQ Created with queue id: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error getting DIQ\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_dbgdev_register_diq
.subsections_via_symbols
