	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_event
_create_event:                          ## @create_event
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %rbx
	movl	%r14d, (%rax)
	movq	%r15, 32(%rax)
	movl	16(%r15), %r9d
	movdqu	8(%r15), %xmm0
	pshufd	$141, %xmm0, %xmm1              ## xmm1 = xmm0[1,3,0,2]
	movdqu	%xmm1, 8(%rax)
	movq	(%r15), %rax
	movq	%rax, 24(%rbx)
	movq	_NES_DBG_CM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	pextrd	$1, %xmm0, 16(%rsp)
	pextrd	$3, %xmm0, 8(%rsp)
	movd	%xmm0, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	movl	%r14d, %r8d
	callq	_nes_debug
	movq	%rbx, %rdi
	callq	_nes_cm_post_event
	jmp	LBB0_5
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_NES_DBG_CM,4,2                 ## @NES_DBG_CM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cm_node=%p Created event=%p, type=%u, dst_addr=%08x[%x], src_addr=%08x[%x]\n"

	.no_dead_strip	_create_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_event
_create_event:                          ; @create_event
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.2:
	str	w20, [x19]
	ldp	w5, w7, [x21, #16]
	ldp	w6, w8, [x21, #8]
	stp	w8, w7, [x19, #8]
	stp	w6, w5, [x19, #16]
	ldr	x9, [x21]
	stp	x9, x21, [x19, #24]
Lloh3:
	adrp	x9, _NES_DBG_CM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NES_DBG_CM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
	str	w8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x19
	mov	x4, x20
	bl	_nes_debug
	mov	x0, x19
	bl	_nes_cm_post_event
	b	LBB0_4
LBB0_3:
	mov	x19, #0
LBB0_4:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_NES_DBG_CM,4,2                 ; @NES_DBG_CM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cm_node=%p Created event=%p, type=%u, dst_addr=%08x[%x], src_addr=%08x[%x]\n"

	.no_dead_strip	_create_event
.subsections_via_symbols
