	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_bcbearer_sort             ## -- Begin function tipc_bcbearer_sort
	.p2align	4, 0x90
_tipc_bcbearer_sort:                    ## @tipc_bcbearer_sort
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_bcbearer@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	8(%rax), %r15
	movq	_bc_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_bh
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_MAX_BEARERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	shlq	$4, %rax
	xorl	%ecx, %ecx
	movq	_tipc_bearers@GOTPCREL(%rip), %rdx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$16, %rcx
	cmpq	%rcx, %rax
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rsi
	cmpl	$0, 12(%rsi,%rcx)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 8(%rsi,%rcx)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rsi,%rcx), %rdi
	addq	%rcx, %rsi
	shlq	$4, %rdi
	leaq	(%r15,%rdi), %rbx
	addq	$8, %rbx
	cmpq	$0, 8(%r15,%rdi)
	leaq	(%r15,%rdi), %rdi
	cmoveq	%rbx, %rdi
	movq	%rsi, (%rdi)
	jmp	LBB0_5
LBB0_6:
	movq	(%r14), %rax
	movq	(%rax), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_TIPC_MAX_LINK_PRI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	leaq	1(%rax), %rbx
	shlq	$4, %rax
	addq	%rax, %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r15), %rax
	movq	%rax, (%r14)
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$16, %r14
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$-16, %r15
	decq	%rbx
	jle	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, 8(%r14)
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r15), %rdi
	addq	$8, %rdi
	addq	$8, %rsi
	callq	_tipc_nmap_equal
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r15), %rax
	movq	%rax, 24(%r14)
	addq	$16, %r14
	jmp	LBB0_13
LBB0_15:
	movq	_bc_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bcbearer,8,3                   ## @bcbearer
	.comm	_bc_lock,4,2                    ## @bc_lock
	.comm	_MAX_BEARERS,4,2                ## @MAX_BEARERS
	.comm	_tipc_bearers,8,3               ## @tipc_bearers
	.comm	_TIPC_MAX_LINK_PRI,4,2          ## @TIPC_MAX_LINK_PRI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_bcbearer_sort             ; -- Begin function tipc_bcbearer_sort
	.p2align	2
_tipc_bcbearer_sort:                    ; @tipc_bcbearer_sort
	.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
Lloh0:
	adrp	x19, _bcbearer@GOTPAGE
Lloh1:
	ldr	x19, [x19, _bcbearer@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x20, [x8, #8]
Lloh2:
	adrp	x0, _bc_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _bc_lock@GOTPAGEOFF]
	bl	_spin_lock_bh
	mov	x0, x20
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh4:
	adrp	x8, _MAX_BEARERS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MAX_BEARERS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x8, #0
	lsl	x9, x9, #4
Lloh7:
	adrp	x10, _tipc_bearers@GOTPAGE
Lloh8:
	ldr	x10, [x10, _tipc_bearers@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #16
	cmp	x9, x8
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	add	x11, x12, x8
	ldr	w13, [x11, #12]
	cbz	w13, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w13, [x11, #8]
	cbz	w13, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x12, [x12, x8]
	add	x12, x20, x12, lsl #4
	mov	x13, x12
	ldr	x14, [x13, #8]!
	cmp	x14, #0
	csel	x12, x13, x12, eq
	str	x11, [x12]
	b	LBB0_2
LBB0_6:
	ldr	x8, [x19]
	ldr	x19, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh9:
	adrp	x8, _TIPC_MAX_LINK_PRI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TIPC_MAX_LINK_PRI@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tbnz	w8, #31, LBB0_15
; %bb.7:
	add	x21, x8, #1
	add	x20, x20, x8, lsl #4
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x20]
	str	x8, [x19]
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	add	x19, x19, #16
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	sub	x21, x21, #1
	sub	x20, x20, #16
	cmp	x21, #0
	b.le	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x8, [x19, #8]
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x20, #8]
	add	x0, x9, #8
	add	x1, x8, #8
	bl	_tipc_nmap_equal
	cbnz	x0, LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x20]
	str	x8, [x19, #24]
	add	x19, x19, #16
	b	LBB0_9
LBB0_15:
Lloh12:
	adrp	x0, _bc_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _bc_lock@GOTPAGEOFF]
	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
	b	_spin_unlock_bh
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_bcbearer,8,3                   ; @bcbearer
	.comm	_bc_lock,4,2                    ; @bc_lock
	.comm	_MAX_BEARERS,4,2                ; @MAX_BEARERS
	.comm	_tipc_bearers,8,3               ; @tipc_bearers
	.comm	_TIPC_MAX_LINK_PRI,4,2          ; @TIPC_MAX_LINK_PRI
.subsections_via_symbols
