	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_realloc                        ## -- Begin function realloc
	.p2align	4, 0x90
_realloc:                               ## @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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	%rdi, %r15
	movl	$8, %edi
	callq	_MEMALIGN
	cltq
	movq	%r15, %rbx
	subq	%rax, %rbx
	movq	(%rbx), %r13
	movq	_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r13
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %r12d
	jmp	LBB0_5
LBB0_16:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malloc                         ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_findbucket
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movq	_realloc_srchlen@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_findbucket
	xorl	%r12d, %r12d
	testl	%eax, %eax
	cmovgl	%eax, %r12d
LBB0_5:
	movl	$8, %edi
	callq	_MEMALIGN
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r14,%rax), %edi
	movq	_RSLOP@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	callq	_MEMALIGN
	cmpq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	jne	LBB0_9
## %bb.6:
	leal	3(%r12), %ecx
	movl	$1, %edx
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	cmpl	%esi, %eax
	ja	LBB0_9
## %bb.7:
	leal	2(%r12), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	cmpl	%edx, %eax
	jbe	LBB0_9
## %bb.8:
	movq	%r15, %rbx
	jmp	LBB0_15
LBB0_9:
	movq	%r14, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %rbx
	cmpq	%r15, %rax
	je	LBB0_13
## %bb.12:
	addb	$3, %r12b
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	movl	%r12d, %ecx
	shll	%cl, %r13d
	movl	$8, %edi
	callq	_MEMALIGN
	subl	%eax, %r13d
	movslq	%r13d, %rdx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	_RSLOP@GOTPCREL(%rip), %rax
	subq	(%rax), %rdx
	cmpq	%r14, %rdx
	cmovaeq	%r14, %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_memmove
LBB0_13:
	cmpq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	jne	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_15
LBB0_10:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAGIC,8,3                      ## @MAGIC
	.comm	_realloc_srchlen,4,2            ## @realloc_srchlen
	.comm	_RSLOP,8,3                      ## @RSLOP
	.comm	_RMAGIC,8,3                     ## @RMAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_realloc                        ; -- Begin function realloc
	.p2align	2
_realloc:                               ; @realloc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w0, #8
	bl	_MEMALIGN
	sub	x22, x19, w0, sxtw
	ldr	x23, [x22]
Lloh0:
	adrp	x8, _MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	cmp	x23, x24
	b.ne	LBB0_4
; %bb.2:
	ldr	w21, [x22]
	b	LBB0_6
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_malloc
LBB0_4:
	mov	x0, x22
	mov	w1, #1
	bl	_findbucket
	mov	x21, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _realloc_srchlen@GOTPAGE
Lloh4:
	ldr	x8, [x8, _realloc_srchlen@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_findbucket
	cmp	w0, #0
	csel	w21, w0, wzr, gt
LBB0_6:
	mov	w0, #8
	bl	_MEMALIGN
Lloh6:
	adrp	x25, _RSLOP@GOTPAGE
Lloh7:
	ldr	x25, [x25, _RSLOP@GOTPAGEOFF]
	ldr	w8, [x25]
	add	w9, w0, w20
	add	w0, w9, w8
	bl	_MEMALIGN
	cmp	x23, x24
	add	w8, w21, #3
	mov	w9, #1
	lsl	w8, w9, w8
	ccmp	w0, w8, #2, eq
	add	w8, w21, #2
	lsl	w8, w9, w8
	ccmp	w0, w8, #0, ls
	b.hi	LBB0_12
; %bb.7:
	mov	x0, x20
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_13
; %bb.8:
	cmp	x22, x19
	b.eq	LBB0_10
; %bb.9:
	add	w8, w21, #3
	mov	w9, #1
	lsl	w21, w9, w8
	mov	w0, #8
	bl	_MEMALIGN
	sub	w8, w21, w0
	sxtw	x8, w8
	ldr	x9, [x25]
	sub	x8, x8, x9
	cmp	x8, x20
	csel	x2, x8, x20, lo
	mov	x0, x22
	mov	x1, x19
	bl	_memmove
LBB0_10:
	cmp	x23, x24
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_free
	b	LBB0_13
LBB0_12:
	mov	x22, x19
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAGIC,8,3                      ; @MAGIC
	.comm	_realloc_srchlen,4,2            ; @realloc_srchlen
	.comm	_RSLOP,8,3                      ; @RSLOP
	.comm	_RMAGIC,8,3                     ; @RMAGIC
.subsections_via_symbols
