	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_pipe2                      ## -- Begin function sys_pipe2
	.p2align	4, 0x90
_sys_pipe2:                             ## @sys_pipe2
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_STRACE
	movq	_O_CLOEXEC_@GOTPCREL(%rip), %rax
	movq	_O_NONBLOCK_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	testl	%ebx, %ecx
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_12
LBB0_2:
	leaq	-40(%rbp), %rdi
	callq	_pipe
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	-40(%rbp), %edi
	movl	%ebx, %esi
	callq	_pipe_f_create
	movl	%eax, %r15d
	movl	%eax, -48(%rbp)
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	movl	-36(%rbp), %edi
	movl	%ebx, %esi
	callq	_pipe_f_create
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-48(%rbp), %rsi
	movl	%r14d, %edi
	callq	_user_put
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	-44(%rbp), %edi
	callq	_f_close
	movl	-48(%rbp), %r15d
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %r15d
	jmp	LBB0_12
LBB0_6:
	movl	%eax, %ebx
LBB0_10:
	movl	%r15d, %edi
	callq	_f_close
	movl	%ebx, %r15d
LBB0_11:
	movl	-40(%rbp), %edi
	callq	_close
	movl	-36(%rbp), %edi
	callq	_close
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	leaq	L_.str.2(%rip), %rdi
	callq	_STRACE
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipe2(%#x, %#x)"

	.comm	_O_CLOEXEC_,4,2                 ## @O_CLOEXEC_
	.comm	_O_NONBLOCK_,4,2                ## @O_NONBLOCK_
L_.str.1:                               ## @.str.1
	.asciz	"unsupported pipe2 flags"

	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	__EFAULT,4,2                    ## @_EFAULT
L_.str.2:                               ## @.str.2
	.asciz	" [%d %d]"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_pipe2                      ; -- Begin function sys_pipe2
	.p2align	2
_sys_pipe2:                             ; @sys_pipe2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_STRACE
Lloh5:
	adrp	x8, _O_CLOEXEC_@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_CLOEXEC_@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _O_NONBLOCK_@GOTPAGE
Lloh9:
	ldr	x9, [x9, _O_NONBLOCK_@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w21, w8
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
Lloh13:
	adrp	x8, __EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
	b	LBB0_11
LBB0_2:
	add	x0, sp, #16
	bl	_pipe
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w0, [sp, #16]
	mov	x1, x21
	bl	_pipe_f_create
	mov	x19, x0
	str	w0, [sp, #8]
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	w0, [sp, #20]
	mov	x1, x21
	bl	_pipe_f_create
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_8
; %bb.5:
Lloh16:
	adrp	x8, __EFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_user_put
	cbz	x0, LBB0_13
; %bb.6:
	ldr	w0, [sp, #12]
	bl	_f_close
	ldr	w19, [sp, #8]
	b	LBB0_9
LBB0_7:
	mov	x19, x0
	b	LBB0_11
LBB0_8:
	mov	x21, x0
LBB0_9:
	mov	x0, x19
	bl	_f_close
	mov	x19, x21
LBB0_10:
	ldr	w0, [sp, #16]
	bl	_close
	ldr	w0, [sp, #20]
	bl	_close
LBB0_11:
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
LBB0_13:
	ldp	w1, w2, [sp, #8]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_STRACE
	mov	w19, #0
	b	LBB0_11
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipe2(%#x, %#x)"

	.comm	_O_CLOEXEC_,4,2                 ; @O_CLOEXEC_
	.comm	_O_NONBLOCK_,4,2                ; @O_NONBLOCK_
l_.str.1:                               ; @.str.1
	.asciz	"unsupported pipe2 flags"

	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	__EFAULT,4,2                    ; @_EFAULT
l_.str.2:                               ; @.str.2
	.asciz	" [%d %d]"

.subsections_via_symbols
