	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bch_btree_insert_check_key     ## -- Begin function bch_btree_insert_check_key
	.p2align	4, 0x90
_bch_btree_insert_check_key:            ## @bch_btree_insert_check_key
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r14d
	leaq	-48(%rbp), %rdi
	callq	_bch_keylist_init
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	cmpl	$-1, %r14d
	je	LBB0_1
LBB0_4:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_SET_KEY_PTRS
	movq	(%r13), %rdi
	movl	$8, %esi
	callq	_get_random_bytes
	movq	_PTR_CHECK_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_SET_PTR_DEV
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_bch_keylist_add
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_bch_btree_insert_node
	movl	%eax, %r15d
	testl	%eax, %eax
	movl	$0, %edi
	jne	LBB0_6
## %bb.5:
	leaq	-48(%rbp), %rdi
	callq	_bch_keylist_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
LBB0_6:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BUG_ON
	cmpl	$-1, -52(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_8
	jmp	LBB0_7
LBB0_1:
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_rw_unlock
	movl	8(%rbx), %edx
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_rw_lock
	movq	16(%rbx), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	cmpq	%rax, (%rbx)
	je	LBB0_4
LBB0_3:
	movl	8(%rbx), %eax
	movl	%eax, (%r12)
LBB0_7:
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_downgrade_write
LBB0_8:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_PTR_CHECK_DEV,4,2              ## @PTR_CHECK_DEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bch_btree_insert_check_key     ; -- Begin function bch_btree_insert_check_key
	.p2align	2
_bch_btree_insert_check_key:            ; @bch_btree_insert_check_key
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EINTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x8, [x0, #16]
	ldr	x25, [x8]
	ldr	x24, [x0]
	ldr	w22, [x1]
	add	x0, sp, #8
	bl	_bch_keylist_init
	cmn	w22, #1
	b.eq	LBB0_4
LBB0_1:
	mov	x0, x21
	mov	w1, #1
	bl	_SET_KEY_PTRS
	ldr	x0, [x21]
	mov	w1, #8
	bl	_get_random_bytes
Lloh3:
	adrp	x8, _PTR_CHECK_DEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PTR_CHECK_DEV@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #0
	bl	_SET_PTR_DEV
	add	x0, sp, #8
	mov	x1, x21
	bl	_bch_keylist_add
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x3, #0
	mov	x4, #0
	bl	_bch_btree_insert_node
	mov	x21, x0
	mov	w0, #0
	cbnz	w21, LBB0_3
; %bb.2:
	add	x0, sp, #8
	bl	_bch_keylist_empty
	cmp	w0, #0
	cset	w0, eq
LBB0_3:
	bl	_BUG_ON
	cmn	w22, #1
	b.ne	LBB0_8
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	mov	x1, x19
	bl	_rw_unlock
	ldr	w2, [x19, #8]
	mov	w0, #1
	mov	x1, x19
	bl	_rw_lock
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cmp	x8, x25
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x19]
	add	x9, x24, #1
	cmp	x8, x9
	b.eq	LBB0_1
LBB0_6:
	neg	w21, w23
	ldr	w8, [x19, #8]
	str	w8, [x20]
LBB0_7:
	add	x0, x19, #12
	bl	_downgrade_write
LBB0_8:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_PTR_CHECK_DEV,4,2              ; @PTR_CHECK_DEV
.subsections_via_symbols
