void test_str_escape() {
  {
    if (strcmp(str_escape("\tAnbms\n"), "\\tAnbms\\n") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1200);
    } else
      printf("%s (%s %d): \"%s\" != \"%s\"\n", __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/"
             "master/utils/str.h",
             1200, str_escape("\tAnbms\n"), "\\tAnbms\\n");
  };
  {
    if (strcmp(str_escape("\tA\v\fZ\a"), "\\tA\\v\\fZ\\a") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1201);
    } else
      printf("%s (%s %d): \"%s\" != \"%s\"\n", __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/"
             "master/utils/str.h",
             1201, str_escape("\tA\v\fZ\a"), "\\tA\\v\\fZ\\a");
  };
  {
    if (strcmp(str_escape("txt \t\n\r\f\a\v 1 \t\n\r\f\a\v tt"),
               "txt \\t\\n\\r\\f\\a\\v 1 \\t\\n\\r\\f\\a\\v tt") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1202);
    } else
      printf("%s (%s %d): \"%s\" != \"%s\"\n", __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/"
             "master/utils/str.h",
             1202, str_escape("txt \t\n\r\f\a\v 1 \t\n\r\f\a\v tt"),
             "txt \\t\\n\\r\\f\\a\\v 1 \\t\\n\\r\\f\\a\\v tt");
  };
  {
    if (strcmp(str_escape("dhsjdsdjhs hjd hjds "), "dhsjdsdjhs hjd hjds ") ==
        0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1203);
    } else
      printf("%s (%s %d): \"%s\" != \"%s\"\n", __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/"
             "master/utils/str.h",
             1203, str_escape("dhsjdsdjhs hjd hjds "), "dhsjdsdjhs hjd hjds ");
  };
  {
    if (strcmp(str_escape(""), "") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1204);
    } else
      printf("%s (%s %d): \"%s\" != \"%s\"\n", __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/"
             "master/utils/str.h",
             1204, str_escape(""), "");
  };
  {
    if (strcmp(str_escape(
                   "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW"
                   "XYZ!\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\f\a\v"),
               "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"
               "\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \\t\\n\\r\\f\\a\\v") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1205);
    } else
      printf(
          "%s (%s %d): \"%s\" != \"%s\"\n", __func__,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/master/"
          "utils/str.h",
          1205,
          str_escape("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU"
                     "VWXYZ!\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\f\a\v"),
          "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%"
          "&\'()*+,-./:;<=>?@[\\]^_`{|}~ \\t\\n\\r\\f\\a\\v");
  };
  {
    if (strcmp(str_escape("\x0b\x0c\t\n\r\f\a\v"),
               "\\v\\f\\t\\n\\r\\f\\a\\v") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1206);
    } else
      printf("%s (%s %d): \"%s\" != \"%s\"\n", __func__,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/"
             "master/utils/str.h",
             1206, str_escape("\x0b\x0c\t\n\r\f\a\v"),
             "\\v\\f\\t\\n\\r\\f\\a\\v");
  };
  {
    if (strcmp(
            str_escape(
                "\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11"
                "\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x00"),
            "\x01\x02\x03\x04\x05\x06\\a\\b\\t\\n\\v\\f\\r\x0e\x0f\x10\x11\x12"
            "\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x00") == 0) {
      if (0 == 1)
        printf((0 == 1) ? "\033[1;37;42mOK\033[00m: %s (%s, %d)\n"
                        : "OK: %s (%s, %d)\n",
               __func__,
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/"
               "heads/master/utils/str.h",
               1207);
    } else
      printf(
          "%s (%s %d): \"%s\" != \"%s\"\n", __func__,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/master/"
          "utils/str.h",
          1207,
          str_escape(
              "\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11"
              "\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x00"),
          "\x01\x02\x03\x04\x05\x06\\a\\b\\t\\n\\v\\f\\r\x0e\x0f\x10\x11\x12"
          "\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x00");
  };
}


x86 assembly (clang, -O0):
<test_str_escape>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xebc(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    115f <test_str_escape+0x2f>
jmp    1198 <test_str_escape+0x68>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xe9b(%rip),%rdi
lea    0xeae(%rip),%rsi
lea    0xeb7(%rip),%rdx
mov    $0x4b0,%ecx
lea    0xe77(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2b(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xf21(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11c3 <test_str_escape+0x93>
jmp    11fc <test_str_escape+0xcc>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xe37(%rip),%rdi
lea    0xe4a(%rip),%rsi
lea    0xe53(%rip),%rdx
mov    $0x4b1,%ecx
lea    0xedc(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xedf(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1227 <test_str_escape+0xf7>
jmp    1260 <test_str_escape+0x130>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xdd3(%rip),%rdi
lea    0xde6(%rip),%rsi
lea    0xdef(%rip),%rdx
mov    $0x4b2,%ecx
lea    0xe9a(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xe9e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    128b <test_str_escape+0x15b>
jmp    12c4 <test_str_escape+0x194>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xd6f(%rip),%rdi
lea    0xd82(%rip),%rsi
lea    0xd8b(%rip),%rdx
mov    $0x4b3,%ecx
lea    0xe59(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xdf4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12ef <test_str_escape+0x1bf>
jmp    1328 <test_str_escape+0x1f8>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xd0b(%rip),%rdi
lea    0xd1e(%rip),%rsi
lea    0xd27(%rip),%rdx
mov    $0x4b4,%ecx
lea    0xdaf(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xe51(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1353 <test_str_escape+0x223>
jmp    138c <test_str_escape+0x25c>
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xca7(%rip),%rdi
lea    0xcba(%rip),%rsi
lea    0xcc3(%rip),%rdx
mov    $0x4b5,%ecx
lea    0xe0c(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xe62(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    13b7 <test_str_escape+0x287>
jmp    13f0 <test_str_escape+0x2c0>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xc43(%rip),%rdi
lea    0xc56(%rip),%rsi
lea    0xc5f(%rip),%rdx
mov    $0x4b6,%ecx
lea    0xe1d(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xe30(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    141b <test_str_escape+0x2eb>
jmp    1454 <test_str_escape+0x324>
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1050 <str_escape@plt>
mov    %eax,%r8d
lea    0xbdf(%rip),%rdi
lea    0xbf2(%rip),%rsi
lea    0xbfb(%rip),%rdx
mov    $0x4b7,%ecx
lea    0xdeb(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_str_escape>:
push   %rbx
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xebf(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     118b <test_str_escape+0x5b>
lea    0xea7(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xeab(%rip),%rdi
lea    0xebe(%rip),%rsi
lea    0xec7(%rip),%rdx
lea    0xe8c(%rip),%r9
mov    $0x4b0,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xf2e(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11e5 <test_str_escape+0xb5>
lea    0xf17(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xe51(%rip),%rdi
lea    0xe64(%rip),%rsi
lea    0xe6d(%rip),%rdx
lea    0xefb(%rip),%r9
mov    $0x4b1,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xef6(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     123f <test_str_escape+0x10f>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xdf7(%rip),%rdi
lea    0xe0a(%rip),%rsi
lea    0xe13(%rip),%rdx
lea    0xec3(%rip),%r9
mov    $0x4b2,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1297 <test_str_escape+0x167>
lea    0xeb0(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xd9b(%rip),%rdi
lea    0xdae(%rip),%rsi
lea    0xdb7(%rip),%rdx
mov    $0x4b3,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
cltq
cmpb   $0x0,(%rax)
je     12e4 <test_str_escape+0x1b4>
lea    0xe1d(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xd4e(%rip),%rdi
lea    0xd61(%rip),%rsi
lea    0xd6a(%rip),%rdx
mov    $0x4b4,%ecx
mov    %eax,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xe95(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133e <test_str_escape+0x20e>
lea    0xe1f(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xcf8(%rip),%rdi
lea    0xd0b(%rip),%rsi
lea    0xd14(%rip),%rdx
lea    0xe62(%rip),%r9
mov    $0x4b5,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xeb0(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1398 <test_str_escape+0x268>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xc9e(%rip),%rdi
lea    0xcb1(%rip),%rsi
lea    0xcba(%rip),%rdx
lea    0xe7d(%rip),%r9
mov    $0x4b6,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
movslq %eax,%rdi
lea    0xe88(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13f3 <test_str_escape+0x2c3>
lea    0xe57(%rip),%rdi
xor    %eax,%eax
call   1050 <str_escape@plt>
lea    0xc44(%rip),%rdi
lea    0xc57(%rip),%rsi
lea    0xc60(%rip),%rdx
lea    0xe55(%rip),%r9
mov    $0x4b7,%ecx
mov    %eax,%r8d
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\09Anbms\0A\00"
@.str.1 = [10 x i8] c"\\tAnbms\\n\00"
@.str.2 = [26 x i8] c"%s (%s %d): \22%s\22 != \22%s\22\0A\00"
@__func__.test_str_escape = [16 x i8] c"test_str_escape\00"
@.str.3 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/master/utils/str.h\00"
@.str.4 = [7 x i8] c"\09A\0B\0CZ\07\00"
@.str.5 = [11 x i8] c"\\tA\\v\\fZ\\a\00"
@.str.6 = [23 x i8] c"txt \09\0A\0D\0C\07\0B 1 \09\0A\0D\0C\07\0B tt\00"
@.str.7 = [35 x i8] c"txt \\t\\n\\r\\f\\a\\v 1 \\t\\n\\r\\f\\a\\v tt\00"
@.str.8 = [21 x i8] c"dhsjdsdjhs hjd hjds \00"
@.str.9 = [1 x i8] zeroinitializer
@.str.10 = [102 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \09\0A\0D\0C\07\0B\00"
@.str.11 = [108 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \\t\\n\\r\\f\\a\\v\00"
@.str.12 = [9 x i8] c"\0B\0C\09\0A\0D\0C\07\0B\00"
@.str.13 = [17 x i8] c"\\v\\f\\t\\n\\r\\f\\a\\v\00"
@.str.14 = [33 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F\00\00"
@.str.15 = [40 x i8] c"\01\02\03\04\05\06\\a\\b\\t\\n\\v\\f\\r\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F\00\00"
define void @test_str_escape() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = call i32 @strcmp(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
br label %10
7: ; preds = %0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1200, i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %7, %6
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %10
br label %20
17: ; preds = %10
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1201, i32 %18, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %20
20: ; preds = %17, %16
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8*
%24 = call i32 @strcmp(i8* %23, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %20
br label %30
27: ; preds = %20
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1202, i32 %28, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
br label %30
30: ; preds = %27, %26
%31 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i8*
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %30
br label %40
37: ; preds = %30
%38 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1203, i32 %38, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %40
40: ; preds = %37, %36
%41 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%42 = sext i32 %41 to i64
%43 = inttoptr i64 %42 to i8*
%44 = call i32 @strcmp(i8* %43, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %40
br label %50
47: ; preds = %40
%48 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1204, i32 %48, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
br label %50
50: ; preds = %47, %46
%51 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.10, i64 0, i64 0))
%52 = sext i32 %51 to i64
%53 = inttoptr i64 %52 to i8*
%54 = call i32 @strcmp(i8* %53, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0))
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %50
br label %60
57: ; preds = %50
%58 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.10, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1205, i32 %58, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0))
br label %60
60: ; preds = %57, %56
%61 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%62 = sext i32 %61 to i64
%63 = inttoptr i64 %62 to i8*
%64 = call i32 @strcmp(i8* %63, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %60
br label %70
67: ; preds = %60
%68 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1206, i32 %68, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
br label %70
70: ; preds = %67, %66
%71 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0))
%72 = sext i32 %71 to i64
%73 = inttoptr i64 %72 to i8*
%74 = call i32 @strcmp(i8* %73, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%75 = icmp eq i32 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %70
br label %80
77: ; preds = %70
%78 = call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0))
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1207, i32 %78, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
br label %80
80: ; preds = %77, %76
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\09Anbms\0A\00"
@.str.1 = [10 x i8] c"\\tAnbms\\n\00"
@.str.2 = [26 x i8] c"%s (%s %d): \22%s\22 != \22%s\22\0A\00"
@__func__.test_str_escape = [16 x i8] c"test_str_escape\00"
@.str.3 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/setivolkylany/c-utils/refs/heads/master/utils/str.h\00"
@.str.4 = [7 x i8] c"\09A\0B\0CZ\07\00"
@.str.5 = [11 x i8] c"\\tA\\v\\fZ\\a\00"
@.str.6 = [23 x i8] c"txt \09\0A\0D\0C\07\0B 1 \09\0A\0D\0C\07\0B tt\00"
@.str.7 = [35 x i8] c"txt \\t\\n\\r\\f\\a\\v 1 \\t\\n\\r\\f\\a\\v tt\00"
@.str.8 = [21 x i8] c"dhsjdsdjhs hjd hjds \00"
@.str.9 = [1 x i8] zeroinitializer
@.str.10 = [102 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \09\0A\0D\0C\07\0B\00"
@.str.11 = [108 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\22#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \\t\\n\\r\\f\\a\\v\00"
@.str.12 = [9 x i8] c"\0B\0C\09\0A\0D\0C\07\0B\00"
@.str.13 = [17 x i8] c"\\v\\f\\t\\n\\r\\f\\a\\v\00"
@.str.14 = [33 x i8] c"\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F\00\00"
@.str.15 = [40 x i8] c"\01\02\03\04\05\06\\a\\b\\t\\n\\v\\f\\r\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F\00\00"
define void @test_str_escape() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1200, i32 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %0, %6
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %9
%16 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1201, i32 %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %18
18: ; preds = %9, %15
%19 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(35) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %18
%25 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1202, i32 %25, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
br label %27
27: ; preds = %18, %24
%28 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i8*
%31 = tail call i32 @strcmp(i8* dereferenceable(1) %30, i8* dereferenceable(21) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %27
%34 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1203, i32 %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %36
36: ; preds = %27, %33
%37 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%38 = sext i32 %37 to i64
%39 = inttoptr i64 %38 to i8*
%40 = load i8, i8* %39
%41 = icmp eq i8 %40, 0
br i1 %41, label %45, label %42
42: ; preds = %36
%43 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1204, i32 %43, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
br label %45
45: ; preds = %36, %42
%46 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.10, i64 0, i64 0))
%47 = sext i32 %46 to i64
%48 = inttoptr i64 %47 to i8*
%49 = tail call i32 @strcmp(i8* dereferenceable(1) %48, i8* dereferenceable(108) getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0))
%50 = icmp eq i32 %49, 0
br i1 %50, label %54, label %51
51: ; preds = %45
%52 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.10, i64 0, i64 0))
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1205, i32 %52, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0))
br label %54
54: ; preds = %45, %51
%55 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%56 = sext i32 %55 to i64
%57 = inttoptr i64 %56 to i8*
%58 = tail call i32 @strcmp(i8* dereferenceable(1) %57, i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %63, label %60
60: ; preds = %54
%61 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1206, i32 %61, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
br label %63
63: ; preds = %54, %60
%64 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0))
%65 = sext i32 %64 to i64
%66 = inttoptr i64 %65 to i8*
%67 = tail call i32 @strcmp(i8* dereferenceable(1) %66, i8* dereferenceable(39) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %72, label %69
69: ; preds = %63
%70 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_escape to i32 (i8*, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0))
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.test_str_escape, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.3, i64 0, i64 0), i32 1207, i32 %70, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
br label %72
72: ; preds = %63, %69
ret void
}