	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_pipe
_test_pipe:                             ## @test_pipe
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	%edi, -48(%rbp)
	movl	%esi, -44(%rbp)
	callq	_MIN
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$2, %ebx
	movslq	%ebx, %r14
	leaq	-40(%rbp), %rdi
	callq	_do_socketpair
	movl	-40(%rbp), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_SO_SNDBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movl	$4, %r8d
	callq	_setsockopt
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movl	-36(%rbp), %edi
	movl	(%r15), %esi
	movq	_SO_RCVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	$4, %r8d
	callq	_setsockopt
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movl	-48(%rbp), %edi
	movl	-44(%rbp), %esi
	callq	_MAX
	shll	$3, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rdx
	orq	%r14, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%r14
	jmp	LBB0_3
LBB0_1:
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	movq	%r14, -88(%rbp)
	movl	%eax, -80(%rbp)
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movl	%ecx, -76(%rbp)
	movq	%r14, -72(%rbp)
	movl	%eax, -64(%rbp)
	movl	%edx, -60(%rbp)
	movq	_test_pipe_writer@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rdi
	leaq	-88(%rbp), %rcx
	xorl	%esi, %esi
	callq	_pthread_create
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_usleep
	movq	_test_pipe_reader@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rdi
	leaq	-72(%rbp), %rcx
	xorl	%esi, %esi
	callq	_pthread_create
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movl	-56(%rbp), %edi
	xorl	%esi, %esi
	callq	_pthread_join
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movl	-52(%rbp), %edi
	xorl	%esi, %esi
	callq	_pthread_join
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movl	-40(%rbp), %edi
	callq	_close
	movl	-36(%rbp), %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_SNDBUF,4,2                  ## @SO_SNDBUF
	.comm	_SO_RCVBUF,4,2                  ## @SO_RCVBUF
	.comm	_test_pipe_writer,4,2           ## @test_pipe_writer
	.comm	_test_pipe_reader,4,2           ## @test_pipe_reader
	.no_dead_strip	_test_pipe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_pipe
_test_pipe:                             ; @test_pipe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	stur	w0, [x29, #-36]
	str	w1, [sp, #40]
	bl	_MIN
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	sbfx	x19, x8, #2, #30
	sub	x0, x29, #32
	bl	_do_socketpair
	ldur	w0, [x29, #-32]
Lloh3:
	adrp	x20, _SOL_SOCKET@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _SO_SNDBUF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SO_SNDBUF@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	sub	x3, x29, #36
	mov	w4, #4
	bl	_setsockopt
	mov	x1, x0
	mov	w0, #0
	bl	_ATF_REQUIRE_EQ
	ldur	w0, [x29, #-28]
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _SO_RCVBUF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SO_RCVBUF@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x3, sp, #40
	mov	w4, #4
	bl	_setsockopt
	mov	x1, x0
	mov	w0, #0
	bl	_ATF_REQUIRE_EQ
	ldur	w0, [x29, #-36]
	ldr	w1, [sp, #40]
	bl	_MAX
	lsl	w8, w0, #3
	sxtw	x8, w8
	udiv	x8, x8, x19
	str	x19, [sp, #24]
	ldp	w9, w10, [x29, #-32]
	stp	w8, w9, [sp, #32]
	str	x19, [sp, #8]
	stp	w8, w10, [sp, #16]
Lloh11:
	adrp	x8, _test_pipe_writer@GOTPAGE
Lloh12:
	ldr	x8, [x8, _test_pipe_writer@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x0, sp, #4
	add	x3, sp, #24
	mov	x1, #0
	bl	_pthread_create
	mov	x1, x0
	mov	w0, #0
	bl	_ATF_REQUIRE_EQ
	mov	w0, #1000
	bl	_usleep
Lloh14:
	adrp	x8, _test_pipe_reader@GOTPAGE
Lloh15:
	ldr	x8, [x8, _test_pipe_reader@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, sp
	add	x3, sp, #8
	mov	x1, #0
	bl	_pthread_create
	mov	x1, x0
	mov	w0, #0
	bl	_ATF_REQUIRE_EQ
	ldr	w0, [sp, #4]
	mov	x1, #0
	bl	_pthread_join
	mov	x1, x0
	mov	w0, #0
	bl	_ATF_REQUIRE_EQ
	ldr	w0, [sp]
	mov	x1, #0
	bl	_pthread_join
	mov	x1, x0
	mov	w0, #0
	bl	_ATF_REQUIRE_EQ
	ldur	w0, [x29, #-32]
	bl	_close
	ldur	w0, [x29, #-28]
	bl	_close
	ldur	x8, [x29, #-24]
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_2
; %bb.1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_SNDBUF,4,2                  ; @SO_SNDBUF
	.comm	_SO_RCVBUF,4,2                  ; @SO_RCVBUF
	.comm	_test_pipe_writer,4,2           ; @test_pipe_writer
	.comm	_test_pipe_reader,4,2           ; @test_pipe_reader
	.no_dead_strip	_test_pipe
.subsections_via_symbols
