	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rev_friends_insert
_rev_friends_insert:                    ## @rev_friends_insert
	.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	%r8d, %r14d
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, %r12d
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movl	$1, %edi
	cmpl	%r12d, 4(%rbx)
	jne	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	cmpl	%r15d, 8(%rbx)
	setne	%dil
LBB0_4:
	callq	_assert
	cmpl	%r13d, 12(%rbx)
	jge	LBB0_5
## %bb.11:
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_new_rev_friends_node
	movq	%rax, %r13
	movl	%r14d, (%rax)
	leaq	24(%rax), %rdi
	leaq	16(%rax), %rsi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	callq	_rev_friends_split
	movq	%r13, %rbx
	jmp	LBB0_10
LBB0_1:
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_new_rev_friends_node
	movq	%rax, %rbx
	movl	%r14d, (%rax)
	jmp	LBB0_10
LBB0_5:
	cmpl	%r12d, 4(%rbx)
	jg	LBB0_8
## %bb.6:
	jne	LBB0_9
## %bb.7:
	cmpl	%r15d, 8(%rbx)
	jle	LBB0_9
LBB0_8:
	movq	24(%rbx), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	callq	_rev_friends_insert
	movq	%rax, 24(%rbx)
	jmp	LBB0_10
LBB0_9:
	movq	16(%rbx), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	callq	_rev_friends_insert
	movq	%rax, 16(%rbx)
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rev_friends_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rev_friends_insert
_rev_friends_insert:                    ; @rev_friends_insert
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #4]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x19, #8]
	cmp	w8, w21
	cset	w0, ne
	b	LBB0_5
LBB0_3:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_new_rev_friends_node
	mov	x19, x0
	str	w20, [x0]
	b	LBB0_12
LBB0_4:
	mov	w0, #1
LBB0_5:
	bl	_assert
	ldr	w8, [x19, #12]
	cmp	w8, w23
	b.ge	LBB0_7
; %bb.6:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_new_rev_friends_node
	mov	x23, x0
	add	x0, x0, #24
	mov	x1, x23
	str	w20, [x1], #16
	mov	x2, x19
	mov	x3, x22
	mov	x4, x21
	bl	_rev_friends_split
	mov	x19, x23
	b	LBB0_12
LBB0_7:
	ldr	w8, [x19, #4]
	cmp	w8, w22
	b.gt	LBB0_10
; %bb.8:
	b.ne	LBB0_11
; %bb.9:
	ldr	w8, [x19, #8]
	cmp	w8, w21
	b.le	LBB0_11
LBB0_10:
	ldr	x0, [x19, #24]
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	mov	x4, x20
	bl	_rev_friends_insert
	str	x0, [x19, #24]
	b	LBB0_12
LBB0_11:
	ldr	x0, [x19, #16]
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	mov	x4, x20
	bl	_rev_friends_insert
	str	x0, [x19, #16]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rev_friends_insert
.subsections_via_symbols
