	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_json_buffer
_set_json_buffer:                       ## @set_json_buffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movl	(%rdi), %eax
	addl	%esi, %eax
	incl	%eax
	movslq	%eax, %rbx
	movq	8(%rdi), %rcx
	cmpq	%rbx, %rcx
	jae	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.3:
	movq	_INIT_BUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_4
LBB0_2:
	movq	%rcx, %rax
	shrq	%rax
	addq	%rcx, %rax
LBB0_4:
	cmpq	%rbx, %rax
	cmovaq	%rax, %rbx
	movq	16(%r14), %rdi
	movq	%rbx, %rsi
	callq	_realloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_free_json
	leaq	L_.str(%rip), %rdi
	callq	_FATAL
LBB0_6:
	movq	%r15, 16(%r14)
	movq	%rbx, 8(%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INIT_BUF_SIZE,8,3              ## @INIT_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to realloc JSON buffer.\n"

	.no_dead_strip	_set_json_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_json_buffer
_set_json_buffer:                       ; @set_json_buffer
	.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
	ldr	w8, [x0]
	add	w8, w1, w8
	add	w8, w8, #1
	sxtw	x8, w8
	ldr	x9, [x0, #8]
	cmp	x9, x8
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x10, _INIT_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _INIT_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x11, x9, x9, lsr #1
	cmp	x9, #0
	csel	x9, x10, x11, eq
	cmp	x9, x8
	csel	x20, x9, x8, hi
	ldr	x0, [x0, #16]
	mov	x1, x20
	bl	_realloc
	mov	x21, x0
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_free_json
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FATAL
LBB0_3:
	stp	x20, x21, [x19, #8]
LBB0_4:
	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	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INIT_BUF_SIZE,8,3              ; @INIT_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to realloc JSON buffer.\n"

	.no_dead_strip	_set_json_buffer
.subsections_via_symbols
