	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function allocate_pipes
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
LCPI0_2:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
LCPI0_3:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_allocate_pipes:                        ## @allocate_pipes
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movslq	%ecx, %rdi
	callq	_DE_ACT
	cmpq	$0, 16(%r12)
	je	LBB0_1
## %bb.14:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_1:
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	jle	LBB0_12
## %bb.2:
	movl	$0, %eax
	cmpl	$8, %r15d
	jb	LBB0_10
## %bb.3:
	movl	%r15d, %eax
	andl	$-8, %eax
	movd	%ebx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leal	-8(%rax), %edx
	movl	%edx, %ecx
	shrl	$3, %ecx
	incl	%ecx
	testl	%edx, %edx
	je	LBB0_4
## %bb.5:
	movl	%ecx, %edx
	andl	$-2, %edx
	leal	4(%rbx), %esi
	movd	%esi, %xmm1
	pshufd	$0, %xmm1, %xmm7                ## xmm7 = xmm1[0,0,0,0]
	movdqa	LCPI0_0(%rip), %xmm6            ## xmm6 = [0,1,2,3]
	pxor	%xmm1, %xmm1
	movdqa	LCPI0_1(%rip), %xmm5            ## xmm5 = [1065353216,1065353216,1065353216,1065353216]
	movdqa	LCPI0_2(%rip), %xmm8            ## xmm8 = [8,8,8,8]
	movdqa	LCPI0_3(%rip), %xmm9            ## xmm9 = [16,16,16,16]
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm6, %xmm2
	paddd	%xmm0, %xmm2
	movdqa	%xmm7, %xmm4
	paddd	%xmm6, %xmm4
	pslld	$23, %xmm2
	paddd	%xmm5, %xmm2
	cvttps2dq	%xmm2, %xmm2
	por	%xmm1, %xmm2
	pslld	$23, %xmm4
	paddd	%xmm5, %xmm4
	cvttps2dq	%xmm4, %xmm4
	por	%xmm3, %xmm4
	movdqa	%xmm6, %xmm1
	paddd	%xmm8, %xmm1
	movdqa	%xmm7, %xmm3
	paddd	%xmm1, %xmm3
	paddd	%xmm0, %xmm1
	pslld	$23, %xmm1
	paddd	%xmm5, %xmm1
	cvttps2dq	%xmm1, %xmm1
	por	%xmm2, %xmm1
	pslld	$23, %xmm3
	paddd	%xmm5, %xmm3
	cvttps2dq	%xmm3, %xmm3
	por	%xmm4, %xmm3
	paddd	%xmm9, %xmm6
	addl	$-2, %edx
	jne	LBB0_6
## %bb.7:
	testb	$1, %cl
	je	LBB0_9
LBB0_8:
	paddd	%xmm6, %xmm0
	leal	4(%rbx), %ecx
	movd	%ecx, %xmm2
	pshufd	$0, %xmm2, %xmm2                ## xmm2 = xmm2[0,0,0,0]
	paddd	%xmm6, %xmm2
	pslld	$23, %xmm0
	movdqa	LCPI0_1(%rip), %xmm4            ## xmm4 = [1065353216,1065353216,1065353216,1065353216]
	paddd	%xmm4, %xmm0
	cvttps2dq	%xmm0, %xmm0
	por	%xmm0, %xmm1
	pslld	$23, %xmm2
	paddd	%xmm4, %xmm2
	cvttps2dq	%xmm2, %xmm0
	por	%xmm0, %xmm3
LBB0_9:
	por	%xmm3, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	por	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	por	%xmm0, %xmm1
	movd	%xmm1, %ecx
	cmpl	%r15d, %eax
	je	LBB0_12
LBB0_10:
	movl	%r15d, %edx
	subl	%eax, %edx
	addl	%ebx, %eax
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	btsl	%eax, %ecx
	incl	%eax
	decl	%edx
	jne	LBB0_11
LBB0_12:
	movl	(%r12), %eax
	testl	%ecx, %eax
	je	LBB0_16
## %bb.13:
	leaq	L_.str.1(%rip), %rdi
	callq	_DE_ACT
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	8(%r12), %rdx
	movq	(%rdx), %rdx
	movslq	%ebx, %rsi
	orl	%ecx, %eax
	movl	%eax, (%r12)
	orl	%ecx, 4(%r12)
	leaq	(%rdx,%rsi,8), %rax
	movl	%ebx, (%r14)
	movl	%r15d, 4(%r14)
	movq	_PIPE_STATE_STOPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14)
	movq	%rax, 8(%r14)
	movq	$0, (%rdx,%rsi,8)
	leaq	L_.str.2(%rip), %rdi
	callq	_DE_ACT
	jmp	LBB0_17
LBB0_4:
	movdqa	LCPI0_0(%rip), %xmm6            ## xmm6 = [0,1,2,3]
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	testb	$1, %cl
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"allocate_pipes: channel already open\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_PIPE_STATE_STOPPED,4,2         ## @PIPE_STATE_STOPPED
L_.str.2:                               ## @.str.2
	.asciz	"allocate_pipes: ok\n"

	.no_dead_strip	_allocate_pipes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function allocate_pipes
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_allocate_pipes:                        ; @allocate_pipes
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	sxtw	x0, w21
	bl	_DE_ACT
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_2:
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.3:
	cmp	w21, #16
	b.hs	LBB0_6
; %bb.4:
	mov	w9, #0
	mov	w8, #0
	b	LBB0_9
LBB0_5:
	mov	w9, #0
	b	LBB0_11
LBB0_6:
	and	w8, w21, #0xfffffff0
	dup.4s	v0, w19
	add	w9, w19, #4
	dup.4s	v1, w9
	add	w9, w19, #8
	dup.4s	v2, w9
	add	w9, w19, #12
	dup.4s	v4, w9
Lloh2:
	adrp	x9, lCPI0_0@PAGE
Lloh3:
	ldr	q5, [x9, lCPI0_0@PAGEOFF]
	movi.2d	v3, #0000000000000000
	movi.4s	v6, #1
	movi.4s	v7, #16
	mov	x9, x8
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
	movi.2d	v18, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v19, v5, v0
	add.4s	v20, v1, v5
	add.4s	v21, v2, v5
	add.4s	v22, v4, v5
	ushl.4s	v19, v6, v19
	ushl.4s	v20, v6, v20
	ushl.4s	v21, v6, v21
	ushl.4s	v22, v6, v22
	orr.16b	v3, v19, v3
	orr.16b	v16, v20, v16
	orr.16b	v17, v21, v17
	orr.16b	v18, v22, v18
	add.4s	v5, v5, v7
	subs	w9, w9, #16
	b.ne	LBB0_7
; %bb.8:
	orr.16b	v0, v16, v3
	orr.16b	v0, v17, v0
	orr.16b	v0, v18, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	w9, s0
	mov.s	w10, v0[1]
	orr	w9, w9, w10
	cmp	w8, w21
	b.eq	LBB0_11
LBB0_9:
	sub	w10, w21, w8
	add	w8, w8, w19
	mov	w11, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsl	w12, w11, w8
	orr	w9, w12, w9
	add	w8, w8, #1
	subs	w10, w10, #1
	b.ne	LBB0_10
LBB0_11:
	ldr	w8, [x22]
	tst	w8, w9
	b.eq	LBB0_15
; %bb.12:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DE_ACT
Lloh6:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
	ldr	x10, [x22, #8]
	ldr	x10, [x10]
	sbfiz	x11, x19, #3, #32
	orr	w8, w8, w9
	ldr	w12, [x22, #4]
	orr	w9, w12, w9
	add	x12, x10, x11
	stp	w8, w9, [x22]
Lloh8:
	adrp	x8, _PIPE_STATE_STOPPED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PIPE_STATE_STOPPED@GOTPAGEOFF]
	stp	w19, w21, [x20]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	str	x12, [x20, #8]
	str	xzr, [x10, x11]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DE_ACT
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"allocate_pipes: channel already open\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_PIPE_STATE_STOPPED,4,2         ; @PIPE_STATE_STOPPED
l_.str.2:                               ; @.str.2
	.asciz	"allocate_pipes: ok\n"

	.no_dead_strip	_allocate_pipes
.subsections_via_symbols
