	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fpm_stdio_prepare_pipes        ## -- Begin function fpm_stdio_prepare_pipes
	.p2align	4, 0x90
_fpm_stdio_prepare_pipes:               ## @fpm_stdio_prepare_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_fd_stdout@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	_fd_stderr@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	(%r14), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_fd_set_blocked
	testq	%rax, %rax
	js	LBB0_8
## %bb.7:
	movq	(%r15), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_fd_set_blocked
	testq	%rax, %rax
	jns	LBB0_11
LBB0_8:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_zlog
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_close
	movq	(%r14), %rax
	movl	4(%rax), %edi
	callq	_close
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_close
	movq	(%r15), %rax
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_zlog
	jmp	LBB0_10
LBB0_5:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_zlog
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_close
	movq	(%r14), %rax
LBB0_9:
	movl	4(%rax), %edi
	callq	_close
LBB0_10:
	movl	$-1, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fd_stdout,8,3                  ## @fd_stdout
	.comm	_ZLOG_SYSERROR,4,2              ## @ZLOG_SYSERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to prepare the stdout pipe"

	.comm	_fd_stderr,8,3                  ## @fd_stderr
L_.str.1:                               ## @.str.1
	.asciz	"failed to prepare the stderr pipe"

L_.str.2:                               ## @.str.2
	.asciz	"failed to unblock pipes"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fpm_stdio_prepare_pipes        ; -- Begin function fpm_stdio_prepare_pipes
	.p2align	2
_fpm_stdio_prepare_pipes:               ; @fpm_stdio_prepare_pipes
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.1:
Lloh0:
	adrp	x19, _fd_stdout@GOTPAGE
Lloh1:
	ldr	x19, [x19, _fd_stdout@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_pipe
	tbnz	x0, #63, LBB0_7
; %bb.2:
Lloh2:
	adrp	x20, _fd_stderr@GOTPAGE
Lloh3:
	ldr	x20, [x20, _fd_stderr@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_pipe
	tbnz	x0, #63, LBB0_8
; %bb.3:
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_fd_set_blocked
	tbnz	x0, #63, LBB0_5
; %bb.4:
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_fd_set_blocked
	mov	x8, x0
	mov	w0, #0
	tbz	x8, #63, LBB0_11
LBB0_5:
Lloh4:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_zlog
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_close
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_close
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_close
	ldr	x8, [x20]
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	b	LBB0_11
LBB0_7:
Lloh9:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_zlog
	b	LBB0_10
LBB0_8:
Lloh14:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_zlog
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_close
	ldr	x8, [x19]
LBB0_9:
	ldr	w0, [x8, #4]
	bl	_close
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_fd_stdout,8,3                  ; @fd_stdout
	.comm	_ZLOG_SYSERROR,4,2              ; @ZLOG_SYSERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to prepare the stdout pipe"

	.comm	_fd_stderr,8,3                  ; @fd_stderr
l_.str.1:                               ; @.str.1
	.asciz	"failed to prepare the stderr pipe"

l_.str.2:                               ; @.str.2
	.asciz	"failed to unblock pipes"

.subsections_via_symbols
