	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function proto_alloc
_proto_alloc:                           ## @proto_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_PJDLOG_ASSERT
	movq	_PROTO_SIDE_CLIENT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	sete	%al
	movq	_PROTO_SIDE_SERVER_LISTEN@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	sete	%cl
	orb	%al, %cl
	movq	_PROTO_SIDE_SERVER_WORK@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_PJDLOG_ASSERT
	movl	$16, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, 8(%rax)
	movl	%ebx, (%rax)
	movq	_PROTO_CONN_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROTO_SIDE_CLIENT,4,2          ## @PROTO_SIDE_CLIENT
	.comm	_PROTO_SIDE_SERVER_LISTEN,4,2   ## @PROTO_SIDE_SERVER_LISTEN
	.comm	_PROTO_SIDE_SERVER_WORK,4,2     ## @PROTO_SIDE_SERVER_WORK
	.comm	_PROTO_CONN_MAGIC,4,2           ## @PROTO_CONN_MAGIC
	.no_dead_strip	_proto_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function proto_alloc
_proto_alloc:                           ; @proto_alloc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
Lloh0:
	adrp	x8, _PROTO_SIDE_CLIENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROTO_SIDE_CLIENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
Lloh3:
	adrp	x8, _PROTO_SIDE_SERVER_LISTEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROTO_SIDE_SERVER_LISTEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ccmp	w8, w19, #4, ne
Lloh6:
	adrp	x8, _PROTO_SIDE_SERVER_WORK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROTO_SIDE_SERVER_WORK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ccmp	w8, w19, #4, ne
	cset	w0, eq
	bl	_PJDLOG_ASSERT
	mov	w0, #16
	bl	_malloc
	cbz	x0, LBB0_2
; %bb.1:
	str	x20, [x0, #8]
	str	w19, [x0]
Lloh9:
	adrp	x8, _PROTO_CONN_MAGIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PROTO_CONN_MAGIC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x0, #4]
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PROTO_SIDE_CLIENT,4,2          ; @PROTO_SIDE_CLIENT
	.comm	_PROTO_SIDE_SERVER_LISTEN,4,2   ; @PROTO_SIDE_SERVER_LISTEN
	.comm	_PROTO_SIDE_SERVER_WORK,4,2     ; @PROTO_SIDE_SERVER_WORK
	.comm	_PROTO_CONN_MAGIC,4,2           ; @PROTO_CONN_MAGIC
	.no_dead_strip	_proto_alloc
.subsections_via_symbols
