	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_node_select_router        ## -- Begin function tipc_node_select_router
	.p2align	4, 0x90
_tipc_node_select_router:               ## @tipc_node_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.1:
	movl	(%rdi), %r14d
	testl	%r14d, %r14d
	js	LBB0_15
## %bb.2:
	shll	$5, %r14d
	orl	$31, %r14d
	movq	_tipc_max_nodes@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	sarl	%ecx
	cmpl	%r14d, %eax
	jg	LBB0_3
## %bb.4:
	andl	%esi, %eax
	movq	8(%rdi), %rcx
	cmpl	%r14d, %eax
	movl	%r14d, %edx
	cmovgl	%eax, %edx
	incl	%edx
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	31(%rbx), %esi
	testl	%ebx, %ebx
	cmovnsl	%ebx, %esi
	sarl	$5, %esi
	movslq	%esi, %rsi
	movl	(%rcx,%rsi,4), %esi
	btl	%ebx, %esi
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	%ebx, %edx
	jne	LBB0_5
## %bb.7:
	movl	%edx, %ebx
LBB0_8:
	cmpl	%r14d, %ebx
	jle	LBB0_14
## %bb.9:
	cmpl	$3, %eax
	movl	$2, %edx
	cmovgel	%eax, %edx
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %esi
	shrl	$5, %esi
	movl	(%rcx,%rsi,4), %esi
	btl	%ebx, %esi
	jb	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	cmpl	%ebx, %edx
	jne	LBB0_10
## %bb.12:
	movl	%edx, %ebx
LBB0_13:
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setne	%dil
	callq	_assert
LBB0_14:
	testl	%ebx, %ebx
	setne	%al
	cmpl	%r14d, %ebx
	setle	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_own_zone
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_own_cluster
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tipc_addr                      ## TAILCALL
LBB0_15:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	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_node_select_router        ; -- Begin function tipc_node_select_router
	.p2align	2
_tipc_node_select_router:               ; @tipc_node_select_router
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_15
; %bb.1:
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_15
; %bb.2:
	mov	w20, #31
	bfi	w20, w8, #5, #27
Lloh0:
	adrp	x8, _tipc_max_nodes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tipc_max_nodes@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x8
	asr	w8, w8, #1
	cmp	w9, w20
	b.gt	LBB0_3
; %bb.4:
	and	w8, w9, w1
	ldr	x9, [x0, #8]
	cmp	w8, w20
	csel	w10, w8, w20, gt
	add	w10, w10, #1
	mov	x19, x8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w19, #31
	cmp	w19, #0
	csel	w11, w11, w19, lt
	asr	w11, w11, #5
	ldr	w11, [x9, w11, sxtw #2]
	lsr	w11, w11, w19
	tbnz	w11, #0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w19, w19, #1
	cmp	w10, w19
	b.ne	LBB0_5
; %bb.7:
	mov	x19, x10
LBB0_8:
	cmp	w19, w20
	b.le	LBB0_14
; %bb.9:
	mov	w10, #2
	cmp	w8, #2
	csel	w10, w8, w10, gt
	mov	w19, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsr	w11, w19, #5
	ldr	w11, [x9, w11, uxtw #2]
	lsr	w11, w11, w19
	tbnz	w11, #0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w19, w19, #1
	cmp	w10, w19
	b.ne	LBB0_10
; %bb.12:
	mov	x19, x10
LBB0_13:
	cmp	w19, w8
	cset	w0, ne
	bl	_assert
LBB0_14:
	cmp	w19, #0
	ccmp	w19, w20, #0, ne
	cset	w0, le
	bl	_assert
	bl	_own_zone
	mov	x20, x0
	bl	_own_cluster
	mov	x1, x0
	mov	x0, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tipc_addr
LBB0_15:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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
