	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_GetFreePing                 ## -- Begin function CL_GetFreePing
	.p2align	4, 0x90
_CL_GetFreePing:                        ## @CL_GetFreePing
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_cl_pinglist@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_MAX_PINGREQUESTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_15
## %bb.1:
	movq	_cls@GOTPCREL(%rip), %r9
	movl	(%r9), %esi
	movl	%r8d, %edi
	movq	%rdx, %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%esi, %ecx
	subl	4(%rax), %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$500, %ecx                      ## imm = 0x1F4
	jge	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$16, %rax
	decl	%edi
	jne	LBB0_2
## %bb.8:
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r9), %r9d
	cmpl	$1, %r8d
	jne	LBB0_10
## %bb.9:
	movq	%rdx, %rcx
	jmp	LBB0_13
LBB0_6:
	movq	$0, 8(%rax)
	popq	%rbp
	retq
LBB0_10:
	movl	%r8d, %eax
	andl	$-2, %eax
	leaq	16(%rdx), %rcx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r9d, %esi
	subl	-12(%rcx), %esi
	leaq	-16(%rcx), %r10
	cmpl	%edi, %esi
	cmovgq	%r10, %rdx
	cmovlel	%edi, %esi
	movl	%r9d, %edi
	subl	4(%rcx), %edi
	cmpl	%esi, %edi
	cmovgq	%rcx, %rdx
	cmovlel	%esi, %edi
	addq	$32, %rcx
	addl	$-2, %eax
	jne	LBB0_11
## %bb.12:
	addq	$-16, %rcx
LBB0_13:
	movq	%rdx, %rax
	testb	$1, %r8b
	je	LBB0_16
## %bb.14:
	subl	4(%rcx), %r9d
	cmpl	%edi, %r9d
	cmovgq	%rcx, %rdx
LBB0_15:
	movq	%rdx, %rax
LBB0_16:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cl_pinglist,8,3                ## @cl_pinglist
	.comm	_MAX_PINGREQUESTS,4,2           ## @MAX_PINGREQUESTS
	.comm	_cls,4,2                        ## @cls
	.comm	_INT_MIN,4,2                    ## @INT_MIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_GetFreePing                 ; -- Begin function CL_GetFreePing
	.p2align	2
_CL_GetFreePing:                        ; @CL_GetFreePing
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _cl_pinglist@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cl_pinglist@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _MAX_PINGREQUESTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_PINGREQUESTS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.1:
Lloh6:
	adrp	x10, _cls@GOTPAGE
Lloh7:
	ldr	x10, [x10, _cls@GOTPAGEOFF]
	ldr	w11, [x10]
	mov	x12, x9
	mov	x0, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x0, #8]
	cbz	x13, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w13, [x0]
	cbnz	w13, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w13, [x0, #4]
	sub	w13, w11, w13
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w13, #500
	b.ge	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, #16
	subs	w12, w12, #1
	b.ne	LBB0_2
; %bb.7:
Lloh8:
	adrp	x11, _INT_MIN@GOTPAGE
Lloh9:
	ldr	x11, [x11, _INT_MIN@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	ldr	w10, [x10]
	mov	x0, x8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x8, #4]
	sub	w12, w10, w12
	cmp	w12, w11
	csel	x0, x8, x0, gt
	csel	w11, w12, w11, gt
	add	x8, x8, #16
	subs	w9, w9, #1
	b.ne	LBB0_8
; %bb.9:
	ret
LBB0_10:
	str	xzr, [x0, #8]
	ret
LBB0_11:
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_cl_pinglist,8,3                ; @cl_pinglist
	.comm	_MAX_PINGREQUESTS,4,2           ; @MAX_PINGREQUESTS
	.comm	_cls,4,2                        ; @cls
	.comm	_INT_MIN,4,2                    ; @INT_MIN
.subsections_via_symbols
