	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdes_get
_pdes_get:                              ## @pdes_get
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rdi
	movl	$101, %esi
	callq	_strchr
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movq	(%rbx), %rdi
	movl	$43, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	movq	_AF_LOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_socketpair
	testq	%rax, %rax
	js	LBB0_10
## %bb.4:
	movl	(%r14), %edi
	movq	_F_SETFD@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%eax, %eax
	callq	_fcntl
	movl	4(%r14), %edi
	movl	(%r15), %esi
	movl	(%rbx), %edx
	jmp	LBB0_7
LBB0_5:
	movq	(%rbx), %rdi
	movl	$114, %esi
	callq	_strrchr
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, (%rbx)
	movq	%r14, %rdi
	callq	_pipe
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.6:
	movl	(%r14), %ebx
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_F_GETFL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_fcntl
	orl	%r15d, %eax
	movl	%ebx, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fcntl
	movl	4(%r14), %ebx
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%r13), %esi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_fcntl
	orl	%eax, %r15d
	movl	%ebx, %edi
	movl	%r12d, %esi
	movl	%r15d, %edx
LBB0_7:
	xorl	%eax, %eax
	callq	_fcntl
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movl	(%r14), %edi
	callq	_close
	movl	4(%r14), %edi
	callq	_close
	movl	%ebx, (%r15)
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r+"

	.comm	_AF_LOCAL,4,2                   ## @AF_LOCAL
	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"w"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_errno,4,2                      ## @errno
	.comm	_SOCK_CLOEXEC,4,2               ## @SOCK_CLOEXEC
	.no_dead_strip	_pdes_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdes_get
_pdes_get:                              ; @pdes_get
	.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, x1
	mov	x19, x0
	ldr	x0, [x1]
	mov	w1, #101
	bl	_strchr
Lloh0:
	adrp	x8, _O_CLOEXEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_CLOEXEC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w22, wzr, w8, eq
	ldr	x0, [x20]
	mov	w1, #43
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
Lloh8:
	adrp	x8, _AF_LOCAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AF_LOCAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w2, #0
	mov	x3, x19
	bl	_socketpair
	tbnz	x0, #63, LBB0_7
; %bb.2:
	ldr	w0, [x19]
Lloh11:
	adrp	x20, _F_SETFD@GOTPAGE
Lloh12:
	ldr	x20, [x20, _F_SETFD@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh13:
	adrp	x21, _FD_CLOEXEC@GOTPAGE
Lloh14:
	ldr	x21, [x21, _FD_CLOEXEC@GOTPAGEOFF]
	ldr	w8, [x21]
	str	x8, [sp]
	bl	_fcntl
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
	ldr	w8, [x21]
	str	x8, [sp]
	b	LBB0_5
LBB0_3:
	ldr	x0, [x20]
	mov	w1, #114
	bl	_strrchr
Lloh15:
	adrp	x8, l_.str.1@PAGE
Lloh16:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh17:
	adrp	x9, l_.str.2@PAGE
Lloh18:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x8, x9, x8, eq
	str	x8, [x20]
	mov	x0, x19
	bl	_pipe
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	ldr	w20, [x19]
Lloh19:
	adrp	x23, _F_SETFL@GOTPAGE
Lloh20:
	ldr	x23, [x23, _F_SETFL@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh21:
	adrp	x24, _F_GETFL@GOTPAGE
Lloh22:
	ldr	x24, [x24, _F_GETFL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_fcntl
	orr	w8, w0, w22
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x21
	bl	_fcntl
	ldr	w20, [x19, #4]
	ldr	w21, [x23]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_fcntl
	orr	w8, w0, w22
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x21
LBB0_5:
	bl	_fcntl
	mov	w0, #4
	bl	_malloc
	cbnz	x0, LBB0_8
; %bb.6:
Lloh23:
	adrp	x20, _errno@GOTPAGE
Lloh24:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
	ldr	w0, [x19]
	bl	_close
	ldr	w0, [x19, #4]
	bl	_close
	mov	x0, #0
	str	w21, [x20]
	b	LBB0_8
LBB0_7:
	mov	x0, #0
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r+"

	.comm	_AF_LOCAL,4,2                   ; @AF_LOCAL
	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"w"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_errno,4,2                      ; @errno
	.comm	_SOCK_CLOEXEC,4,2               ; @SOCK_CLOEXEC
	.no_dead_strip	_pdes_get
.subsections_via_symbols
