	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function next_hop_idx
_next_hop_idx:                          ## @next_hop_idx
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rdx, %r12
	movl	%esi, %ebx
	xorl	%r15d, %r15d
	cmpl	$2, %esi
	je	LBB0_5
## %bb.1:
	cmpl	$1, %ebx
	je	LBB0_4
## %bb.2:
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.3:
	movl	16(%r12), %eax
	movl	16(%rcx), %esi
	movl	8(%rdi), %edx
	jmp	LBB0_6
LBB0_5:
	movl	8(%r12), %eax
	movl	8(%rcx), %esi
	movl	(%rdi), %edx
	jmp	LBB0_6
LBB0_4:
	movl	12(%r12), %eax
	movl	12(%rcx), %esi
	movl	4(%rdi), %edx
LBB0_6:
	movl	%eax, %edi
	callq	_ring_dir_idx
	addl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_8
## %bb.7:
	orl	$1, %ebx
LBB0_9:
	movq	(%r12), %rax
	movl	%ebx, %ecx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_11
## %bb.10:
	movl	%ebx, (%r14)
	movl	$1, %r15d
	jmp	LBB0_11
LBB0_8:
	js	LBB0_9
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_next_hop_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function next_hop_idx
_next_hop_idx:                          ; @next_hop_idx
	.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	x19, x4
	mov	x20, x2
	mov	x21, x1
	cmp	w1, #2
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #1
	b.eq	LBB0_5
; %bb.2:
	cbnz	w21, LBB0_11
; %bb.3:
	ldr	w8, [x20, #16]
	ldr	w1, [x3, #16]
	ldr	w2, [x0, #8]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x20, #8]
	ldr	w1, [x3, #8]
	ldr	w2, [x0]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x20, #12]
	ldr	w1, [x3, #12]
	ldr	w2, [x0, #4]
LBB0_6:
	mov	x0, x8
	bl	_ring_dir_idx
	lsl	w8, w21, #1
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	orr	w8, w8, #0x1
LBB0_8:
	ldr	x9, [x20]
	ldr	w9, [x9, w8, uxtw #2]
	cbz	w9, LBB0_11
; %bb.9:
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_12
LBB0_10:
	tbnz	w0, #31, LBB0_8
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_next_hop_idx
.subsections_via_symbols
