	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unix_socket_ipc
_unix_socket_ipc:                       ## @unix_socket_ipc
	.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	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movl	(%rsi), %edi
	callq	_htonl
	movl	%eax, -44(%rbp)
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	$0, (%rbx)
LBB0_2:
	movq	$0, 8(%r15)
	movl	$0, (%r15)
	movl	(%r12), %edi
	leaq	-44(%rbp), %rsi
	movl	$4, %edx
	callq	_net_write
	movl	$-1, %r14d
	cmpl	$4, %eax
	jne	LBB0_11
## %bb.3:
	movl	(%r12), %edi
	movq	8(%r13), %rsi
	movl	(%r13), %edx
	callq	_net_write
	cmpl	(%r13), %eax
	jne	LBB0_11
## %bb.4:
	movl	(%r12), %edi
	leaq	-44(%rbp), %rsi
	movl	$4, %edx
	callq	_net_read
	cmpl	$4, %eax
	jne	LBB0_11
## %bb.5:
	movl	(%r12), %edi
	leaq	-48(%rbp), %rsi
	movl	$4, %edx
	callq	_net_read
	cmpl	$4, %eax
	jne	LBB0_11
## %bb.6:
	movl	-48(%rbp), %edi
	callq	_ntohl
	movq	%rax, %rbx
	movl	-44(%rbp), %edi
	callq	_ntohl
	movl	%eax, (%r15)
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	movl	%eax, %edi
	callq	_malloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movl	(%r12), %edi
	movl	(%r15), %edx
	movq	%rax, %rsi
	callq	_net_read
	cmpl	(%r15), %eax
	je	LBB0_10
	jmp	LBB0_11
LBB0_9:
	movq	$0, 8(%r15)
LBB0_10:
	movl	%ebx, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_unix_socket_ipc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unix_socket_ipc
_unix_socket_ipc:                       ; @unix_socket_ipc
	.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	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x1]
	bl	_htonl
	str	w0, [sp, #12]
	cbz	x22, LBB0_2
; %bb.1:
	str	xzr, [x22]
LBB0_2:
	str	xzr, [x19, #8]
	str	wzr, [x19]
	ldr	w0, [x20]
	add	x1, sp, #12
	mov	w2, #4
	bl	_net_write
	cmp	w0, #4
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x20]
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	bl	_net_write
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.4:
	ldr	w0, [x20]
	add	x1, sp, #12
	mov	w2, #4
	bl	_net_read
	cmp	w0, #4
	b.ne	LBB0_9
; %bb.5:
	ldr	w0, [x20]
	add	x1, sp, #8
	mov	w2, #4
	bl	_net_read
	cmp	w0, #4
	b.ne	LBB0_9
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_ntohl
	mov	x21, x0
	ldr	w0, [sp, #12]
	bl	_ntohl
	str	w0, [x19]
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.7:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.8:
	mov	x1, x0
	ldr	w0, [x20]
	ldr	w2, [x19]
	bl	_net_read
	ldr	w8, [x19]
	cmp	w0, w8
	b.eq	LBB0_10
LBB0_9:
	mov	w21, #-1
LBB0_10:
	mov	x0, x21
	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_11:
	str	xzr, [x19, #8]
	b	LBB0_10
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_unix_socket_ipc
.subsections_via_symbols
