	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_create_process             ## -- Begin function kfd_create_process
	.p2align	4, 0x90
_kfd_create_process:                    ## @kfd_create_process
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	8(%rbx), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_16
## %bb.2:
	movq	%rdi, %r15
	movq	_kfd_processes_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_find_process
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r14
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_15
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	callq	_create_process
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_15
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_kfd_process_init_cwsr_apu
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
	jmp	LBB0_15
LBB0_7:
	movq	_procfs@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_15
## %bb.8:
	movl	24(%r14), %edi
	callq	_kfd_alloc_struct
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movl	(%rbx), %edx
	movq	(%r14), %rcx
	movl	(%rcx), %r8d
	movq	_procfs_type@GOTPCREL(%rip), %rsi
	leaq	L_.str.2(%rip), %rcx
	movl	%eax, %edi
	callq	_kobject_init_and_add
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
LBB0_10:
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_15:
	movq	_kfd_processes_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r14, %rbx
	addq	$8, %rbx
	leaq	L_.str.4(%rip), %rax
	movq	%rax, 8(%r14)
	movq	_KFD_SYSFS_FILE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	%rbx, %rdi
	callq	_sysfs_attr_init
	movl	24(%r14), %edi
	movq	%rbx, %rsi
	callq	_sysfs_create_file
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	(%r14), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_kfd_processes_mutex,4,2        ## @kfd_processes_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Process already found\n"

	.comm	_procfs,4,2                     ## @procfs
L_.str.1:                               ## @.str.1
	.asciz	"Creating procfs kobject failed"

	.comm	_procfs_type,4,2                ## @procfs_type
L_.str.2:                               ## @.str.2
	.asciz	"%d"

L_.str.3:                               ## @.str.3
	.asciz	"Creating procfs pid directory failed"

L_.str.4:                               ## @.str.4
	.asciz	"pasid"

	.comm	_KFD_SYSFS_FILE_MODE,4,2        ## @KFD_SYSFS_FILE_MODE
L_.str.5:                               ## @.str.5
	.asciz	"Creating pasid for pid %d failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_create_process             ; -- Begin function kfd_create_process
	.p2align	2
_kfd_create_process:                    ; @kfd_create_process
	.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
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x9, [x21, #8]
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x0, _kfd_processes_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _kfd_processes_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x21
	bl	_find_process
	cbz	x0, LBB0_5
; %bb.3:
	mov	x19, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	b	LBB0_16
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_5:
	mov	x0, x21
	bl	_create_process
	mov	x19, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_16
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_kfd_process_init_cwsr_apu
	cbz	w0, LBB0_8
; %bb.7:
	bl	_ERR_PTR
	mov	x19, x0
	b	LBB0_16
LBB0_8:
Lloh10:
	adrp	x20, _procfs@GOTPAGE
Lloh11:
	ldr	x20, [x20, _procfs@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_16
; %bb.9:
	ldr	w0, [x19, #24]
	bl	_kfd_alloc_struct
	str	w0, [x19, #24]
	cbz	w0, LBB0_12
; %bb.10:
	ldr	w2, [x20]
	ldr	x8, [x19]
	ldr	w4, [x8]
Lloh12:
	adrp	x1, _procfs_type@GOTPAGE
Lloh13:
	ldr	x1, [x1, _procfs_type@GOTPAGEOFF]
Lloh14:
	adrp	x3, l_.str.2@PAGE
Lloh15:
	add	x3, x3, l_.str.2@PAGEOFF
	bl	_kobject_init_and_add
	cbz	w0, LBB0_13
; %bb.11:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_12:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh20:
	adrp	x8, l_.str.4@PAGE
Lloh21:
	add	x8, x8, l_.str.4@PAGEOFF
	mov	x20, x19
	str	x8, [x20, #8]!
Lloh22:
	adrp	x8, _KFD_SYSFS_FILE_MODE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _KFD_SYSFS_FILE_MODE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_sysfs_attr_init
	ldr	w0, [x20, #16]
	mov	x1, x20
	bl	_sysfs_create_file
	cbz	w0, LBB0_16
; %bb.14:
	ldr	x8, [x19]
	ldr	x8, [x8]
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_15:
	bl	_pr_warn
LBB0_16:
Lloh27:
	adrp	x0, _kfd_processes_mutex@GOTPAGE
Lloh28:
	ldr	x0, [x0, _kfd_processes_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_kfd_processes_mutex,4,2        ; @kfd_processes_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Process already found\n"

	.comm	_procfs,4,2                     ; @procfs
l_.str.1:                               ; @.str.1
	.asciz	"Creating procfs kobject failed"

	.comm	_procfs_type,4,2                ; @procfs_type
l_.str.2:                               ; @.str.2
	.asciz	"%d"

l_.str.3:                               ; @.str.3
	.asciz	"Creating procfs pid directory failed"

l_.str.4:                               ; @.str.4
	.asciz	"pasid"

	.comm	_KFD_SYSFS_FILE_MODE,4,2        ; @KFD_SYSFS_FILE_MODE
l_.str.5:                               ; @.str.5
	.asciz	"Creating pasid for pid %d failed"

.subsections_via_symbols
