	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bch_btree_insert_node
_bch_btree_insert_node:                 ## @bch_btree_insert_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	%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	%r8, %r12
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	setne	%al
	testq	%r8, %r8
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_BUG_ON
	leaq	-48(%rbp), %rdi
	callq	_closure_init_stack
	leaq	8(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_write_block
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_btree_bset_last
	cmpq	%rax, %r14
	je	LBB0_3
## %bb.1:
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_bch_btree_init_next
LBB0_3:
	movq	%r15, %rdi
	callq	_bch_keylist_nkeys
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_insert_u64s_remaining
	cmpq	%rax, %r14
	jle	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.5:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	incq	%rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_6:
	movq	%rbx, %rdi
	callq	_write_block
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_btree_bset_last
	xorl	%edi, %edi
	cmpq	%rax, %r14
	setne	%dil
	callq	_BUG_ON
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_bch_btree_insert_keys
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.9:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_bch_btree_node_write
	jmp	LBB0_10
LBB0_11:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rax, (%rsi)
	jle	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_btree_split
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_bch_keylist_empty
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_17
## %bb.14:
	movl	%ebx, %eax
	testl	%ebx, %ebx
	jne	LBB0_17
	jmp	LBB0_15
LBB0_8:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_bch_btree_leaf_dirty
LBB0_10:
	movq	%r13, %rdi
	callq	_mutex_unlock
	leaq	-48(%rbp), %rdi
	callq	_closure_sync
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_12:
	incq	%rax
	movq	%rax, (%rsi)
LBB0_15:
	movq	_EINTR@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_bch_btree_insert_node
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bch_btree_insert_node
_bch_btree_insert_node:                 ; @bch_btree_insert_node
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cmp	x4, #0
	ccmp	x8, #0, #4, ne
	cset	w0, ne
	bl	_BUG_ON
	add	x0, sp, #8
	bl	_closure_init_stack
	add	x24, x19, #8
	mov	x0, x24
	bl	_mutex_lock
	mov	x0, x19
	bl	_write_block
	mov	x25, x0
	mov	x0, x19
	bl	_btree_bset_last
	cmp	x25, x0
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_bch_btree_init_next
LBB0_3:
	mov	x0, x20
	bl	_bch_keylist_nkeys
	mov	x25, x0
	mov	x0, x19
	bl	_insert_u64s_remaining
	cmp	x25, x0
	b.le	LBB0_6
; %bb.4:
	mov	x0, x24
	bl	_mutex_unlock
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	add	x8, x8, #1
	str	x8, [x21]
Lloh3:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_16
LBB0_6:
	mov	x0, x19
	bl	_write_block
	mov	x25, x0
	mov	x0, x19
	bl	_btree_bset_last
	cmp	x25, x0
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	_bch_btree_insert_keys
	cbz	x0, LBB0_13
; %bb.7:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.8:
	add	x1, sp, #8
	mov	x0, x19
	bl	_bch_btree_node_write
	b	LBB0_13
LBB0_9:
	ldr	x9, [x21]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cmp	x9, x8
	b.le	LBB0_14
; %bb.10:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	_btree_split
	mov	x19, x0
	mov	x0, x20
	bl	_bch_keylist_empty
	cbz	x0, LBB0_18
; %bb.11:
	mov	w19, #0
	b	LBB0_17
LBB0_12:
	mov	x0, x19
	mov	x1, x23
	bl	_bch_btree_leaf_dirty
LBB0_13:
	mov	x0, x24
	bl	_mutex_unlock
	add	x0, sp, #8
	bl	_closure_sync
	mov	w19, #0
	b	LBB0_17
LBB0_14:
	add	x8, x8, #1
	str	x8, [x21]
LBB0_15:
Lloh5:
	adrp	x8, _EINTR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_17:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_18:
	cbnz	w19, LBB0_17
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_bch_btree_insert_node
.subsections_via_symbols
