	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_cltr_select_node          ## -- Begin function tipc_cltr_select_node
	.p2align	4, 0x90
_tipc_cltr_select_node:                 ## @tipc_cltr_select_node
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_tipc_max_nodes@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	16(%rdi), %edi
	callq	_in_own_cluster
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_11
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %ecx
	sarl	%ebx
	cmpl	%eax, %ecx
	jg	LBB0_1
## %bb.2:
	andl	%r14d, %ecx
	movl	$1, %r14d
	cmovnel	%ecx, %r14d
	xorl	%edi, %edi
	cmpl	%eax, %r14d
	setle	%dil
	callq	_assert
	cmpl	(%r15), %r14d
	jg	LBB0_6
## %bb.3:
	leaq	8(%r15), %r12
	movslq	%r14d, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_tipc_node_has_active_links
	testq	%rax, %rax
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rbx), %rax
	movslq	(%r15), %rcx
	cmpq	%rcx, %rbx
	movq	%rax, %rbx
	jl	LBB0_4
LBB0_6:
	cmpl	$2, %r14d
	jl	LBB0_11
## %bb.7:
	addq	$8, %r15
	movl	%r14d, %r12d
	movl	$1, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_tipc_node_has_active_links
	testq	%rax, %rax
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_8
	jmp	LBB0_15
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_12:
	movq	%r12, %r15
	jmp	LBB0_14
LBB0_13:
	movl	%ebx, %ebx
LBB0_14:
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %r14
LBB0_15:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_node          ; -- Begin function tipc_cltr_select_node
	.p2align	2
_tipc_cltr_select_node:                 ; @tipc_cltr_select_node
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _tipc_max_nodes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tipc_max_nodes@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w0, [x0, #16]
	bl	_in_own_cluster
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19]
	cbz	w8, LBB0_10
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x21
	asr	w21, w21, #1
	cmp	w9, w8
	b.gt	LBB0_1
; %bb.2:
	ands	w9, w9, w20
	csinc	w20, w9, wzr, ne
	cmp	w20, w8
	cset	w0, le
	bl	_assert
	ldr	w8, [x19]
	cmp	w20, w8
	b.gt	LBB0_6
; %bb.3:
	add	x21, x19, #8
	mov	x8, x20
	sxtw	x22, w8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x0, [x8, x22, lsl #3]
	bl	_tipc_node_has_active_links
	cbnz	x0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x22, #1
	ldrsw	x9, [x19]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_4
LBB0_6:
	cmp	w20, #2
	b.lt	LBB0_10
; %bb.7:
	add	x21, x19, #8
	mov	w19, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x0, [x8, x19, lsl #3]
	bl	_tipc_node_has_active_links
	cbnz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x19, x19, #1
	cmp	x20, x19
	b.ne	LBB0_8
LBB0_10:
	mov	x0, #0
	b	LBB0_13
LBB0_11:
	and	x22, x19, #0xffffffff
LBB0_12:
	ldr	x8, [x21]
	ldr	x0, [x8, x22, lsl #3]
LBB0_13:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tipc_max_nodes,4,2             ; @tipc_max_nodes
.subsections_via_symbols
