	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_init
_kfd_init:                              ## @kfd_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_sched_policy@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_KFD_SCHED_POLICY_HWS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	movq	_KFD_SCHED_POLICY_NO_HWS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_2
## %bb.4:
	movq	_max_num_of_queues_per_device@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:
	movq	_KFD_MAX_NUM_OF_QUEUES_PER_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_6
## %bb.7:
	xorl	%eax, %eax
	callq	_kfd_chardev_init
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	xorl	%eax, %eax
	callq	_kfd_topology_init
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_kfd_process_create_wq
	testl	%eax, %eax
	js	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	callq	_kfd_procfs_init
	xorl	%eax, %eax
	callq	_kfd_debugfs_init
	jmp	LBB0_15
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_10:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_kfd_topology_shutdown
	movl	%r14d, %ebx
LBB0_14:
	xorl	%eax, %eax
	callq	_kfd_chardev_exit
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_sched_policy,8,3               ## @sched_policy
	.comm	_KFD_SCHED_POLICY_HWS,8,3       ## @KFD_SCHED_POLICY_HWS
	.comm	_KFD_SCHED_POLICY_NO_HWS,8,3    ## @KFD_SCHED_POLICY_NO_HWS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sched_policy has invalid value\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_max_num_of_queues_per_device,4,2 ## @max_num_of_queues_per_device
	.comm	_KFD_MAX_NUM_OF_QUEUES_PER_DEVICE,4,2 ## @KFD_MAX_NUM_OF_QUEUES_PER_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"max_num_of_queues_per_device must be between 1 to KFD_MAX_NUM_OF_QUEUES_PER_DEVICE\n"

	.no_dead_strip	_kfd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_init
_kfd_init:                              ; @kfd_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _sched_policy@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sched_policy@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _KFD_SCHED_POLICY_HWS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KFD_SCHED_POLICY_HWS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _KFD_SCHED_POLICY_NO_HWS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _KFD_SCHED_POLICY_NO_HWS@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.le	LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh11:
	adrp	x8, _max_num_of_queues_per_device@GOTPAGE
Lloh12:
	ldr	x8, [x8, _max_num_of_queues_per_device@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _KFD_MAX_NUM_OF_QUEUES_PER_DEVICE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _KFD_MAX_NUM_OF_QUEUES_PER_DEVICE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, #1
	ccmp	w8, w9, #0, ge
	b.le	LBB0_6
; %bb.3:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_pr_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	_kfd_chardev_init
	tbnz	w0, #31, LBB0_10
; %bb.7:
	bl	_kfd_topology_init
	tbnz	w0, #31, LBB0_11
; %bb.8:
	bl	_kfd_process_create_wq
	tbnz	w0, #31, LBB0_12
; %bb.9:
	bl	_kfd_procfs_init
	bl	_kfd_debugfs_init
	mov	w19, #0
	b	LBB0_5
LBB0_10:
	mov	x19, x0
	b	LBB0_5
LBB0_11:
	mov	x19, x0
	b	LBB0_13
LBB0_12:
	mov	x19, x0
	bl	_kfd_topology_shutdown
LBB0_13:
	bl	_kfd_chardev_exit
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_sched_policy,8,3               ; @sched_policy
	.comm	_KFD_SCHED_POLICY_HWS,8,3       ; @KFD_SCHED_POLICY_HWS
	.comm	_KFD_SCHED_POLICY_NO_HWS,8,3    ; @KFD_SCHED_POLICY_NO_HWS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sched_policy has invalid value\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_max_num_of_queues_per_device,4,2 ; @max_num_of_queues_per_device
	.comm	_KFD_MAX_NUM_OF_QUEUES_PER_DEVICE,4,2 ; @KFD_MAX_NUM_OF_QUEUES_PER_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"max_num_of_queues_per_device must be between 1 to KFD_MAX_NUM_OF_QUEUES_PER_DEVICE\n"

	.no_dead_strip	_kfd_init
.subsections_via_symbols
