	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_recv                     ## -- Begin function event_recv
	.p2align	4, 0x90
_event_recv:                            ## @event_recv
	.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	%rdi, %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_PJDLOG_ASSERT
	movq	$0, -32(%rbp)
	movl	(%r15), %edi
	leaq	-32(%rbp), %rsi
	callq	_hast_proto_recv_hdr
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movq	-32(%rbp), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_nv_get_uint8
                                        ## kill: def $eax killed $eax def $rax
	movq	_EVENT_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pjdlog_error
	jmp	LBB0_10
LBB0_1:
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movl	$1, %esi
	callq	_pjdlog_common
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_4:
	leal	-128(%rax), %ecx
	cmpl	$6, %ecx
	jae	LBB0_5
## %bb.6:
	movslq	%ecx, %rax
	leaq	l_reltable.event_recv(%rip), %rcx
	movslq	(%rcx,%rax,4), %rbx
	addq	%rcx, %rbx
	movslq	4(%r15), %r14
	movl	12(%r15), %edi
	callq	_role2str
	leaq	L_.str.10(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pjdlog_prefix_set
	movl	4(%r15), %edx
	movl	8(%r15), %edi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_hook_exec
	leaq	L_.str.11(%rip), %rdi
	leaq	L_.str.12(%rip), %rsi
	xorl	%eax, %eax
	callq	_pjdlog_prefix_set
	xorl	%eax, %eax
	callq	_nv_alloc
	movq	%rax, %r14
	leaq	L_.str.13(%rip), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_nv_add_int16
	movq	%r14, %rdi
	callq	_nv_error
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_LOG_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.14(%rip), %rcx
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_pjdlog_common
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.9(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pjdlog_error
LBB0_10:
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_nv_free
LBB0_12:
	movl	$-1, %ebx
	testq	%r14, %r14
	je	LBB0_15
LBB0_14:
	movq	%r14, %rdi
	callq	_nv_free
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r15), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_hast_proto_send
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.13:
	movq	-32(%rbp), %rdi
	callq	_nv_free
	jmp	LBB0_14
LBB0_9:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.15(%rip), %rsi
	callq	_pjdlog_errno
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG_DEBUG,4,2                  ## @LOG_DEBUG
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to receive event header"

L_.str.1:                               ## @.str.1
	.asciz	"event"

	.comm	_EVENT_NONE,4,2                 ## @EVENT_NONE
L_.str.2:                               ## @.str.2
	.asciz	"Event header is missing 'event' field."

L_.str.3:                               ## @.str.3
	.asciz	"connect"

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

L_.str.5:                               ## @.str.5
	.asciz	"syncstart"

L_.str.6:                               ## @.str.6
	.asciz	"syncdone"

L_.str.7:                               ## @.str.7
	.asciz	"syncintr"

L_.str.8:                               ## @.str.8
	.asciz	"split-brain"

L_.str.9:                               ## @.str.9
	.asciz	"Event header contain invalid event number (%hhu)."

L_.str.10:                              ## @.str.10
	.asciz	"[%s] (%s) "

L_.str.11:                              ## @.str.11
	.asciz	"%s"

L_.str.12:                              ## @.str.12
	.space	1

L_.str.13:                              ## @.str.13
	.asciz	"error"

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

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

	.section	__TEXT,__const
	.p2align	2                               ## @reltable.event_recv
l_reltable.event_recv:
	.long	L_.str.5-l_reltable.event_recv
	.long	L_.str.7-l_reltable.event_recv
	.long	L_.str.6-l_reltable.event_recv
	.long	L_.str.8-l_reltable.event_recv
	.long	L_.str.4-l_reltable.event_recv
	.long	L_.str.3-l_reltable.event_recv

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_event_recv                     ; -- Begin function event_recv
	.p2align	2
_event_recv:                            ; @event_recv
	.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	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	str	xzr, [sp, #8]
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_hast_proto_recv_hdr
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	ldr	x0, [sp, #8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_nv_get_uint8
                                        ; kill: def $w0 killed $w0 def $x0
Lloh2:
	adrp	x8, _EVENT_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EVENT_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_3:
Lloh7:
	adrp	x8, _LOG_DEBUG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LOG_DEBUG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x3, l_.str@PAGE
Lloh14:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #1
	bl	_pjdlog_common
	b	LBB0_9
LBB0_4:
	sub	w8, w0, #128
	cmp	w8, #6
	b.hs	LBB0_7
; %bb.5:
Lloh15:
	adrp	x9, l_switch.table.event_recv@PAGE
Lloh16:
	add	x9, x9, l_switch.table.event_recv@PAGEOFF
	ldr	x20, [x9, w8, sxtw #3]
	ldrsw	x21, [x19, #4]
	ldr	w0, [x19, #12]
	bl	_role2str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.10@PAGE
Lloh18:
	add	x0, x0, l_.str.10@PAGEOFF
	mov	x1, x21
	bl	_pjdlog_prefix_set
	ldp	w2, w0, [x19, #4]
	mov	x1, x20
	mov	x3, #0
	bl	_hook_exec
Lloh19:
	adrp	x0, l_.str.11@PAGE
Lloh20:
	add	x0, x0, l_.str.11@PAGEOFF
Lloh21:
	adrp	x1, l_.str.12@PAGE
Lloh22:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_pjdlog_prefix_set
	bl	_nv_alloc
	mov	x20, x0
Lloh23:
	adrp	x2, l_.str.13@PAGE
Lloh24:
	add	x2, x2, l_.str.13@PAGEOFF
	mov	w1, #0
	bl	_nv_add_int16
	mov	x0, x20
	bl	_nv_error
	cbz	w0, LBB0_15
; %bb.6:
	mov	x2, x0
Lloh25:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x3, l_.str.14@PAGE
Lloh29:
	add	x3, x3, l_.str.14@PAGEOFF
	mov	w1, #0
	bl	_pjdlog_common
	ldr	x0, [sp, #8]
	cbnz	x0, LBB0_10
	b	LBB0_11
LBB0_7:
	str	x0, [sp]
Lloh30:
	adrp	x0, l_.str.9@PAGE
Lloh31:
	add	x0, x0, l_.str.9@PAGEOFF
LBB0_8:
	bl	_pjdlog_error
LBB0_9:
	mov	x20, #0
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_11
LBB0_10:
	bl	_nv_free
LBB0_11:
	cbz	x20, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_nv_free
LBB0_13:
	mov	w0, #-1
LBB0_14:
	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
LBB0_15:
	ldr	w1, [x19]
	mov	x0, x19
	mov	x2, x20
	mov	x3, #0
	mov	w4, #0
	bl	_hast_proto_send
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.16:
	ldr	x0, [sp, #8]
	bl	_nv_free
	mov	x0, x20
	bl	_nv_free
	mov	w0, #0
	b	LBB0_14
LBB0_17:
Lloh32:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x1, l_.str.15@PAGE
Lloh36:
	add	x1, x1, l_.str.15@PAGEOFF
	bl	_pjdlog_errno
	ldr	x0, [sp, #8]
	cbnz	x0, LBB0_10
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG_DEBUG,4,2                  ; @LOG_DEBUG
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to receive event header"

l_.str.1:                               ; @.str.1
	.asciz	"event"

	.comm	_EVENT_NONE,4,2                 ; @EVENT_NONE
l_.str.2:                               ; @.str.2
	.asciz	"Event header is missing 'event' field."

l_.str.3:                               ; @.str.3
	.asciz	"connect"

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

l_.str.5:                               ; @.str.5
	.asciz	"syncstart"

l_.str.6:                               ; @.str.6
	.asciz	"syncdone"

l_.str.7:                               ; @.str.7
	.asciz	"syncintr"

l_.str.8:                               ; @.str.8
	.asciz	"split-brain"

l_.str.9:                               ; @.str.9
	.asciz	"Event header contain invalid event number (%hhu)."

l_.str.10:                              ; @.str.10
	.asciz	"[%s] (%s) "

l_.str.11:                              ; @.str.11
	.asciz	"%s"

l_.str.12:                              ; @.str.12
	.space	1

l_.str.13:                              ; @.str.13
	.asciz	"error"

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

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

	.section	__DATA,__const
	.p2align	3                               ; @switch.table.event_recv
l_switch.table.event_recv:
	.quad	l_.str.5
	.quad	l_.str.7
	.quad	l_.str.6
	.quad	l_.str.8
	.quad	l_.str.4
	.quad	l_.str.3

.subsections_via_symbols
