	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function highest_fd
_highest_fd:                            ## @highest_fd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_getpid
	leaq	-20(%rbp), %rsi
	movl	%eax, %edi
	callq	_kinfo_getfile
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_fail_err
LBB0_2:
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.3:
	cmpl	$8, %eax
	jae	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_5:
	movl	%eax, %ecx
	andl	$-8, %ecx
	movd	%ebx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rcx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %edx
	andl	$3, %edx
	cmpq	$24, %rsi
	jae	LBB0_7
## %bb.6:
	xorl	%esi, %esi
	movdqa	%xmm0, %xmm1
	jmp	LBB0_9
LBB0_7:
	andq	$-4, %rdi
	xorl	%esi, %esi
	movdqa	%xmm0, %xmm1
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r14,%rsi,4), %xmm2
	pmaxsd	%xmm0, %xmm2
	movdqu	16(%r14,%rsi,4), %xmm0
	pmaxsd	%xmm1, %xmm0
	movdqu	32(%r14,%rsi,4), %xmm1
	movdqu	48(%r14,%rsi,4), %xmm3
	movdqu	64(%r14,%rsi,4), %xmm4
	pmaxsd	%xmm1, %xmm4
	pmaxsd	%xmm2, %xmm4
	movdqu	80(%r14,%rsi,4), %xmm2
	pmaxsd	%xmm3, %xmm2
	pmaxsd	%xmm0, %xmm2
	movdqu	96(%r14,%rsi,4), %xmm0
	pmaxsd	%xmm4, %xmm0
	movdqu	112(%r14,%rsi,4), %xmm1
	pmaxsd	%xmm2, %xmm1
	addq	$32, %rsi
	addq	$-4, %rdi
	jne	LBB0_8
LBB0_9:
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.10:
	leaq	(%r14,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	pmaxsd	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	pmaxsd	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %rdx
	jne	LBB0_11
LBB0_12:
	pmaxsd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	pmaxsd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	pmaxsd	%xmm1, %xmm0
	movd	%xmm0, %ebx
	cmpq	%rax, %rcx
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rcx,4), %edx
	cmpl	%ebx, %edx
	cmovgl	%edx, %ebx
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_13
LBB0_14:
	movq	%r14, %rdi
	callq	_free
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kinfo_getfile"

	.comm	_INT_MIN,4,2                    ## @INT_MIN
	.no_dead_strip	_highest_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function highest_fd
_highest_fd:                            ; @highest_fd
	.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
	bl	_getpid
	add	x1, sp, #12
	bl	_kinfo_getfile
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fail_err
LBB0_2:
Lloh2:
	adrp	x8, _INT_MIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_MIN@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.3:
	cmp	w8, #16
	b.hs	LBB0_5
; %bb.4:
	mov	x9, #0
	b	LBB0_8
LBB0_5:
	and	x9, x8, #0xfffffff0
	add	x10, x19, #32
	dup.4s	v0, w20
	mov	x11, x9
	mov.16b	v1, v0
	mov.16b	v2, v0
	mov.16b	v3, v0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x10, #-32]
	ldp	q6, q7, [x10], #64
	smax.4s	v0, v4, v0
	smax.4s	v1, v5, v1
	smax.4s	v2, v6, v2
	smax.4s	v3, v7, v3
	subs	x11, x11, #16
	b.ne	LBB0_6
; %bb.7:
	smax.4s	v0, v0, v1
	smax.4s	v0, v0, v2
	smax.4s	v0, v0, v3
	smaxv.4s	s0, v0
	fmov	w20, s0
	cmp	x9, x8
	b.eq	LBB0_10
LBB0_8:
	add	x10, x19, x9, lsl #2
	sub	x8, x8, x9
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x10], #4
	cmp	w9, w20
	csel	w20, w9, w20, gt
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kinfo_getfile"

	.comm	_INT_MIN,4,2                    ; @INT_MIN
	.no_dead_strip	_highest_fd
.subsections_via_symbols
