	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rw_thread_init                 ## -- Begin function rw_thread_init
	.p2align	4, 0x90
_rw_thread_init:                        ## @rw_thread_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r15
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rsi, %rax
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	movl	%edi, (%r9)
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_open
	movl	%eax, 4(%rbx)
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.6:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_7
LBB0_4:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_open
	movl	%eax, 8(%rbx)
	cmpl	$-1, %eax
	je	LBB0_5
LBB0_7:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	callq	_pipe2
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movl	-52(%rbp), %eax
	movl	%eax, 12(%rbx)
	movl	-56(%rbp), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, 24(%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_11:
	callq	___stack_chk_fail
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	movl	%r14d, %esi
	callq	_pr_err
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open in_fd (CPU:%d)\n"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
L_.str.1:                               ## @.str.1
	.asciz	"Could not open out_fd (CPU:%d)\n"

	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.2:                               ## @.str.2
	.asciz	"Could not create pipe in rw-thread(%d)\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rw_thread_init                 ; -- Begin function rw_thread_init
	.p2align	2
_rw_thread_init:                        ; @rw_thread_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x5
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x8, x1
	mov	x19, x0
	str	w0, [x5]
Lloh0:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_open
	str	w0, [x20, #4]
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
	cbz	w23, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_open
	str	w0, [x20, #8]
	cmn	w0, #1
	b.eq	LBB0_8
LBB0_4:
Lloh9:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_pipe2
	tbnz	x0, #63, LBB0_7
; %bb.5:
	ldr	d0, [sp, #8]
	rev64.2s	v0, v0
	stur	d0, [x20, #12]
	str	x21, [x20, #24]
	mov	x0, #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
	add	sp, sp, #80
	ret
LBB0_6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	mov	x1, x19
	bl	_pr_err
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open in_fd (CPU:%d)\n"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
l_.str.1:                               ; @.str.1
	.asciz	"Could not open out_fd (CPU:%d)\n"

	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.2:                               ; @.str.2
	.asciz	"Could not create pipe in rw-thread(%d)\n"

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