	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_send                     ## -- Begin function event_send
	.p2align	4, 0x90
_event_send:                            ## @event_send
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_PJDLOG_ASSERT
	movq	_EVENT_MIN@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	setle	%al
	movq	_EVENT_MAX@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	setge	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_PJDLOG_ASSERT
	movq	$0, -32(%rbp)
	xorl	%eax, %eax
	callq	_nv_alloc
	movq	%rax, %r15
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_nv_add_uint8
	movq	%r15, %rdi
	callq	_nv_error
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_LOG_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rcx
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_pjdlog_common
	jmp	LBB0_7
LBB0_2:
	movl	(%r14), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_hast_proto_send
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	(%r14), %edi
	leaq	-32(%rbp), %rsi
	callq	_hast_proto_recv_hdr
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.5:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	callq	_pjdlog_errno
LBB0_7:
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_nv_free
LBB0_9:
	testq	%r15, %r15
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_nv_free
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVENT_MIN,4,2                  ## @EVENT_MIN
	.comm	_EVENT_MAX,4,2                  ## @EVENT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event"

	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"Unable to prepare event header"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to send event header"

L_.str.3:                               ## @.str.3
	.asciz	"Unable to receive event header"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_send                     ; -- Begin function event_send
	.p2align	2
_event_send:                            ; @event_send
	.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
	mov	x21, x1
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
Lloh0:
	adrp	x8, _EVENT_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVENT_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
Lloh3:
	adrp	x8, _EVENT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVENT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ccmp	w8, w21, #8, le
	cset	w0, ge
	bl	_PJDLOG_ASSERT
	str	xzr, [sp, #8]
	bl	_nv_alloc
	mov	x19, x0
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x21
	bl	_nv_add_uint8
	mov	x0, x19
	bl	_nv_error
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
Lloh8:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w1, #0
	bl	_pjdlog_common
	b	LBB0_7
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x20
	mov	x2, x19
	mov	x3, #0
	mov	w4, #0
	bl	_hast_proto_send
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_hast_proto_recv_hdr
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.4:
Lloh13:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	bl	_pjdlog_errno
LBB0_7:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_nv_free
LBB0_9:
	cbz	x19, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_nv_free
LBB0_11:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EVENT_MIN,4,2                  ; @EVENT_MIN
	.comm	_EVENT_MAX,4,2                  ; @EVENT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event"

	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"Unable to prepare event header"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to send event header"

l_.str.3:                               ; @.str.3
	.asciz	"Unable to receive event header"

.subsections_via_symbols
