	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rw_ctl_loop                    ## -- Begin function rw_ctl_loop
	.p2align	4, 0x90
_rw_ctl_loop:                           ## @rw_ctl_loop
	.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
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_HOST_MSG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_signal_handler@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_signal
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_signal
	movq	_SIGQUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_signal
	movq	_global_sig_receive@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_1
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str.3(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pr_info
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_wait_order
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_read
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%rbx), %eax
	cmpb	$48, %al
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$49, %al
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_global_run_operation@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_cond_wakeup@GOTPCREL(%rip), %rdi
	callq	_pthread_cond_broadcast
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_global_run_operation@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_10
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_MSG_SIZE,4,2              ## @HOST_MSG_SIZE
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.comm	_signal_handler,4,2             ## @signal_handler
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_SIGQUIT,4,2                    ## @SIGQUIT
	.comm	_global_sig_receive,4,2         ## @global_sig_receive
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read data error in ctl thread\n"

	.comm	_global_run_operation,4,2       ## @global_run_operation
	.comm	_cond_wakeup,4,2                ## @cond_wakeup
L_.str.1:                               ## @.str.1
	.asciz	"Wake up all read/write threads\n"

L_.str.2:                               ## @.str.2
	.asciz	"Stop all read/write threads\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid host notification: %s\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rw_ctl_loop                    ; -- Begin function rw_ctl_loop
	.p2align	2
_rw_ctl_loop:                           ; @rw_ctl_loop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _HOST_MSG_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HOST_MSG_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
Lloh8:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x22, _signal_handler@GOTPAGE
Lloh12:
	ldr	x22, [x22, _signal_handler@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_signal
Lloh13:
	adrp	x8, _SIGINT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_signal
Lloh16:
	adrp	x8, _SIGQUIT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SIGQUIT@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_signal
Lloh19:
	adrp	x26, _global_sig_receive@GOTPAGE
Lloh20:
	ldr	x26, [x26, _global_sig_receive@GOTPAGEOFF]
	ldr	w8, [x26]
	cbz	w8, LBB0_3
LBB0_1:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.2:
	mov	x0, #0
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh24:
	adrp	x27, _global_run_operation@GOTPAGE
Lloh25:
	ldr	x27, [x27, _global_run_operation@GOTPAGEOFF]
Lloh26:
	adrp	x22, l_.str.2@PAGE
Lloh27:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	w28, #1
Lloh28:
	adrp	x23, _cond_wakeup@GOTPAGE
Lloh29:
	ldr	x23, [x23, _cond_wakeup@GOTPAGEOFF]
Lloh30:
	adrp	x24, l_.str.1@PAGE
Lloh31:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh32:
	adrp	x25, l_.str.3@PAGE
Lloh33:
	add	x25, x25, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	mov	x1, x21
	bl	_pr_info
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x26]
	cbnz	w8, LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_wait_order
	tbnz	w0, #31, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_read
	tbnz	w0, #31, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #2
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x21]
	cmp	w8, #48
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #49
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w28, [x27]
	mov	x0, x23
	bl	_pthread_cond_broadcast
	mov	x0, x24
	bl	_pr_debug
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [x27]
	mov	x0, x22
	bl	_pr_debug
	b	LBB0_5
LBB0_13:
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh36:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_exit
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_MSG_SIZE,4,2              ; @HOST_MSG_SIZE
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.comm	_signal_handler,4,2             ; @signal_handler
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_SIGQUIT,4,2                    ; @SIGQUIT
	.comm	_global_sig_receive,4,2         ; @global_sig_receive
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read data error in ctl thread\n"

	.comm	_global_run_operation,4,2       ; @global_run_operation
	.comm	_cond_wakeup,4,2                ; @cond_wakeup
l_.str.1:                               ; @.str.1
	.asciz	"Wake up all read/write threads\n"

l_.str.2:                               ; @.str.2
	.asciz	"Stop all read/write threads\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid host notification: %s\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
.subsections_via_symbols
