	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lodepng_add_text               ## -- Begin function lodepng_add_text
	.p2align	4, 0x90
_lodepng_add_text:                      ## @lodepng_add_text
	.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, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movl	8(%rbx), %eax
	leal	8(,%rax,8), %esi
	callq	_lodepng_realloc
	movq	%rax, %r12
	movq	16(%rbx), %rdi
	movl	8(%rbx), %eax
	leal	8(,%rax,8), %esi
	callq	_lodepng_realloc
	movq	%rax, %r13
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	testq	%r13, %r13
	je	LBB0_2
## %bb.3:
	movslq	8(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 8(%rbx)
	movq	%r12, (%rbx)
	movq	%r13, 16(%rbx)
	leaq	(%r12,%rax,8), %rdi
	callq	_string_init
	movq	(%rbx), %rax
	movslq	8(%rbx), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$-8, %rdi
	movq	%r15, %rsi
	callq	_string_set
	movq	16(%rbx), %rax
	movslq	8(%rbx), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$-8, %rdi
	callq	_string_init
	movq	16(%rbx), %rax
	movslq	8(%rbx), %rcx
	leaq	(%rax,%rcx,8), %rdi
	addq	$-8, %rdi
	movq	%r14, %rsi
	callq	_string_set
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	%r12, %rdi
	callq	_lodepng_free
	movq	%r13, %rdi
	callq	_lodepng_free
	movl	$83, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lodepng_add_text               ; -- Begin function lodepng_add_text
	.p2align	2
_lodepng_add_text:                      ; @lodepng_add_text
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
	ldr	w8, [x20, #8]
	lsl	w8, w8, #3
	add	w1, w8, #8
	bl	_lodepng_realloc
	mov	x22, x0
	ldr	x0, [x20, #16]
	ldr	w8, [x20, #8]
	lsl	w8, w8, #3
	add	w1, w8, #8
	bl	_lodepng_realloc
	mov	x23, x0
	cmp	x22, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_lodepng_free
	mov	x0, x23
	bl	_lodepng_free
	mov	w0, #83
	b	LBB0_3
LBB0_2:
	ldrsw	x8, [x20, #8]
	add	w9, w8, #1
	str	w9, [x20, #8]
	str	x22, [x20]
	str	x23, [x20, #16]
	add	x0, x22, x8, lsl #3
	bl	_string_init
	ldr	x8, [x20]
	ldrsw	x9, [x20, #8]
	add	x8, x8, x9, lsl #3
	sub	x0, x8, #8
	mov	x1, x21
	bl	_string_set
	ldr	x8, [x20, #16]
	ldrsw	x9, [x20, #8]
	add	x8, x8, x9, lsl #3
	sub	x0, x8, #8
	bl	_string_init
	ldr	x8, [x20, #16]
	ldrsw	x9, [x20, #8]
	add	x8, x8, x9, lsl #3
	sub	x0, x8, #8
	mov	x1, x19
	bl	_string_set
	mov	w0, #0
LBB0_3:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
