// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_IText_add(LodePNG_IText*, char const*, char const*, char const*, char const*)
unsigned LodePNG_IText_add(LodePNG_IText* text, const char* key, const char* langtag, const char* transkey, const char* str)
{
  char** new_keys = (char**)(realloc(text->keys, sizeof(char*) * (text->num + 1)));
  char** new_langtags = (char**)(realloc(text->langtags, sizeof(char*) * (text->num + 1)));
  char** new_transkeys = (char**)(realloc(text->transkeys, sizeof(char*) * (text->num + 1)));
  char** new_strings = (char**)(realloc(text->strings, sizeof(char*) * (text->num + 1)));
  if(!new_keys || !new_langtags || !new_transkeys || !new_strings)
  {
    free(new_keys);
    free(new_langtags);
    free(new_transkeys);
    free(new_strings);
    return 9934;
  }
  
  text->num++;
  text->keys = new_keys;
  text->langtags = new_langtags;
  text->transkeys = new_transkeys;
  text->strings = new_strings;
  
  string_init(&text->keys[text->num - 1]);
  string_set(&text->keys[text->num - 1], key);
  
  string_init(&text->langtags[text->num - 1]);
  string_set(&text->langtags[text->num - 1], langtag);
  
  string_init(&text->transkeys[text->num - 1]);
  string_set(&text->transkeys[text->num - 1], transkey);
  
  string_init(&text->strings[text->num - 1]);
  string_set(&text->strings[text->num - 1], str);
  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x5500
movq %rax, %rbx
movq (%r14), %rax
movq 0x10(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x5500
movq %rax, %r15
movq (%r14), %rax
movq 0x18(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x5500
movq %rax, %r12
movq (%r14), %rax
movq 0x20(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x5500
movq %rax, %r13
testq %rbx, %rbx
setne %al
testq %r15, %r15
setne %cl
andb %al, %cl
testq %r12, %r12
setne %al
andb %cl, %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x1dc85
movq (%r14), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, -0x30(%rbp)
movq %rcx, (%r14)
movq %rbx, 0x8(%r14)
movq %r15, 0x10(%r14)
movq %rdx, %r15
movq %r12, 0x18(%r14)
movq %r13, 0x20(%r14)
movq $0x0, (%rbx,%rdx,8)
movl $0x1, %edi
callq 0x5420
testq %rax, %rax
je 0x1dbb8
movb $0x0, (%rax)
movq %rax, (%rbx,%r15,8)
movq -0x30(%rbp), %rax
leaq (%rbx,%rax,8), %rdi
addq $-0x8, %rdi
movq -0x38(%rbp), %rsi
callq 0x1d957
movq (%r14), %rbx
movq 0x10(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x5420
testq %rax, %rax
je 0x1dbf4
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x10(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq -0x40(%rbp), %rsi
callq 0x1d957
movq (%r14), %rbx
movq 0x18(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x5420
testq %rax, %rax
je 0x1dc30
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x18(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq -0x48(%rbp), %rsi
callq 0x1d957
movq (%r14), %rbx
movq 0x20(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x5420
testq %rax, %rax
je 0x1dc6c
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x20(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq -0x50(%rbp), %rsi
callq 0x1d957
xorl %eax, %eax
jmp 0x1dcaa
movq %rbx, %rdi
callq 0x5390
movq %r15, %rdi
callq 0x5390
movq %r12, %rdi
callq 0x5390
movq %r13, %rdi
callq 0x5390
movl $0x26ce, %eax           # imm = 0x26CE
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq