	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bch_bset_fix_lookup_table
_bch_bset_fix_lookup_table:             ## @bch_bset_fix_lookup_table
	.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, %r13
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rdi
	callq	_bkey_u64s
	movl	%eax, %r15d
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_bkey_to_cacheline
	movl	(%r12), %r14d
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.1:
	movl	%eax, %ebx
	cmpl	%r14d, %ebx
	jae	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_table_to_bkey
	cmpq	%r13, %rax
	ja	LBB0_4
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	(%r12), %r14d
	cmpl	%r14d, %ebx
	jb	LBB0_3
LBB0_5:
	cmpl	%r14d, %ebx
	jb	LBB0_6
	jmp	LBB0_13
LBB0_4:
	movl	(%r12), %r14d
	cmpl	%r14d, %ebx
	jae	LBB0_13
LBB0_6:
	movl	%ebx, %r13d
	movq	8(%r12), %rcx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	_bkey_to_cacheline_offset
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	movl	(%r12), %r14d
	cmpq	%r14, %r13
	jae	LBB0_13
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	(%rcx,%r13,4), %eax
	addl	%r15d, %eax
	movl	%eax, (%rcx,%r13,4)
	cmpl	$8, %eax
	jb	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leal	-1(%r13), %esi
	movq	%r12, %rdi
	callq	_table_to_bkey
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rax, %rbx
	movq	%r12, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_cacheline_to_bkey
	cmpq	%rax, %rbx
	jae	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=2
	movq	%rbx, %rdi
	callq	_bkey_next
	jmp	LBB0_10
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movl	(%rax), %ebx
	callq	_btree_keys_cachelines
	addl	%ebx, %eax
	subl	16(%r12), %eax
	cmpl	%eax, %r14d
	jne	LBB0_14
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	(%r12), %esi
	decl	%esi
	movq	%r12, %rdi
	callq	_table_to_bkey
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	%rbx, %rdi
	callq	_bkey_next
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	movl	20(%r12), %edi
	callq	_bset_bkey_last
	cmpq	%rax, %rbx
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r12), %r14d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bkey_to_cacheline
	cmpl	%eax, %r14d
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r12), %esi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_bkey_to_cacheline_offset
	movq	8(%r12), %rcx
	movl	(%r12), %edx
	movl	%eax, (%rcx,%rdx,4)
	incl	(%r12)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bch_bset_fix_lookup_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bch_bset_fix_lookup_table
_bch_bset_fix_lookup_table:             ; @bch_bset_fix_lookup_table
	.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	x23, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x2
	bl	_bkey_u64s
	mov	x21, x0
	mov	x0, x19
	mov	x1, x23
	bl	_bkey_to_cacheline
	ldr	w24, [x19]
	cbz	w24, LBB0_14
; %bb.1:
	mov	x22, x0
	cmp	w22, w24
	b.hs	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_table_to_bkey
	cmp	x0, x23
	b.hi	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	ldr	w24, [x19]
	cmp	w22, w24
	b.lo	LBB0_2
LBB0_4:
	cmp	w22, w24
	b.lo	LBB0_6
	b	LBB0_13
LBB0_5:
	ldr	w24, [x19]
	cmp	w22, w24
	b.hs	LBB0_13
LBB0_6:
	mov	w22, w22
	ldr	x8, [x19, #8]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_bkey_to_cacheline_offset
	ldr	x8, [x19, #8]
	str	w0, [x8, x22, lsl #2]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #1
	ldr	w24, [x19]
	cmp	x22, x24
	b.hs	LBB0_13
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	lsl	x9, x22, #2
	ldr	w10, [x8, x9]
	add	w10, w10, w21
	str	w10, [x8, x9]
	cmp	w10, #8
	b.lo	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sub	w1, w22, #1
	mov	x0, x19
	bl	_table_to_bkey
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x23, x0
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_cacheline_to_bkey
	cmp	x23, x0
	b.hs	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x23
	bl	_bkey_next
	b	LBB0_11
LBB0_13:
	ldr	x8, [x20]
	ldr	w21, [x8]
	mov	x0, x20
	bl	_btree_keys_cachelines
	ldr	w8, [x19, #16]
	add	w9, w0, w21
	sub	w8, w9, w8
	cmp	w24, w8
	b.ne	LBB0_15
LBB0_14:
	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
LBB0_15:
	ldr	w8, [x19]
	sub	w1, w8, #1
	mov	x0, x19
	bl	_table_to_bkey
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x20
	bl	_bkey_next
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x20, x0
	ldr	w0, [x19, #20]
	bl	_bset_bkey_last
	cmp	x20, x0
	b.eq	LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w21, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_bkey_to_cacheline
	cmp	w21, w0
	b.ne	LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w1, [x19]
	mov	x0, x19
	mov	x2, x20
	bl	_bkey_to_cacheline_offset
	ldr	x8, [x19, #8]
	ldr	w9, [x19]
	str	w0, [x8, x9, lsl #2]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_16
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bch_bset_fix_lookup_table
.subsections_via_symbols
