	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fd_open
_fd_open:                               ## @fd_open
	.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	%r8, %r14
	movq	%rcx, %rbx
	cmpq	$0, 24(%rcx)
	je	LBB0_4
## %bb.1:
	movl	(%rbx), %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%rbx), %edi
	leaq	16(%rbx), %rsi
	callq	_tcgetattr
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_CATCH_EINTR
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.3:
	movl	(%rbx), %edi
	callq	_raw
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movq	8(%rbx), %rdi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	movq	8(%rbx), %rax
	movq	%rax, (%r14)
	movl	(%rbx), %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.no_dead_strip	_fd_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fd_open
_fd_open:                               ; @fd_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x4
	mov	x19, x3
	ldr	x8, [x3, #24]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w0, [x19]
	bl	_isatty
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x19
	ldr	w0, [x1], #16
	bl	_tcgetattr
	mov	x21, x0
	bl	_CATCH_EINTR
	cbnz	w21, LBB0_5
; %bb.3:
	ldr	w0, [x19]
	bl	_raw
	mov	x21, x0
	cbnz	w0, LBB0_5
LBB0_4:
	ldr	x0, [x19, #8]
	ldr	w2, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	ldr	x8, [x19, #8]
	str	x8, [x20]
	ldr	w21, [x19]
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.no_dead_strip	_fd_open
.subsections_via_symbols
