	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsprintf_dup                   ## -- Begin function vsprintf_dup
	.p2align	4, 0x90
_vsprintf_dup:                          ## @vsprintf_dup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$528, %rsp                      ## imm = 0x210
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ecx
	movq	%rdi, %rdx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leaq	-544(%rbp), %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_vsnprintf
	movl	%eax, %ebx
	leal	1(%rbx), %r14d
	cmpl	$513, %r14d                     ## imm = 0x201
	jb	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_fatal_error
LBB0_2:
	addl	$25, %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_fatal_error
LBB0_4:
	movq	(%rbx), %rdi
	leaq	-544(%rbp), %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movq	_allocated_strings@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	%rcx, 16(%rbx)
	movq	8(%rcx), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, 8(%rcx)
	movq	8(%rbx), %rax
	addq	$16, %rax
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, 16(%rbx)
	movq	%rbx, 8(%rbx)
LBB0_7:
	movq	%rbx, (%rax)
	movq	(%rbx), %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$528, %rsp                      ## imm = 0x210
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Maximum string length exceeded"

L_.str.1:                               ## @.str.1
	.asciz	"Out of memory"

	.comm	_allocated_strings,8,3          ## @allocated_strings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsprintf_dup                   ; -- Begin function vsprintf_dup
	.p2align	2
_vsprintf_dup:                          ; @vsprintf_dup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #528
	mov	x3, x1
	mov	x2, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x0, sp, #8
	mov	w1, #512
	bl	_vsnprintf
	mov	x19, x0
	add	w20, w0, #1
	cmp	w20, #513
	b.lo	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal_error
LBB0_2:
	add	w0, w19, #25
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fatal_error
LBB0_4:
	ldr	x0, [x19]
	add	x1, sp, #8
	mov	x2, x20
	bl	_memcpy
Lloh7:
	adrp	x8, _allocated_strings@GOTPAGE
Lloh8:
	ldr	x8, [x8, _allocated_strings@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	str	x8, [x19, #16]
	ldr	x9, [x8, #8]
	str	x9, [x19, #8]
	str	x19, [x8, #8]
	ldr	x8, [x19, #8]
	add	x8, x8, #16
	b	LBB0_7
LBB0_6:
	stp	x19, x19, [x19, #8]
Lloh10:
	adrp	x8, _allocated_strings@GOTPAGE
Lloh11:
	ldr	x8, [x8, _allocated_strings@GOTPAGEOFF]
LBB0_7:
	str	x19, [x8]
	ldr	x0, [x19]
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	add	sp, sp, #528
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Maximum string length exceeded"

l_.str.1:                               ; @.str.1
	.asciz	"Out of memory"

	.comm	_allocated_strings,8,3          ; @allocated_strings
.subsections_via_symbols
