	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_recv_worker                    ## -- Begin function recv_worker
	.p2align	4, 0x90
_recv_worker:                           ## @recv_worker
	.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	_RECV_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_malloc
	movq	%rax, %r14
	movq	_sd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	decl	%edx
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	movq	_mutex@GOTPCREL(%rip), %rbx
	movq	_qsize@GOTPCREL(%rip), %r13
	movq	_QUEUE_SIZE@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_queue@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	leal	1(%r12), %edx
	movq	%r14, %rsi
	callq	_memcpy
	addq	%r12, (%r13)
	movq	%rbx, %rdi
	callq	_mtx_unlock
	movq	_sd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RECV_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	decl	%edx
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%eax, %r12d
	movb	$0, (%r14,%r12)
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	(%r13), %rdi
	leaq	(%rdi,%r12), %rax
	cmpq	(%r15), %rax
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	callq	_mtx_unlock
	xorl	%edi, %edi
	callq	_sleep
	jmp	LBB0_4
LBB0_6:
	movq	_running@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.9:
	movq	%r14, %rdi
	callq	_free
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	_recv_worker.cold.1
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function recv_worker.cold.1
_recv_worker.cold.1:                    ## @recv_worker.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_RECV_SIZE,4,2                  ## @RECV_SIZE
	.comm	_sd,4,2                         ## @sd
	.comm	_running,8,3                    ## @running
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"recv"

	.comm	_mutex,4,2                      ## @mutex
	.comm	_qsize,8,3                      ## @qsize
	.comm	_QUEUE_SIZE,8,3                 ## @QUEUE_SIZE
	.comm	_queue,8,3                      ## @queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_recv_worker                    ; -- Begin function recv_worker
	.p2align	2
_recv_worker:                           ; @recv_worker
	.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
Lloh0:
	adrp	x21, _RECV_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RECV_SIZE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_malloc
	mov	x19, x0
Lloh2:
	adrp	x22, _sd@GOTPAGE
Lloh3:
	ldr	x22, [x22, _sd@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w8, [x21]
	sub	w2, w8, #1
	mov	x1, x19
	mov	w3, #0
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
Lloh4:
	adrp	x20, _mutex@GOTPAGE
Lloh5:
	ldr	x20, [x20, _mutex@GOTPAGEOFF]
Lloh6:
	adrp	x23, _qsize@GOTPAGE
Lloh7:
	ldr	x23, [x23, _qsize@GOTPAGEOFF]
Lloh8:
	adrp	x24, _QUEUE_SIZE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _QUEUE_SIZE@GOTPAGEOFF]
Lloh10:
	adrp	x25, _queue@GOTPAGE
Lloh11:
	ldr	x25, [x25, _queue@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x25]
	add	x0, x9, x8
	add	w2, w26, #1
	mov	x1, x19
	bl	_memcpy
	ldr	x8, [x23]
	add	x8, x8, x26
	str	x8, [x23]
	mov	x0, x20
	bl	_mtx_unlock
	ldr	w0, [x22]
	ldr	w8, [x21]
	sub	w2, w8, #1
	mov	x1, x19
	mov	w3, #0
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	w26, w0
	strb	wzr, [x19, x26]
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_mtx_lock
	ldr	x8, [x23]
	ldr	x9, [x24]
	add	x10, x8, x26
	cmp	x10, x9
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x0, x20
	bl	_mtx_unlock
	mov	w0, #0
	bl	_sleep
	b	LBB0_4
LBB0_6:
Lloh12:
	adrp	x8, _running@GOTPAGE
Lloh13:
	ldr	x8, [x8, _running@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbnz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_free
	mov	w0, #0
	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_8:
	bl	_recv_worker.cold.1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function recv_worker.cold.1
_recv_worker.cold.1:                    ; @recv_worker.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RECV_SIZE,4,2                  ; @RECV_SIZE
	.comm	_sd,4,2                         ; @sd
	.comm	_running,8,3                    ; @running
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"recv"

	.comm	_mutex,4,2                      ; @mutex
	.comm	_qsize,8,3                      ; @qsize
	.comm	_QUEUE_SIZE,8,3                 ; @QUEUE_SIZE
	.comm	_queue,8,3                      ; @queue
.subsections_via_symbols
