	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_dbgmgr_create              ## -- Begin function kfd_dbgmgr_create
	.p2align	4, 0x90
_kfd_dbgmgr_create:                     ## @kfd_dbgmgr_create
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_DBGDEV_TYPE_DIQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	xorl	%edi, %edi
	cmpl	$0, 8(%rsi)
	sete	%dil
	callq	_WARN_ON
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	callq	_kfd_alloc_struct
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	$0, 16(%rax)
	movq	%rbx, 8(%rax)
	movq	(%rax), %rdi
	callq	_kfd_alloc_struct
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	_KFD_SCHED_POLICY_NO_HWS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:
	movq	_DBGDEV_TYPE_NODIQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_7:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_kfd_dbgdev_init
	movq	%r13, (%r14)
	movl	$1, %r15d
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_DBGDEV_TYPE_DIQ,4,2            ## @DBGDEV_TYPE_DIQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate dbgmgr instance\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate dbgdev instance\n"

	.comm	_KFD_SCHED_POLICY_NO_HWS,8,3    ## @KFD_SCHED_POLICY_NO_HWS
	.comm	_DBGDEV_TYPE_NODIQ,4,2          ## @DBGDEV_TYPE_NODIQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_dbgmgr_create              ; -- Begin function kfd_dbgmgr_create
	.p2align	2
_kfd_dbgmgr_create:                     ; @kfd_dbgmgr_create
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DBGDEV_TYPE_DIQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DBGDEV_TYPE_DIQ@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	w8, [x1, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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
LBB0_3:
	bl	_kfd_alloc_struct
	cbz	x0, LBB0_6
; %bb.4:
	mov	x21, x0
	stp	x20, xzr, [x0, #8]
	ldr	x0, [x0]
	bl	_kfd_alloc_struct
	str	x0, [x21]
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _KFD_SCHED_POLICY_NO_HWS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KFD_SCHED_POLICY_NO_HWS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _DBGDEV_TYPE_NODIQ@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DBGDEV_TYPE_NODIQ@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w2, w10, w22, eq
	mov	x1, x20
	bl	_kfd_dbgdev_init
	str	x21, [x19]
	mov	w0, #1
	b	LBB0_2
LBB0_6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_1
LBB0_7:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	x0, x21
	bl	_kfree
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DBGDEV_TYPE_DIQ,4,2            ; @DBGDEV_TYPE_DIQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate dbgmgr instance\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate dbgdev instance\n"

	.comm	_KFD_SCHED_POLICY_NO_HWS,8,3    ; @KFD_SCHED_POLICY_NO_HWS
	.comm	_DBGDEV_TYPE_NODIQ,4,2          ; @DBGDEV_TYPE_NODIQ
.subsections_via_symbols
