// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/lodepng/lodepng.c
// Function: lodepng_add_itext
unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag,
                           const char* transkey, const char* str)
{
  char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1)));
  char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1)));
  char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1)));
  if(!new_keys || !new_langtags || !new_transkeys || !new_strings)
  {
    lodepng_free(new_keys);
    lodepng_free(new_langtags);
    lodepng_free(new_transkeys);
    lodepng_free(new_strings);
    return 83; /*alloc fail*/
  }

  ++info->itext_num;
  info->itext_keys = new_keys;
  info->itext_langtags = new_langtags;
  info->itext_transkeys = new_transkeys;
  info->itext_strings = new_strings;

  string_init(&info->itext_keys[info->itext_num - 1]);
  string_set(&info->itext_keys[info->itext_num - 1], key);

  string_init(&info->itext_langtags[info->itext_num - 1]);
  string_set(&info->itext_langtags[info->itext_num - 1], langtag);

  string_init(&info->itext_transkeys[info->itext_num - 1]);
  string_set(&info->itext_transkeys[info->itext_num - 1], transkey);

  string_init(&info->itext_strings[info->itext_num - 1]);
  string_set(&info->itext_strings[info->itext_num - 1], str);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1120
movq %rax, %rbp
movq 0x60(%r14), %rax
movq 0x70(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1120
movq %rax, %rbx
movq 0x60(%r14), %rax
movq 0x78(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1120
movq %rax, %r15
movq 0x60(%r14), %rax
movq 0x80(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x1120
movq %rax, %r12
testq %rbp, %rbp
je 0x4ada
testq %rbx, %rbx
je 0x4ada
testq %r15, %r15
je 0x4ada
testq %r12, %r12
je 0x4ada
movq %r13, 0x8(%rsp)
movq 0x60(%r14), %r13
leaq 0x1(%r13), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x60(%r14)
movq %rbp, 0x68(%r14)
movq %rbx, 0x70(%r14)
movq %r15, 0x78(%r14)
movq %r12, 0x80(%r14)
movq $0x0, (%rbp,%r13,8)
movl $0x1, %edi
callq 0x10f0
testq %rax, %rax
je 0x49fa
movb $0x0, (%rax)
movq %rax, (%rbp,%r13,8)
movq (%rsp), %rax
leaq -0x8(,%rax,8), %rdi
addq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x481f
movq 0x60(%r14), %rbx
movq 0x70(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x10f0
testq %rax, %rax
je 0x4a3b
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x70(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq 0x18(%rsp), %rsi
callq 0x481f
movq 0x60(%r14), %rbx
movq 0x78(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x10f0
testq %rax, %rax
movq 0x8(%rsp), %r12
je 0x4a7e
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x78(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq 0x20(%rsp), %rsi
callq 0x481f
movq 0x60(%r14), %rbx
movq 0x80(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x10f0
testq %rax, %rax
je 0x4abf
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x80(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq %r12, %rsi
callq 0x481f
xorl %eax, %eax
jmp 0x4aff
movq %rbp, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
movl $0x53, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq