	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_cloexec
_check_cloexec:                         ## @check_cloexec
	.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	%rsi, %r14
	callq	_fileno
	movq	_F_GETFD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_fcntl
	movl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_ATF_CHECK_MSG
	cmpl	$-1, %ebx
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	$101, %esi
	callq	_strchr
	testq	%rax, %rax
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	cmovel	%r15d, %ecx
	andl	%ebx, %eax
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ATF_CHECK_MSG                  ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_F_GETFD,4,2                    ## @F_GETFD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fcntl(F_GETFD) failed; errno=%d"

	.comm	_errno,4,2                      ## @errno
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
L_.str.1:                               ## @.str.1
	.asciz	"bad cloexec flag; %d != %d"

	.no_dead_strip	_check_cloexec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_cloexec
_check_cloexec:                         ; @check_cloexec
	.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	x20, x1
	bl	_fileno
Lloh0:
	adrp	x8, _F_GETFD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F_GETFD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fcntl
	mov	x19, x0
	cmn	w0, #1
	cset	w0, ne
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ATF_CHECK_MSG
	cmn	w19, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #101
	bl	_strchr
Lloh8:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w9, wzr, w8, eq
	and	w8, w8, w19
	cmp	w8, w9
	cset	w0, eq
	str	x9, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_ATF_CHECK_MSG
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_F_GETFD,4,2                    ; @F_GETFD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fcntl(F_GETFD) failed; errno=%d"

	.comm	_errno,4,2                      ; @errno
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
l_.str.1:                               ; @.str.1
	.asciz	"bad cloexec flag; %d != %d"

	.no_dead_strip	_check_cloexec
.subsections_via_symbols
