	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_is_fd_valid                    ## -- Begin function is_fd_valid
	.p2align	4, 0x90
_is_fd_valid:                           ## @is_fd_valid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	testl	%edi, %edi
	jle	LBB0_3
## %bb.1:
	movq	_MAX_OPEN_FILES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%edi, %ecx
	js	LBB0_3
## %bb.2:
	movq	___ps2_fdmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	%ecx, %ecx
	xorl	%eax, %eax
	cmpq	$0, (%rdx,%rcx,8)
	setne	%al
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_OPEN_FILES,4,2             ## @MAX_OPEN_FILES
	.comm	___ps2_fdmap,8,3                ## @__ps2_fdmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_is_fd_valid                    ; -- Begin function is_fd_valid
	.p2align	2
_is_fd_valid:                           ; @is_fd_valid
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	mov	w0, #0
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _MAX_OPEN_FILES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_OPEN_FILES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w8, w9, w8
	tbnz	w8, #31, LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, ___ps2_fdmap@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___ps2_fdmap@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x8, [x9, w8, uxtw #3]
	cmp	x8, #0
	cset	w0, ne
LBB0_3:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_OPEN_FILES,4,2             ; @MAX_OPEN_FILES
	.comm	___ps2_fdmap,8,3                ; @__ps2_fdmap
.subsections_via_symbols
