// File: /workspace/github_cpp_makefile_star2_O2/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_add_itext(LodePNGInfo*, char const*, char const*, char const*, char const*)
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;

  info->itext_keys[info->itext_num - 1] = alloc_string(key);
  info->itext_langtags[info->itext_num - 1] = alloc_string(langtag);
  info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey);
  info->itext_strings[info->itext_num - 1] = alloc_string(str);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
movq %rsi, %r13
movq %rdi, %rbx
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x52730
movq %rax, %rbp
movq 0x60(%rbx), %rax
movq 0x70(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x52730
movq %rax, %r14
movq 0x60(%rbx), %rax
movq 0x78(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x52730
movq %rax, %r15
movq 0x60(%rbx), %rax
movq 0x80(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x52730
movq %rax, %r12
movq %r15, %xmm0
movq %rax, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %rbp, %xmm1
movq %r14, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm1
pcmpeqd %xmm2, %xmm0
movdqa %xmm1, %xmm2
shufps $0xdd, %xmm0, %xmm2     # xmm2 = xmm2[1,3],xmm0[1,3]
shufps $0x88, %xmm0, %xmm1     # xmm1 = xmm1[0,2],xmm0[0,2]
andps %xmm2, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0x763d2
movq %rbp, %rdi
callq 0x52530
movq %r14, %rdi
callq 0x52530
movq %r15, %rdi
callq 0x52530
movq %r12, %rdi
callq 0x52530
pushq $0x53
popq %rax
jmp 0x76447
incq 0x60(%rbx)
movq %rbp, 0x68(%rbx)
movq %r14, 0x70(%rbx)
movq %r15, 0x78(%rbx)
movq %r12, 0x80(%rbx)
movq %r13, %rdi
callq 0x76234
movq 0x60(%rbx), %rcx
movq 0x68(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq (%rsp), %rdi
callq 0x76234
movq 0x60(%rbx), %rcx
movq 0x70(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x8(%rsp), %rdi
callq 0x76234
movq 0x60(%rbx), %rcx
movq 0x78(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x10(%rsp), %rdi
callq 0x76234
movq 0x60(%rbx), %rcx
movq 0x80(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq