	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_cltr_select_router        ## -- Begin function tipc_cltr_select_router
	.p2align	4, 0x90
_tipc_cltr_select_router:               ## @tipc_cltr_select_router
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	(%rdi), %r12d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rdi), %edi
	callq	_in_own_cluster
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.1:
	movq	_tipc_max_nodes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r15d
	sarl	%eax
	cmpl	%r12d, %r15d
	jg	LBB0_2
## %bb.3:
	andl	%ebx, %r15d
	movslq	%r15d, %r13
	cmpl	%r13d, %r12d
	movl	%r13d, %r14d
	cmovgl	%r12d, %r14d
	incl	%r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%r13,4), %edi
	callq	_tipc_node_is_up
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	cmpl	%r13d, %r14d
	jne	LBB0_4
## %bb.7:
	cmpl	%r12d, %r14d
	jg	LBB0_8
	jmp	LBB0_14
LBB0_5:
	movl	%r13d, %r14d
	cmpl	%r12d, %r14d
	jle	LBB0_14
LBB0_8:
	movl	%ebx, %r13d
	cmpl	$3, %r15d
	movl	$2, %r14d
	cmovgel	%r15d, %r14d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_tipc_node_is_up
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_9
	jmp	LBB0_12
LBB0_11:
	movl	%ebx, %r14d
LBB0_12:
	cmpl	%r15d, %r14d
	movl	%r13d, %ebx
	jne	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%edi, %edi
	cmpl	%r12d, %r14d
	setle	%dil
	callq	_assert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tipc_node_select_router        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tipc_max_nodes,4,2             ## @tipc_max_nodes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_cltr_select_router        ; -- Begin function tipc_cltr_select_router
	.p2align	2
_tipc_cltr_select_router:               ; @tipc_cltr_select_router
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	w21, [x0]
	ldr	w0, [x0, #16]
	bl	_in_own_cluster
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	cbz	w21, LBB0_12
; %bb.1:
Lloh0:
	adrp	x8, _tipc_max_nodes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tipc_max_nodes@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	asr	w8, w8, #1
	cmp	w9, w21
	b.gt	LBB0_2
; %bb.3:
	mov	x24, #0
	and	w22, w9, w19
	cmp	w21, w22
	csel	w8, w21, w22, gt
	add	w23, w8, #1
	mov	x9, x22
	sbfiz	x25, x9, #2, #32
	mvn	w8, w8
	add	x26, x22, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x25
	ldr	w0, [x8, x24, lsl #2]
	bl	_tipc_node_is_up
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmn	w26, w24
	b.ne	LBB0_4
; %bb.6:
	cmp	w23, w21
	b.gt	LBB0_8
	b	LBB0_14
LBB0_7:
	add	w23, w22, w24
	cmp	w23, w21
	b.le	LBB0_14
LBB0_8:
	mov	w8, #2
	cmp	w22, #2
	csel	w23, w22, w8, gt
	mov	w24, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x24, lsl #2]
	bl	_tipc_node_is_up
	cbnz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	cmp	x23, x24
	b.ne	LBB0_9
; %bb.11:
	cmp	w23, w22
	b.ne	LBB0_14
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x23, x24
	cmp	w23, w22
	b.eq	LBB0_12
LBB0_14:
	cmp	w23, w21
	cset	w0, le
	bl	_assert
	ldr	x8, [x20, #8]
	ldr	w0, [x8, w23, sxtw #2]
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_tipc_node_select_router
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tipc_max_nodes,4,2             ; @tipc_max_nodes
.subsections_via_symbols
