	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_bridge_rehash
_ng_bridge_rehash:                      ## @ng_bridge_rehash
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %ecx
	movl	4(%rdi), %eax
	cmpl	%eax, %ecx
	jle	LBB0_2
## %bb.1:
	leal	(%rax,%rax), %ebx
	movq	_MAX_BUCKETS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ebx
	jle	LBB0_4
LBB0_2:
	sarl	$2, %eax
	cmpl	%eax, %ecx
	jge	LBB0_14
## %bb.3:
	movq	_MIN_BUCKETS@GOTPCREL(%rip), %rcx
	movl	%eax, %ebx
	cmpl	(%rcx), %eax
	jl	LBB0_14
LBB0_4:
	leal	(,%rbx,4), %edi
	movq	_M_NETGRAPH_BRIDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leal	-1(%rbx), %r13d
	cmpl	$0, 4(%r14)
	jle	LBB0_11
## %bb.6:
	xorl	%ecx, %ecx
	movq	_next@GOTPCREL(%rip), %r15
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movslq	4(%r14), %rax
	cmpq	%rax, %rcx
	jge	LBB0_11
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %rbx
	addq	16(%r14), %rbx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_SLIST_EMPTY
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_SLIST_FIRST
	movq	%rax, %r14
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_SLIST_REMOVE_HEAD
	movl	(%r14), %edi
	movl	%r13d, %esi
	callq	_HASH
	cltq
	leaq	(%r12,%rax,4), %rdi
	movl	(%r15), %edx
	movq	%r14, %rsi
	callq	_SLIST_INSERT_HEAD
	jmp	LBB0_9
LBB0_11:
	cmpl	$3, 28(%r14)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jl	LBB0_13
## %bb.12:
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	24(%r14), %edi
	callq	_ng_bridge_nodename
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	movl	%ebx, %r8d
	callq	_log
LBB0_13:
	movq	16(%r14), %rdi
	movq	_M_NETGRAPH_BRIDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movl	%ebx, 4(%r14)
	movl	%r13d, 8(%r14)
	movq	%r12, 16(%r14)
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BUCKETS,4,2                ## @MAX_BUCKETS
	.comm	_MIN_BUCKETS,4,2                ## @MIN_BUCKETS
	.comm	_M_NETGRAPH_BRIDGE,4,2          ## @M_NETGRAPH_BRIDGE
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_next,4,2                       ## @next
	.comm	_LOG_INFO,4,2                   ## @LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ng_bridge: %s: table size %d -> %d\n"

	.no_dead_strip	_ng_bridge_rehash
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_bridge_rehash
_ng_bridge_rehash:                      ; @ng_bridge_rehash
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
	lsl	w20, w9, #1
Lloh0:
	adrp	x10, _MAX_BUCKETS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MAX_BUCKETS@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w20, w10
	b.le	LBB0_3
LBB0_2:
	asr	w20, w9, #2
Lloh3:
	adrp	x9, _MIN_BUCKETS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MIN_BUCKETS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w20, w9, #8, lt
	b.lt	LBB0_13
LBB0_3:
	lsl	w0, w20, #2
Lloh6:
	adrp	x25, _M_NETGRAPH_BRIDGE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _M_NETGRAPH_BRIDGE@GOTPAGEOFF]
Lloh8:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_malloc
	cbz	x0, LBB0_13
; %bb.4:
	mov	x21, x0
	sub	w22, w20, #1
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x26, #0
Lloh14:
	adrp	x27, _next@GOTPAGE
Lloh15:
	ldr	x27, [x27, _next@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x19, #4]
	cmp	x26, x8
	b.ge	LBB0_10
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x19, #16]
	add	x23, x8, x26, lsl #2
LBB0_8:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_SLIST_EMPTY
	cbnz	w0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x23
	bl	_SLIST_FIRST
	mov	x24, x0
	ldr	w1, [x27]
	mov	x0, x23
	bl	_SLIST_REMOVE_HEAD
	ldr	w0, [x24]
	mov	x1, x22
	bl	_HASH
	add	x0, x21, w0, sxtw #2
	ldr	w2, [x27]
	mov	x1, x24
	bl	_SLIST_INSERT_HEAD
	b	LBB0_8
LBB0_10:
	ldr	w8, [x19, #28]
	cmp	w8, #3
	b.lt	LBB0_12
; %bb.11:
Lloh16:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	ldr	w0, [x19, #24]
	bl	_ng_bridge_nodename
	mov	x2, x0
	ldr	w3, [x19, #4]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x4, x20
	bl	_log
LBB0_12:
	ldr	x0, [x19, #16]
	ldr	w1, [x25]
	bl	_free
	stp	w20, w22, [x19, #4]
	str	x21, [x19, #16]
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BUCKETS,4,2                ; @MAX_BUCKETS
	.comm	_MIN_BUCKETS,4,2                ; @MIN_BUCKETS
	.comm	_M_NETGRAPH_BRIDGE,4,2          ; @M_NETGRAPH_BRIDGE
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_next,4,2                       ; @next
	.comm	_LOG_INFO,4,2                   ; @LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ng_bridge: %s: table size %d -> %d\n"

	.no_dead_strip	_ng_bridge_rehash
.subsections_via_symbols
