	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ClosePipeStream                ## -- Begin function ClosePipeStream
	.p2align	4, 0x90
_ClosePipeStream:                       ## @ClosePipeStream
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_numAllocatedDescs@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	movl	%eax, %edi
	callq	_DO_DB
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	_allocatedDescs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	_AllocateDescPipe@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	incq	%rax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	decq	%rax
	cmpq	$1, %rax
	jbe	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rax), %edx
	shlq	$4, %rdx
	cmpq	%rcx, (%rdi,%rdx)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rbx, 8(%rdi,%rdx)
	jne	LBB0_4
## %bb.6:
	addq	%rdx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_FreeDesc                       ## TAILCALL
LBB0_5:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pclose                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ClosePipeStream: Allocated %d"

	.comm	_numAllocatedDescs,4,2          ## @numAllocatedDescs
	.comm	_allocatedDescs,8,3             ## @allocatedDescs
	.comm	_AllocateDescPipe,8,3           ## @AllocateDescPipe
	.comm	_WARNING,4,2                    ## @WARNING
L_.str.1:                               ## @.str.1
	.asciz	"file passed to ClosePipeStream was not obtained from OpenPipeStream"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ClosePipeStream                ; -- Begin function ClosePipeStream
	.p2align	2
_ClosePipeStream:                       ; @ClosePipeStream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _LOG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x20, _numAllocatedDescs@GOTPAGE
Lloh4:
	ldr	x20, [x20, _numAllocatedDescs@GOTPAGEOFF]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	bl	_DO_DB
	ldr	w10, [x20]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.1:
Lloh7:
	adrp	x8, _allocatedDescs@GOTPAGE
Lloh8:
	ldr	x8, [x8, _allocatedDescs@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _AllocateDescPipe@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AllocateDescPipe@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x10, x10, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	x10, x10, #1
	cmp	x10, #1
	b.ls	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w11, w10, #2
	add	x0, x8, w11, uxtw #4
	ldr	x12, [x0]
	cmp	x12, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x8, x11, lsl #4
	ldr	x11, [x11, #8]
	cmp	x11, x19
	b.ne	LBB0_2
; %bb.5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_FreeDesc
LBB0_6:
Lloh13:
	adrp	x8, _WARNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_pclose
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ClosePipeStream: Allocated %d"

	.comm	_numAllocatedDescs,4,2          ; @numAllocatedDescs
	.comm	_allocatedDescs,8,3             ; @allocatedDescs
	.comm	_AllocateDescPipe,8,3           ; @AllocateDescPipe
	.comm	_WARNING,4,2                    ; @WARNING
l_.str.1:                               ; @.str.1
	.asciz	"file passed to ClosePipeStream was not obtained from OpenPipeStream"

.subsections_via_symbols
