	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_event_create               ## -- Begin function kfd_event_create
	.p2align	4, 0x90
_kfd_event_create:                      ## @kfd_event_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	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$20, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	24(%rbp), %rax
	movl	%r13d, (%rbx)
	movl	%r14d, 4(%rbx)
	movq	%rax, %r14
	movl	$0, 8(%rbx)
	movq	%rbx, %rdi
	addq	$16, %rdi
	callq	_init_waitqueue_head
	movq	$0, (%r14)
	movq	%r15, %rdi
	callq	_mutex_lock
	andl	$-2, %r13d
	cmpl	$128, %r13d
	jne	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_create_signal_event
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_KFD_MMAP_TYPE_EVENTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	movq	32(%rbp), %rcx
	movq	%rax, (%r14)
	movl	12(%rbx), %eax
	movl	%eax, (%rcx)
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_create_other_event
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_6:
	movq	16(%rbp), %rax
	movl	12(%rbx), %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	movl	12(%rbx), %ecx
	movl	%ecx, (%rax)
	xorl	%r12d, %r12d
LBB0_8:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KFD_MMAP_TYPE_EVENTS,8,3       ## @KFD_MMAP_TYPE_EVENTS
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfd_event_create               ; -- Begin function kfd_event_create
	.p2align	2
_kfd_event_create:                      ; @kfd_event_create
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x7
	mov	x20, x6
	mov	x21, x5
	mov	x26, x3
	mov	x25, x2
	mov	x19, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #20
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	stp	w25, w26, [x0], #16
	str	wzr, [x22, #8]
	bl	_init_waitqueue_head
	str	xzr, [x23]
	mov	x0, x19
	bl	_mutex_lock
	and	w8, w25, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x24
	mov	x1, x19
	mov	x2, x22
	bl	_create_signal_event
	mov	x24, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	x8, [x29, #16]
Lloh3:
	adrp	x9, _KFD_MMAP_TYPE_EVENTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KFD_MMAP_TYPE_EVENTS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PAGE_SHIFT@GOTPAGEOFF]
	str	x9, [x23]
Lloh8:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	str	x9, [x23]
	ldr	w9, [x22, #12]
	str	w9, [x8]
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	bl	_create_other_event
	mov	x24, x0
	cbz	w0, LBB0_7
LBB0_6:
	mov	x0, x22
	bl	_kfree
	b	LBB0_8
LBB0_7:
	mov	w24, #0
	ldr	w8, [x22, #12]
	str	w8, [x21]
	ldr	w8, [x22, #12]
	str	w8, [x20]
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KFD_MMAP_TYPE_EVENTS,8,3       ; @KFD_MMAP_TYPE_EVENTS
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
.subsections_via_symbols
