	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btree_insert_key
_btree_insert_key:                      ## @btree_insert_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	4(%rdi), %rsi
	movq	%r14, %rdi
	callq	_bkey_cmp
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_BUG_ON
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_bch_btree_insert_key
	movl	%eax, %ebx
	movq	_BTREE_INSERT_STATUS_NO_INSERT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %ebx
	je	LBB0_2
## %bb.1:
	xorl	%r13d, %r13d
	testq	%r15, %r15
	setne	%r13b
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmovneq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_bch_check_keys
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_trace_bcache_btree_insert_key
	movl	$1, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTREE_INSERT_STATUS_NO_INSERT,4,2 ## @BTREE_INSERT_STATUS_NO_INSERT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u for %s"

L_.str.1:                               ## @.str.1
	.asciz	"replace"

L_.str.2:                               ## @.str.2
	.asciz	"insert"

	.no_dead_strip	_btree_insert_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btree_insert_key
_btree_insert_key:                      ; @btree_insert_key
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x1, x0, #4
	mov	x0, x19
	bl	_bkey_cmp
	cmp	x0, #0
	cset	w0, gt
	bl	_BUG_ON
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_bch_btree_insert_key
Lloh0:
	adrp	x8, _BTREE_INSERT_STATUS_NO_INSERT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTREE_INSERT_STATUS_NO_INSERT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x22, x0
Lloh3:
	adrp	x8, l_.str.2@PAGE
Lloh4:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x21, #0
	csel	x3, x9, x8, ne
	cset	w21, ne
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_bch_check_keys
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	_trace_bcache_btree_insert_key
	mov	w0, #1
LBB0_3:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BTREE_INSERT_STATUS_NO_INSERT,4,2 ; @BTREE_INSERT_STATUS_NO_INSERT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u for %s"

l_.str.1:                               ; @.str.1
	.asciz	"replace"

l_.str.2:                               ; @.str.2
	.asciz	"insert"

	.no_dead_strip	_btree_insert_key
.subsections_via_symbols
