	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___bch_keylist_realloc          ## -- Begin function __bch_keylist_realloc
	.p2align	4, 0x90
___bch_keylist_realloc:                 ## @__bch_keylist_realloc
	.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	%esi, %ebx
	movq	%rdi, %r12
	callq	_bch_keylist_nkeys
	movq	%rax, %r15
	movl	%ebx, %edi
	addq	%rax, %rdi
	movq	8(%r12), %rax
	xorl	%r14d, %r14d
	cmpq	16(%r12), %rax
	movl	$0, %r13d
	cmovneq	%rax, %r13
	callq	_roundup_pow_of_two
	movq	%rax, %rbx
	movq	_KEYLIST_INLINE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jbe	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	callq	_roundup_pow_of_two
	cmpq	%rbx, %rax
	je	LBB0_7
## %bb.2:
	shll	$2, %ebx
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	testq	%r13, %r13
	jne	LBB0_6
## %bb.5:
	movq	16(%r12), %rsi
	leal	(,%r15,4), %edx
	movq	%rbx, %rdi
	callq	_memcpy
LBB0_6:
	movq	%rbx, 8(%r12)
	leaq	(%rbx,%r15,4), %rax
	movq	%rax, (%r12)
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEYLIST_INLINE,8,3             ## @KEYLIST_INLINE
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___bch_keylist_realloc          ; -- Begin function __bch_keylist_realloc
	.p2align	2
___bch_keylist_realloc:                 ; @__bch_keylist_realloc
	.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, x1
	mov	x19, x0
	bl	_bch_keylist_nkeys
	mov	x20, x0
	add	x0, x0, w21, uxtw
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	csel	x21, xzr, x8, eq
	bl	_roundup_pow_of_two
Lloh0:
	adrp	x8, _KEYLIST_INLINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEYLIST_INLINE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_2
; %bb.1:
	mov	x22, x0
	mov	x0, x20
	bl	_roundup_pow_of_two
	cmp	x0, x22
	b.ne	LBB0_4
LBB0_2:
	mov	w0, #0
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
LBB0_4:
	lsl	w1, w22, #2
Lloh3:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_krealloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	cbnz	x21, LBB0_7
; %bb.6:
	ldr	x1, [x19, #16]
	lsl	w2, w20, #2
	mov	x0, x22
	bl	_memcpy
LBB0_7:
	mov	w0, #0
	add	x8, x22, x20, lsl #2
	stp	x8, x22, [x19]
	b	LBB0_3
LBB0_8:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KEYLIST_INLINE,8,3             ; @KEYLIST_INLINE
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
