	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_network_packet
_read_network_packet:                   ## @read_network_packet
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_get_free_recv_buffer
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r13
	cmpq	$0, 16(%r15)
	je	LBB0_10
## %bb.2:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_RX_BUFF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r13, %rdi
	callq	_freerecvbuf
	jmp	LBB0_4
LBB0_3:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_RX_BUFF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
LBB0_4:
	movl	$4, -52(%rbp)
	leaq	-80(%rbp), %r13
	leaq	-52(%rbp), %r9
	movl	%r14d, %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r8
	callq	_recvfrom
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_free_recvbuffs
	movq	%r13, %rdi
	callq	_stoa
	movslq	%eax, %rsi
	movl	$4, %edi
	callq	_DPRINTF
	cmpq	$0, 16(%r15)
	jne	LBB0_6
## %bb.5:
	movq	_packets_dropped@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_packets_ignored@GOTPCREL(%rip), %rax
LBB0_7:
	incl	(%rax)
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.9:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movl	$4, -52(%rbp)
	leaq	28(%r13), %rsi
	movq	%r13, %rbx
	addq	$24, %rbx
	leaq	-52(%rbp), %r9
	movl	%r14d, %edi
	movl	$4, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	_recvfrom
	movq	%rax, %r12
	movl	%r12d, (%r13)
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.11:
	cmpl	$-1, %r12d
	jne	LBB0_13
## %bb.12:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
	jmp	LBB0_19
LBB0_13:
	testl	%r12d, %r12d
	js	LBB0_19
## %bb.14:
	movq	%rbx, %rdi
	callq	_stoa
	movslq	%eax, %rsi
	movl	$3, %edi
	callq	_DPRINTF
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r15), %rax
	jne	LBB0_18
## %bb.15:
	movq	%rbx, %rdi
	callq	_stoa
	movq	%rbx, %rdi
	callq	_PSOCK_ADDR6
	movl	%eax, %edi
	callq	_IN6_IS_ADDR_LOOPBACK
	leaq	12(%r15), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_stoa
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_PSOCK_ADDR6
	movl	%eax, %edi
	callq	_IN6_IS_ADDR_LOOPBACK
	xorl	%esi, %esi
	testq	%rax, %rax
	sete	%sil
	movl	$2, %edi
	callq	_DPRINTF
	movq	%rbx, %rdi
	callq	_PSOCK_ADDR6
	movl	%eax, %edi
	callq	_IN6_IS_ADDR_LOOPBACK
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_PSOCK_ADDR6
	movl	%eax, %edi
	callq	_IN6_IS_ADDR_LOOPBACK
	testq	%rax, %rax
	je	LBB0_22
LBB0_17:
	leaq	L_.str.8(%rip), %rsi
	movl	$2, %edi
	callq	_DPRINTF
LBB0_18:
	movq	%r15, 16(%r13)
	movl	%r14d, 12(%r13)
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r13)
	movq	_receive@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r13)
	movq	%r13, %rdi
	callq	_add_full_recv_buffer
	incl	8(%r15)
	movq	_packets_received@GOTPCREL(%rip), %rax
	incl	(%rax)
	jmp	LBB0_8
LBB0_19:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_stoa
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_msyslog
	movslq	%r14d, %rsi
	movl	$5, %edi
LBB0_20:
	callq	_DPRINTF
LBB0_21:
	movq	%r13, %rdi
	callq	_freerecvbuf
	jmp	LBB0_8
LBB0_22:
	movq	_packets_dropped@GOTPCREL(%rip), %rax
	incl	(%rax)
	leaq	L_.str.7(%rip), %rsi
	movl	$2, %edi
	jmp	LBB0_20
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_BUFF_SIZE,4,2               ## @RX_BUFF_SIZE
	.comm	_packets_ignored,4,2            ## @packets_ignored
	.comm	_packets_dropped,4,2            ## @packets_dropped
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.comm	_errno,8,3                      ## @errno
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str.3:                               ## @.str.3
	.asciz	"recvfrom(%s) fd=%d: %m"

	.comm	_AF_INET6,8,3                   ## @AF_INET6
L_.str.7:                               ## @.str.7
	.asciz	"DROPPING that packet\n"

L_.str.8:                               ## @.str.8
	.asciz	"processing that packet\n"

	.comm	_receive,4,2                    ## @receive
	.comm	_packets_received,4,2           ## @packets_received
	.comm	_CMSG_BUFSIZE,4,2               ## @CMSG_BUFSIZE
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.no_dead_strip	_read_network_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_network_packet
_read_network_packet:                   ; @read_network_packet
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_get_free_recv_buffer
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x24, sp
Lloh3:
	adrp	x8, _RX_BUFF_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RX_BUFF_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	x9, x23
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	mov	x0, x22
	bl	_freerecvbuf
	mov	x2, x23
	b	LBB0_4
LBB0_3:
	mov	x24, sp
Lloh8:
	adrp	x8, _RX_BUFF_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RX_BUFF_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x9, x2
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
LBB0_4:
	mov	w8, #4
	stur	w8, [x29, #-76]
	sub	x4, x29, #80
	sub	x5, x29, #76
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #0
	bl	_recvfrom
	mov	x21, x0
	bl	_free_recvbuffs
	sub	x0, x29, #80
	bl	_stoa
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	w0, #4
	bl	_DPRINTF
Lloh13:
	adrp	x8, _packets_ignored@GOTPAGE
Lloh14:
	ldr	x8, [x8, _packets_ignored@GOTPAGEOFF]
Lloh15:
	adrp	x9, _packets_dropped@GOTPAGE
Lloh16:
	ldr	x9, [x9, _packets_dropped@GOTPAGEOFF]
	ldr	x10, [x19, #16]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	sp, x24
LBB0_5:
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.6:
	mov	x0, x21
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w8, #4
	stur	w8, [x29, #-76]
	add	x1, x22, #28
	add	x24, x22, #24
	sub	x5, x29, #76
	mov	x0, x20
	mov	w2, #4
	mov	w3, #0
	mov	x4, x24
	bl	_recvfrom
	mov	x21, x0
	str	w0, [x22]
	cbz	w0, LBB0_18
; %bb.8:
	cmn	w21, #1
	b.ne	LBB0_10
; %bb.9:
Lloh20:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _errno@GOTPAGE
Lloh24:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
	b	LBB0_16
LBB0_10:
	tbnz	w21, #31, LBB0_16
; %bb.11:
	mov	x0, x24
	bl	_stoa
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	w0, #3
	bl	_DPRINTF
Lloh26:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.12:
	mov	x0, x24
	bl	_stoa
	mov	x0, x24
	bl	_PSOCK_ADDR6
	bl	_IN6_IS_ADDR_LOOPBACK
	add	x25, x19, #12
	mov	x0, x25
	bl	_stoa
	mov	x0, x25
	bl	_PSOCK_ADDR6
	bl	_IN6_IS_ADDR_LOOPBACK
	cmp	x0, #0
	cset	w1, eq
	mov	w0, #2
	bl	_DPRINTF
	mov	x0, x24
	bl	_PSOCK_ADDR6
	bl	_IN6_IS_ADDR_LOOPBACK
	cbz	x0, LBB0_14
; %bb.13:
	mov	x0, x25
	bl	_PSOCK_ADDR6
	bl	_IN6_IS_ADDR_LOOPBACK
	cbz	x0, LBB0_19
LBB0_14:
Lloh29:
	adrp	x1, l_.str.8@PAGE
Lloh30:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #2
	bl	_DPRINTF
LBB0_15:
	str	x19, [x22, #16]
	str	w20, [x22, #12]
Lloh31:
	adrp	x8, _receive@GOTPAGE
Lloh32:
	ldr	x8, [x8, _receive@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	stp	w8, w23, [x22, #4]
	mov	x0, x22
	bl	_add_full_recv_buffer
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
Lloh34:
	adrp	x8, _packets_received@GOTPAGE
Lloh35:
	ldr	x8, [x8, _packets_received@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_5
LBB0_16:
Lloh36:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh38:
	ldr	w19, [x8]
	mov	x0, x24
	bl	_stoa
	mov	x2, x0
Lloh39:
	adrp	x1, l_.str.3@PAGE
Lloh40:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_msyslog
	sxtw	x1, w20
	mov	w0, #5
LBB0_17:
	bl	_DPRINTF
LBB0_18:
	mov	x0, x22
	bl	_freerecvbuf
	b	LBB0_5
LBB0_19:
Lloh41:
	adrp	x8, _packets_dropped@GOTPAGE
Lloh42:
	ldr	x8, [x8, _packets_dropped@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh43:
	adrp	x1, l_.str.7@PAGE
Lloh44:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #2
	b	LBB0_17
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_BUFF_SIZE,4,2               ; @RX_BUFF_SIZE
	.comm	_packets_ignored,4,2            ; @packets_ignored
	.comm	_packets_dropped,4,2            ; @packets_dropped
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.comm	_errno,8,3                      ; @errno
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str.3:                               ; @.str.3
	.asciz	"recvfrom(%s) fd=%d: %m"

	.comm	_AF_INET6,8,3                   ; @AF_INET6
l_.str.7:                               ; @.str.7
	.asciz	"DROPPING that packet\n"

l_.str.8:                               ; @.str.8
	.asciz	"processing that packet\n"

	.comm	_receive,4,2                    ; @receive
	.comm	_packets_received,4,2           ; @packets_received
	.comm	_CMSG_BUFSIZE,4,2               ; @CMSG_BUFSIZE
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.no_dead_strip	_read_network_packet
.subsections_via_symbols
