// File: /workspace/github_cpp_makefile_star2_O2/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, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44d0
movq %rax, %rbx
movq (%r14), %rax
movq 0x10(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44d0
movq %rax, %r15
movq (%r14), %rax
movq 0x18(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44d0
movq %rax, %r12
movq (%r14), %rax
movq 0x20(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44d0
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 0x122c2
movq (%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r14)
movq %rbx, 0x8(%r14)
movq %r15, 0x10(%r14)
movq %r12, 0x18(%r14)
movq %r13, 0x20(%r14)
leaq (%rbx,%rax,8), %rdi
callq 0x11ffe
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq -0x30(%rbp), %rsi
callq 0x1200e
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
callq 0x11ffe
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq -0x38(%rbp), %rsi
callq 0x1200e
movq (%r14), %rax
movq 0x18(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
callq 0x11ffe
movq (%r14), %rax
movq 0x18(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq -0x40(%rbp), %rsi
callq 0x1200e
movq (%r14), %rax
movq 0x20(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
callq 0x11ffe
movq (%r14), %rax
movq 0x20(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq -0x48(%rbp), %rsi
callq 0x1200e
xorl %eax, %eax
jmp 0x122e7
movq %rbx, %rdi
callq 0x4350
movq %r15, %rdi
callq 0x4350
movq %r12, %rdi
callq 0x4350
movq %r13, %rdi
callq 0x4350
movl $0x26ce, %eax           # imm = 0x26CE
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq