#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *mstrcat(char *, char *);
char *mstrdup(char *);
char *mstrelem(char *, int);
int mstrlen(char *);
int mstrncat(char *, char *, int);
int mstrsize(char *);
int /*<<< orphan*/ print_failf(char *, ...);
int /*<<< orphan*/ print_passf(char *);
scalar_t__ strcmp(char *, char *);
int main(const int argc, const char **argv) {
  int errors = 0, i = 0, n = 0;
  char *t, *c, buf[18];
  t = "one\0two\0three\0";
  n = mstrlen(t);
  if (3 == n) {
    print_passf("mstrlen: length of multi-string array");
  } else {
    errors++;
    print_failf("mstrlen: expected multi-string length 3, got: %i", n);
  }
  n = mstrlen("");
  if (0 == n) {
    print_passf("mstrlen: length of empty multi-string array");
  } else {
    errors++;
    print_failf("mstrlen: expected multi-string length 0, got: %i", n);
  }
  n = mstrsize(t);
  if (15 == n) {
    print_passf("mstrsize: size of multi-string array");
  } else {
    errors++;
    print_failf("mstrsize: expected multi-string size 15, got: %i", n);
  }
  n = mstrsize("");
  if (0 != n) {
    errors++;
    print_failf("mstrsize: expected multi-string size 0, got: %i", n);
  }
  c = mstrdup(t);
  n = -1;
  for (i = 0; i < 15; i++) {
    if (t[i] != c[i]) {
      n = i;
      break;
    }
  }
  free(c);
  if (-1 == n) {
    print_passf("mstrdup: duplicate multi-string");
  } else {
    errors++;
    print_failf(
        "mstrdup: duplicated multi-string does not match source at char %i", n);
  }
  c = mstrelem(t, 0);
  if (0 != strcmp(c, "one")) {
    errors++;
    print_failf(
        "Expected element 0 in multi-string array to be \"one\", got: \"%s\"\n",
        c);
  }
  c = mstrelem(t, 1);
  if (0 != strcmp(c, "two")) {
    errors++;
    print_failf(
        "Expected element 1 in multi-string array to be \"two\", got: \"%s\"\n",
        c);
  }
  c = mstrelem(t, 2);
  if (0 != strcmp(c, "three")) {
    errors++;
    print_failf("Expected element 2 in multi-string array to be \"three\", "
                "got: \"%s\"\n",
                c);
  }
  c = mstrelem(t, 3);
  if (c) {
    errors++;
    print_failf(
        "Expected element 3 in multi-string array to be NULL, got: \"%s\"\n",
        c);
  }
  c = mstrelem("", 0);
  if (c) {
    errors++;
    print_failf("Expected element 0 in empty multi-string array to be NULL, "
                "got: \"%s\"\n",
                c);
  }
  memset(buf, 0, sizeof(buf));
  n = mstrncat(buf, "one", sizeof(buf));
  if (n != 3) {
    errors++;
    print_failf("Expected append operation to write 3 characters, got: %i\n",
                n);
  }
  n = mstrncat(buf, "two", sizeof(buf));
  if (n != 3) {
    errors++;
    print_failf("Expected append operation to write 3 characters, got: %i\n",
                n);
  }
  n = mstrncat(buf, "three", sizeof(buf));
  if (n != 5) {
    errors++;
    print_failf("Expected append operation to write 3 characters, got: %i\n",
                n);
  }
  n = mstrncat(buf, "four", sizeof(buf));
  if (n != 2) {
    errors++;
    print_failf("Expected append operation to write 2 characters, got: %i\n",
                n);
  }
  n = mstrncat(buf, "five", sizeof(buf));
  if (n != 0) {
    errors++;
    print_failf("Expected append operation to write 0 characters, got: %i\n",
                n);
  }
  c = mstrelem(buf, 0);
  if (0 != strcmp(c, "one")) {
    errors++;
    print_failf(
        "Expected element 0 in multi-string array to be \"one\", got: \"%s\"\n",
        c);
  }
  c = mstrelem(buf, 1);
  if (0 != strcmp(c, "two")) {
    errors++;
    print_failf(
        "Expected element 1 in multi-string array to be \"two\", got: \"%s\"\n",
        c);
  }
  c = mstrelem(buf, 2);
  if (0 != strcmp(c, "three")) {
    errors++;
    print_failf("Expected element 2 in multi-string array to be \"three\", "
                "got: \"%s\"\n",
                c);
  }
  c = mstrelem(buf, 3);
  if (0 != strcmp(c, "fo")) {
    errors++;
    print_failf(
        "Expected element 3 in multi-string array to be \"fo\", got: \"%s\"\n",
        c);
  }
  t = mstrdup(t);
  t = mstrcat(t, "four");
  c = mstrelem(t, 3);
  if (c && 0 == strcmp("four", c)) {
    print_passf("mstrcat: append to non-empty multi-string array");
  } else {
    errors++;
    print_failf("mstrcat: expected element 3 in multi-string array to be "
                "\"four\", got: \"%s\"\n",
                c);
  }
  t = mstrdup("");
  t = mstrcat(t, "one");
  c = mstrelem(t, 0);
  if (c && 0 == strcmp("one", c)) {
    print_passf("mstrcat: append to empty multi-string array");
  } else {
    errors++;
    print_failf("mstrcat: expected element 0 in multi-string array to be "
                "\"one\", got: \"%s\"\n",
                c);
  }
  return errors;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xe1e(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   10b0 <mstrlen@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x3,%eax
cmp    -0x1c(%rbp),%eax
jne    1211 <main+0x61>
lea    0xe08(%rip),%rdi
call   1090 <print_passf@plt>
jmp    122b <main+0x7b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    0x104b(%rip),%rdi
call   10b0 <mstrlen@plt>
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmp    -0x1c(%rbp),%eax
jne    1256 <main+0xa6>
lea    0xe1a(%rip),%rdi
call   1090 <print_passf@plt>
jmp    1270 <main+0xc0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
call   1040 <mstrsize@plt>
mov    %eax,-0x1c(%rbp)
mov    $0xf,%eax
cmp    -0x1c(%rbp),%eax
jne    129b <main+0xeb>
lea    0xe32(%rip),%rdi
call   1090 <print_passf@plt>
jmp    12b5 <main+0x105>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    0xfc1(%rip),%rdi
call   1040 <mstrsize@plt>
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmp    -0x1c(%rbp),%eax
je     12e9 <main+0x139>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
call   1080 <mstrdup@plt>
mov    %rax,-0x30(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xf,-0x18(%rbp)
jge    134c <main+0x19c>
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x30(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1339 <main+0x189>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    134c <main+0x19c>
jmp    133e <main+0x18e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1304 <main+0x154>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    $0xffffffff,%eax
cmp    -0x1c(%rbp),%eax
jne    1374 <main+0x1c4>
lea    0xddf(%rip),%rdi
call   1090 <print_passf@plt>
jmp    138e <main+0x1de>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe03(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     13d6 <main+0x226>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xdfd(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1421 <main+0x271>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
mov    $0x2,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xdf7(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     146c <main+0x2bc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     14a4 <main+0x2f4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    0xdd2(%rip),%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     14dc <main+0x32c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x12,%edx
call   1050 <memset@plt>
lea    -0x50(%rbp),%rdi
lea    0xcb4(%rip),%rsi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
je     1528 <main+0x378>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
lea    0xcbd(%rip),%rsi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
je     1564 <main+0x3b4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xda7(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
lea    0xcc6(%rip),%rsi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
je     15a0 <main+0x3f0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xd6b(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
lea    0xd93(%rip),%rsi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
je     15dc <main+0x42c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
lea    0xd96(%rip),%rsi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1618 <main+0x468>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xb79(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1660 <main+0x4b0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xb56(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
mov    $0x1,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xb73(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     16ab <main+0x4fb>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xb50(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
mov    $0x2,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xb6d(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     16f6 <main+0x546>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xb4c(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    -0x50(%rbp),%rdi
mov    $0x3,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xca9(%rip),%rsi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1741 <main+0x591>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x28(%rbp),%rdi
call   1080 <mstrdup@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xbe5(%rip),%rsi
call   10a0 <mstrcat@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     17ae <main+0x5fe>
mov    -0x30(%rbp),%rsi
lea    0xbb4(%rip),%rdi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    17ae <main+0x5fe>
lea    0xc5b(%rip),%rdi
call   1090 <print_passf@plt>
jmp    17c9 <main+0x619>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xc6d(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
lea    0xaad(%rip),%rdi
call   1080 <mstrdup@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0x9c7(%rip),%rsi
call   10a0 <mstrcat@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1836 <main+0x686>
mov    -0x30(%rbp),%rsi
lea    0x999(%rip),%rdi
call   1060 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1836 <main+0x686>
lea    0xc4e(%rip),%rdi
call   1090 <print_passf@plt>
jmp    1851 <main+0x6a1>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xc5c(%rip),%rdi
mov    $0x0,%al
call   10c0 <print_failf@plt>
mov    -0x14(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
lea    0xe43(%rip),%rdi
call   10b0 <mstrlen@plt>
cmp    $0x3,%eax
jne    11d7 <main+0x27>
lea    0xe41(%rip),%rdi
call   1090 <print_passf@plt>
xor    %ebx,%ebx
jmp    11ec <main+0x3c>
lea    0xe57(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
mov    $0x1,%ebx
lea    0x108a(%rip),%rdi
call   10b0 <mstrlen@plt>
test   %eax,%eax
je     1211 <main+0x61>
add    $0x1,%ebx
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
jmp    121d <main+0x6d>
lea    0xe4e(%rip),%rdi
call   1090 <print_passf@plt>
lea    0xddc(%rip),%rdi
call   1040 <mstrsize@plt>
cmp    $0xf,%eax
jne    123c <main+0x8c>
lea    0xe8e(%rip),%rdi
call   1090 <print_passf@plt>
jmp    124f <main+0x9f>
add    $0x1,%ebx
lea    0xea2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0x1027(%rip),%rdi
call   1040 <mstrsize@plt>
test   %eax,%eax
je     1272 <main+0xc2>
add    $0x1,%ebx
lea    0xeb0(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xd87(%rip),%rdi
call   1080 <mstrdup@plt>
xor    %ebp,%ebp
cmpb   $0x6f,(%rax)
jne    132f <main+0x17f>
mov    $0x1,%ebp
cmpb   $0x6e,0x1(%rax)
jne    132f <main+0x17f>
mov    $0x2,%ebp
cmpb   $0x65,0x2(%rax)
jne    132f <main+0x17f>
mov    $0x3,%ebp
cmpb   $0x0,0x3(%rax)
jne    132f <main+0x17f>
mov    $0x4,%ebp
cmpb   $0x74,0x4(%rax)
jne    132f <main+0x17f>
mov    $0x5,%ebp
cmpb   $0x77,0x5(%rax)
jne    132f <main+0x17f>
mov    $0x6,%ebp
cmpb   $0x6f,0x6(%rax)
jne    132f <main+0x17f>
mov    $0x7,%ebp
cmpb   $0x0,0x7(%rax)
jne    132f <main+0x17f>
mov    $0x8,%ebp
cmpb   $0x74,0x8(%rax)
jne    132f <main+0x17f>
mov    $0x9,%ebp
cmpb   $0x68,0x9(%rax)
jne    132f <main+0x17f>
mov    $0xa,%ebp
cmpb   $0x72,0xa(%rax)
jne    132f <main+0x17f>
mov    $0xb,%ebp
cmpb   $0x65,0xb(%rax)
jne    132f <main+0x17f>
mov    $0xc,%ebp
cmpb   $0x65,0xc(%rax)
jne    132f <main+0x17f>
mov    $0xd,%ebp
cmpb   $0x0,0xd(%rax)
jne    132f <main+0x17f>
mov    $0xe,%ebp
cmpb   $0x0,0xe(%rax)
je     16e8 <main+0x538>
mov    %rax,%rdi
call   1030 <free@plt>
add    $0x1,%ebx
lea    0xe28(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xcaf(%rip),%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xe49(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1383 <main+0x1d3>
add    $0x1,%ebx
lea    0xe36(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xc76(%rip),%rdi
mov    $0x1,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xe52(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     13bf <main+0x20f>
add    $0x1,%ebx
lea    0xe3f(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xc3a(%rip),%rdi
mov    $0x2,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xe5b(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     13fb <main+0x24b>
add    $0x1,%ebx
lea    0xe4a(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xbfe(%rip),%rdi
mov    $0x3,%esi
call   1070 <mstrelem@plt>
test   %rax,%rax
je     1425 <main+0x275>
add    $0x1,%ebx
lea    0xe63(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xe51(%rip),%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
test   %rax,%rax
je     144c <main+0x29c>
add    $0x1,%ebx
lea    0xe7c(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
mov    %rsp,%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x12,%edx
call   1050 <memset@plt>
lea    0xd46(%rip),%rsi
mov    %rbp,%rdi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
cmp    $0x3,%eax
je     148a <main+0x2da>
add    $0x1,%ebx
lea    0xe83(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xd5f(%rip),%rsi
mov    %rsp,%rdi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
cmp    $0x3,%eax
je     14b6 <main+0x306>
add    $0x1,%ebx
lea    0xe57(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xd78(%rip),%rsi
mov    %rsp,%rdi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
cmp    $0x5,%eax
je     14e2 <main+0x332>
add    $0x1,%ebx
lea    0xe2b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xe55(%rip),%rsi
mov    %rsp,%rdi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
cmp    $0x2,%eax
je     150e <main+0x35e>
add    $0x1,%ebx
lea    0xe3e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0xe68(%rip),%rsi
mov    %rsp,%rdi
mov    $0x12,%edx
call   10d0 <mstrncat@plt>
test   %eax,%eax
je     1539 <main+0x389>
add    $0x1,%ebx
lea    0xe52(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10c0 <print_failf@plt>
mov    %rsp,%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xc5e(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     156e <main+0x3be>
add    $0x1,%ebx
lea    0xc4b(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
mov    %rsp,%rdi
mov    $0x1,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xc6b(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     15a6 <main+0x3f6>
add    $0x1,%ebx
lea    0xc58(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
mov    %rsp,%rdi
mov    $0x2,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xc78(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     15de <main+0x42e>
add    $0x1,%ebx
lea    0xc67(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
mov    %rsp,%rdi
mov    $0x3,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
lea    0xdc7(%rip),%rsi
mov    %rax,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1616 <main+0x466>
add    $0x1,%ebx
lea    0xdb3(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
lea    0x9e3(%rip),%rdi
call   1080 <mstrdup@plt>
lea    0xd15(%rip),%rsi
mov    %rax,%rdi
call   10a0 <mstrcat@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
test   %rax,%rax
je     165a <main+0x4aa>
lea    0xcf1(%rip),%rdi
mov    %rbp,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1670 <main+0x4c0>
add    $0x1,%ebx
lea    0xdcb(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
jmp    167c <main+0x4cc>
lea    0xd88(%rip),%rdi
call   1090 <print_passf@plt>
lea    0xbfa(%rip),%rdi
call   1080 <mstrdup@plt>
lea    0xb1c(%rip),%rsi
mov    %rax,%rdi
call   10a0 <mstrcat@plt>
mov    %rax,%rdi
xor    %esi,%esi
call   1070 <mstrelem@plt>
mov    %rax,%rbp
test   %rax,%rax
je     16bd <main+0x50d>
lea    0xafb(%rip),%rdi
mov    %rbp,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     16d3 <main+0x523>
add    $0x1,%ebx
lea    0xddf(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10c0 <print_failf@plt>
jmp    16df <main+0x52f>
lea    0xda0(%rip),%rdi
call   1090 <print_passf@plt>
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rax,%rdi
call   1030 <free@plt>
lea    0xa52(%rip),%rdi
call   1090 <print_passf@plt>
jmp    134a <main+0x19a>

LLVM IR (-O0):
@.str = [15 x i8] c"one\00two\00three\00\00"
@.str.1 = [38 x i8] c"mstrlen: length of multi-string array\00"
@.str.2 = [49 x i8] c"mstrlen: expected multi-string length 3, got: %i\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [44 x i8] c"mstrlen: length of empty multi-string array\00"
@.str.5 = [49 x i8] c"mstrlen: expected multi-string length 0, got: %i\00"
@.str.6 = [37 x i8] c"mstrsize: size of multi-string array\00"
@.str.7 = [49 x i8] c"mstrsize: expected multi-string size 15, got: %i\00"
@.str.8 = [48 x i8] c"mstrsize: expected multi-string size 0, got: %i\00"
@.str.9 = [32 x i8] c"mstrdup: duplicate multi-string\00"
@.str.10 = [66 x i8] c"mstrdup: duplicated multi-string does not match source at char %i\00"
@.str.11 = [4 x i8] c"one\00"
@.str.12 = [65 x i8] c"Expected element 0 in multi-string array to be \22one\22, got: \22%s\22\0A\00"
@.str.13 = [4 x i8] c"two\00"
@.str.14 = [65 x i8] c"Expected element 1 in multi-string array to be \22two\22, got: \22%s\22\0A\00"
@.str.15 = [6 x i8] c"three\00"
@.str.16 = [67 x i8] c"Expected element 2 in multi-string array to be \22three\22, got: \22%s\22\0A\00"
@.str.17 = [64 x i8] c"Expected element 3 in multi-string array to be NULL, got: \22%s\22\0A\00"
@.str.18 = [70 x i8] c"Expected element 0 in empty multi-string array to be NULL, got: \22%s\22\0A\00"
@.str.19 = [58 x i8] c"Expected append operation to write 3 characters, got: %i\0A\00"
@.str.20 = [5 x i8] c"four\00"
@.str.21 = [58 x i8] c"Expected append operation to write 2 characters, got: %i\0A\00"
@.str.22 = [5 x i8] c"five\00"
@.str.23 = [58 x i8] c"Expected append operation to write 0 characters, got: %i\0A\00"
@.str.24 = [3 x i8] c"fo\00"
@.str.25 = [64 x i8] c"Expected element 3 in multi-string array to be \22fo\22, got: \22%s\22\0A\00"
@.str.26 = [48 x i8] c"mstrcat: append to non-empty multi-string array\00"
@.str.27 = [75 x i8] c"mstrcat: expected element 3 in multi-string array to be \22four\22, got: \22%s\22\0A\00"
@.str.28 = [44 x i8] c"mstrcat: append to empty multi-string array\00"
@.str.29 = [74 x i8] c"mstrcat: expected element 0 in multi-string array to be \22one\22, got: \22%s\22\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [18 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %9
%12 = load i8*, i8** %9
%13 = call i32 @mstrlen(i8* %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 3, %14
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 @print_passf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %23
18: ; preds = %2
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
%21 = load i32, i32* %8
%22 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %18, %16
%24 = call i32 @mstrlen(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i32 %24, i32* %8
%25 = load i32, i32* %8
%26 = icmp eq i32 0, %25
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @print_passf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
br label %34
29: ; preds = %23
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
%32 = load i32, i32* %8
%33 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %29, %27
%35 = load i8*, i8** %9
%36 = call i32 @mstrsize(i8* %35)
store i32 %36, i32* %8
%37 = load i32, i32* %8
%38 = icmp eq i32 15, %37
br i1 %38, label %39, label %41
39: ; preds = %34
%40 = call i32 @print_passf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
br label %46
41: ; preds = %34
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %6
%44 = load i32, i32* %8
%45 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %41, %39
%47 = call i32 @mstrsize(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i32 %47, i32* %8
%48 = load i32, i32* %8
%49 = icmp ne i32 0, %48
br i1 %49, label %50, label %55
50: ; preds = %46
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
%53 = load i32, i32* %8
%54 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %50, %46
%56 = load i8*, i8** %9
%57 = call i8* @mstrdup(i8* %56)
store i8* %57, i8** %10
store i32 -1, i32* %8
store i32 0, i32* %7
br label %58
58: ; preds = %78, %55
%59 = load i32, i32* %7
%60 = icmp slt i32 %59, 15
br i1 %60, label %61, label %81
61: ; preds = %58
%62 = load i8*, i8** %9
%63 = load i32, i32* %7
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %62, i64 %64
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = load i8*, i8** %10
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp ne i32 %67, %73
br i1 %74, label %75, label %77
75: ; preds = %61
%76 = load i32, i32* %7
store i32 %76, i32* %8
br label %81
77: ; preds = %61
br label %78
78: ; preds = %77
%79 = load i32, i32* %7
%80 = add nsw i32 %79, 1
store i32 %80, i32* %7
br label %58
81: ; preds = %75, %58
%82 = load i8*, i8** %10
%83 = call i32 @free(i8* %82)
%84 = load i32, i32* %8
%85 = icmp eq i32 -1, %84
br i1 %85, label %86, label %88
86: ; preds = %81
%87 = call i32 @print_passf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
br label %93
88: ; preds = %81
%89 = load i32, i32* %6
%90 = add nsw i32 %89, 1
store i32 %90, i32* %6
%91 = load i32, i32* %8
%92 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0), i32 %91)
br label %93
93: ; preds = %88, %86
%94 = load i8*, i8** %9
%95 = call i8* @mstrelem(i8* %94, i32 0)
store i8* %95, i8** %10
%96 = load i8*, i8** %10
%97 = call i64 @strcmp(i8* %96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%98 = icmp ne i64 0, %97
br i1 %98, label %99, label %104
99: ; preds = %93
%100 = load i32, i32* %6
%101 = add nsw i32 %100, 1
store i32 %101, i32* %6
%102 = load i8*, i8** %10
%103 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0), i8* %102)
br label %104
104: ; preds = %99, %93
%105 = load i8*, i8** %9
%106 = call i8* @mstrelem(i8* %105, i32 1)
store i8* %106, i8** %10
%107 = load i8*, i8** %10
%108 = call i64 @strcmp(i8* %107, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%109 = icmp ne i64 0, %108
br i1 %109, label %110, label %115
110: ; preds = %104
%111 = load i32, i32* %6
%112 = add nsw i32 %111, 1
store i32 %112, i32* %6
%113 = load i8*, i8** %10
%114 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.14, i64 0, i64 0), i8* %113)
br label %115
115: ; preds = %110, %104
%116 = load i8*, i8** %9
%117 = call i8* @mstrelem(i8* %116, i32 2)
store i8* %117, i8** %10
%118 = load i8*, i8** %10
%119 = call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%120 = icmp ne i64 0, %119
br i1 %120, label %121, label %126
121: ; preds = %115
%122 = load i32, i32* %6
%123 = add nsw i32 %122, 1
store i32 %123, i32* %6
%124 = load i8*, i8** %10
%125 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.16, i64 0, i64 0), i8* %124)
br label %126
126: ; preds = %121, %115
%127 = load i8*, i8** %9
%128 = call i8* @mstrelem(i8* %127, i32 3)
store i8* %128, i8** %10
%129 = load i8*, i8** %10
%130 = icmp ne i8* %129, null
br i1 %130, label %131, label %136
131: ; preds = %126
%132 = load i32, i32* %6
%133 = add nsw i32 %132, 1
store i32 %133, i32* %6
%134 = load i8*, i8** %10
%135 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0), i8* %134)
br label %136
136: ; preds = %131, %126
%137 = call i8* @mstrelem(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 0)
store i8* %137, i8** %10
%138 = load i8*, i8** %10
%139 = icmp ne i8* %138, null
br i1 %139, label %140, label %145
140: ; preds = %136
%141 = load i32, i32* %6
%142 = add nsw i32 %141, 1
store i32 %142, i32* %6
%143 = load i8*, i8** %10
%144 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.18, i64 0, i64 0), i8* %143)
br label %145
145: ; preds = %140, %136
%146 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%147 = call i32 @memset(i8* %146, i32 0, i32 18)
%148 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%149 = call i32 @mstrncat(i8* %148, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 18)
store i32 %149, i32* %8
%150 = load i32, i32* %8
%151 = icmp ne i32 %150, 3
br i1 %151, label %152, label %157
152: ; preds = %145
%153 = load i32, i32* %6
%154 = add nsw i32 %153, 1
store i32 %154, i32* %6
%155 = load i32, i32* %8
%156 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0), i32 %155)
br label %157
157: ; preds = %152, %145
%158 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%159 = call i32 @mstrncat(i8* %158, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 18)
store i32 %159, i32* %8
%160 = load i32, i32* %8
%161 = icmp ne i32 %160, 3
br i1 %161, label %162, label %167
162: ; preds = %157
%163 = load i32, i32* %6
%164 = add nsw i32 %163, 1
store i32 %164, i32* %6
%165 = load i32, i32* %8
%166 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0), i32 %165)
br label %167
167: ; preds = %162, %157
%168 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%169 = call i32 @mstrncat(i8* %168, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 18)
store i32 %169, i32* %8
%170 = load i32, i32* %8
%171 = icmp ne i32 %170, 5
br i1 %171, label %172, label %177
172: ; preds = %167
%173 = load i32, i32* %6
%174 = add nsw i32 %173, 1
store i32 %174, i32* %6
%175 = load i32, i32* %8
%176 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0), i32 %175)
br label %177
177: ; preds = %172, %167
%178 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%179 = call i32 @mstrncat(i8* %178, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 18)
store i32 %179, i32* %8
%180 = load i32, i32* %8
%181 = icmp ne i32 %180, 2
br i1 %181, label %182, label %187
182: ; preds = %177
%183 = load i32, i32* %6
%184 = add nsw i32 %183, 1
store i32 %184, i32* %6
%185 = load i32, i32* %8
%186 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.21, i64 0, i64 0), i32 %185)
br label %187
187: ; preds = %182, %177
%188 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%189 = call i32 @mstrncat(i8* %188, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), i32 18)
store i32 %189, i32* %8
%190 = load i32, i32* %8
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %197
192: ; preds = %187
%193 = load i32, i32* %6
%194 = add nsw i32 %193, 1
store i32 %194, i32* %6
%195 = load i32, i32* %8
%196 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.23, i64 0, i64 0), i32 %195)
br label %197
197: ; preds = %192, %187
%198 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%199 = call i8* @mstrelem(i8* %198, i32 0)
store i8* %199, i8** %10
%200 = load i8*, i8** %10
%201 = call i64 @strcmp(i8* %200, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%202 = icmp ne i64 0, %201
br i1 %202, label %203, label %208
203: ; preds = %197
%204 = load i32, i32* %6
%205 = add nsw i32 %204, 1
store i32 %205, i32* %6
%206 = load i8*, i8** %10
%207 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0), i8* %206)
br label %208
208: ; preds = %203, %197
%209 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%210 = call i8* @mstrelem(i8* %209, i32 1)
store i8* %210, i8** %10
%211 = load i8*, i8** %10
%212 = call i64 @strcmp(i8* %211, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%213 = icmp ne i64 0, %212
br i1 %213, label %214, label %219
214: ; preds = %208
%215 = load i32, i32* %6
%216 = add nsw i32 %215, 1
store i32 %216, i32* %6
%217 = load i8*, i8** %10
%218 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.14, i64 0, i64 0), i8* %217)
br label %219
219: ; preds = %214, %208
%220 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%221 = call i8* @mstrelem(i8* %220, i32 2)
store i8* %221, i8** %10
%222 = load i8*, i8** %10
%223 = call i64 @strcmp(i8* %222, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%224 = icmp ne i64 0, %223
br i1 %224, label %225, label %230
225: ; preds = %219
%226 = load i32, i32* %6
%227 = add nsw i32 %226, 1
store i32 %227, i32* %6
%228 = load i8*, i8** %10
%229 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.16, i64 0, i64 0), i8* %228)
br label %230
230: ; preds = %225, %219
%231 = getelementptr inbounds [18 x i8], [18 x i8]* %11, i64 0, i64 0
%232 = call i8* @mstrelem(i8* %231, i32 3)
store i8* %232, i8** %10
%233 = load i8*, i8** %10
%234 = call i64 @strcmp(i8* %233, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%235 = icmp ne i64 0, %234
br i1 %235, label %236, label %241
236: ; preds = %230
%237 = load i32, i32* %6
%238 = add nsw i32 %237, 1
store i32 %238, i32* %6
%239 = load i8*, i8** %10
%240 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.25, i64 0, i64 0), i8* %239)
br label %241
241: ; preds = %236, %230
%242 = load i8*, i8** %9
%243 = call i8* @mstrdup(i8* %242)
store i8* %243, i8** %9
%244 = load i8*, i8** %9
%245 = call i8* @mstrcat(i8* %244, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0))
store i8* %245, i8** %9
%246 = load i8*, i8** %9
%247 = call i8* @mstrelem(i8* %246, i32 3)
store i8* %247, i8** %10
%248 = load i8*, i8** %10
%249 = icmp ne i8* %248, null
br i1 %249, label %250, label %256
250: ; preds = %241
%251 = load i8*, i8** %10
%252 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8* %251)
%253 = icmp eq i64 0, %252
br i1 %253, label %254, label %256
254: ; preds = %250
%255 = call i32 @print_passf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.26, i64 0, i64 0))
br label %261
256: ; preds = %250, %241
%257 = load i32, i32* %6
%258 = add nsw i32 %257, 1
store i32 %258, i32* %6
%259 = load i8*, i8** %10
%260 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.27, i64 0, i64 0), i8* %259)
br label %261
261: ; preds = %256, %254
%262 = call i8* @mstrdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i8* %262, i8** %9
%263 = load i8*, i8** %9
%264 = call i8* @mstrcat(i8* %263, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
store i8* %264, i8** %9
%265 = load i8*, i8** %9
%266 = call i8* @mstrelem(i8* %265, i32 0)
store i8* %266, i8** %10
%267 = load i8*, i8** %10
%268 = icmp ne i8* %267, null
br i1 %268, label %269, label %275
269: ; preds = %261
%270 = load i8*, i8** %10
%271 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* %270)
%272 = icmp eq i64 0, %271
br i1 %272, label %273, label %275
273: ; preds = %269
%274 = call i32 @print_passf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.28, i64 0, i64 0))
br label %280
275: ; preds = %269, %261
%276 = load i32, i32* %6
%277 = add nsw i32 %276, 1
store i32 %277, i32* %6
%278 = load i8*, i8** %10
%279 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.29, i64 0, i64 0), i8* %278)
br label %280
280: ; preds = %275, %273
%281 = load i32, i32* %6
ret i32 %281
}

LLVM IR (-O2):
@.str = [15 x i8] c"one\00two\00three\00\00"
@.str.1 = [38 x i8] c"mstrlen: length of multi-string array\00"
@.str.2 = [49 x i8] c"mstrlen: expected multi-string length 3, got: %i\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [44 x i8] c"mstrlen: length of empty multi-string array\00"
@.str.5 = [49 x i8] c"mstrlen: expected multi-string length 0, got: %i\00"
@.str.6 = [37 x i8] c"mstrsize: size of multi-string array\00"
@.str.7 = [49 x i8] c"mstrsize: expected multi-string size 15, got: %i\00"
@.str.8 = [48 x i8] c"mstrsize: expected multi-string size 0, got: %i\00"
@.str.9 = [32 x i8] c"mstrdup: duplicate multi-string\00"
@.str.10 = [66 x i8] c"mstrdup: duplicated multi-string does not match source at char %i\00"
@.str.11 = [4 x i8] c"one\00"
@.str.12 = [65 x i8] c"Expected element 0 in multi-string array to be \22one\22, got: \22%s\22\0A\00"
@.str.13 = [4 x i8] c"two\00"
@.str.14 = [65 x i8] c"Expected element 1 in multi-string array to be \22two\22, got: \22%s\22\0A\00"
@.str.15 = [6 x i8] c"three\00"
@.str.16 = [67 x i8] c"Expected element 2 in multi-string array to be \22three\22, got: \22%s\22\0A\00"
@.str.17 = [64 x i8] c"Expected element 3 in multi-string array to be NULL, got: \22%s\22\0A\00"
@.str.18 = [70 x i8] c"Expected element 0 in empty multi-string array to be NULL, got: \22%s\22\0A\00"
@.str.19 = [58 x i8] c"Expected append operation to write 3 characters, got: %i\0A\00"
@.str.20 = [5 x i8] c"four\00"
@.str.21 = [58 x i8] c"Expected append operation to write 2 characters, got: %i\0A\00"
@.str.22 = [5 x i8] c"five\00"
@.str.23 = [58 x i8] c"Expected append operation to write 0 characters, got: %i\0A\00"
@.str.24 = [3 x i8] c"fo\00"
@.str.25 = [64 x i8] c"Expected element 3 in multi-string array to be \22fo\22, got: \22%s\22\0A\00"
@.str.26 = [48 x i8] c"mstrcat: append to non-empty multi-string array\00"
@.str.27 = [75 x i8] c"mstrcat: expected element 3 in multi-string array to be \22four\22, got: \22%s\22\0A\00"
@.str.28 = [44 x i8] c"mstrcat: append to empty multi-string array\00"
@.str.29 = [74 x i8] c"mstrcat: expected element 0 in multi-string array to be \22one\22, got: \22%s\22\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [18 x i8]
%4 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @mstrlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 3
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @print_passf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %2
%10 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ 0, %7 ], [ 1, %9 ]
%13 = tail call i32 @mstrlen(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = tail call i32 @print_passf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
br label %20
17: ; preds = %11
%18 = add nuw nsw i32 %12, 1
%19 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i32 %13)
br label %20
20: ; preds = %17, %15
%21 = phi i32 [ %12, %15 ], [ %18, %17 ]
%22 = tail call i32 @mstrsize(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i32 %22, 15
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = tail call i32 @print_passf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
br label %29
26: ; preds = %20
%27 = add nuw nsw i32 %21, 1
%28 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0), i32 %22)
br label %29
29: ; preds = %26, %24
%30 = phi i32 [ %21, %24 ], [ %27, %26 ]
%31 = tail call i32 @mstrsize(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %29
%34 = add nuw nsw i32 %30, 1
%35 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i32 %31)
br label %36
36: ; preds = %33, %29
%37 = phi i32 [ %34, %33 ], [ %30, %29 ]
%38 = tail call i8* @mstrdup(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%39 = load i8, i8* %38
%40 = icmp eq i8 %39, 111
br i1 %40, label %41, label %100
41: ; preds = %36
%42 = getelementptr inbounds i8, i8* %38, i64 1
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 110
br i1 %44, label %45, label %100
45: ; preds = %41
%46 = getelementptr inbounds i8, i8* %38, i64 2
%47 = load i8, i8* %46
%48 = icmp eq i8 %47, 101
br i1 %48, label %49, label %100
49: ; preds = %45
%50 = getelementptr inbounds i8, i8* %38, i64 3
%51 = load i8, i8* %50
%52 = icmp eq i8 %51, 0
br i1 %52, label %53, label %100
53: ; preds = %49
%54 = getelementptr inbounds i8, i8* %38, i64 4
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 116
br i1 %56, label %57, label %100
57: ; preds = %53
%58 = getelementptr inbounds i8, i8* %38, i64 5
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 119
br i1 %60, label %61, label %100
61: ; preds = %57
%62 = getelementptr inbounds i8, i8* %38, i64 6
%63 = load i8, i8* %62
%64 = icmp eq i8 %63, 111
br i1 %64, label %65, label %100
65: ; preds = %61
%66 = getelementptr inbounds i8, i8* %38, i64 7
%67 = load i8, i8* %66
%68 = icmp eq i8 %67, 0
br i1 %68, label %69, label %100
69: ; preds = %65
%70 = getelementptr inbounds i8, i8* %38, i64 8
%71 = load i8, i8* %70
%72 = icmp eq i8 %71, 116
br i1 %72, label %73, label %100
73: ; preds = %69
%74 = getelementptr inbounds i8, i8* %38, i64 9
%75 = load i8, i8* %74
%76 = icmp eq i8 %75, 104
br i1 %76, label %77, label %100
77: ; preds = %73
%78 = getelementptr inbounds i8, i8* %38, i64 10
%79 = load i8, i8* %78
%80 = icmp eq i8 %79, 114
br i1 %80, label %81, label %100
81: ; preds = %77
%82 = getelementptr inbounds i8, i8* %38, i64 11
%83 = load i8, i8* %82
%84 = icmp eq i8 %83, 101
br i1 %84, label %85, label %100
85: ; preds = %81
%86 = getelementptr inbounds i8, i8* %38, i64 12
%87 = load i8, i8* %86
%88 = icmp eq i8 %87, 101
br i1 %88, label %89, label %100
89: ; preds = %85
%90 = getelementptr inbounds i8, i8* %38, i64 13
%91 = load i8, i8* %90
%92 = icmp eq i8 %91, 0
br i1 %92, label %93, label %100
93: ; preds = %89
%94 = getelementptr inbounds i8, i8* %38, i64 14
%95 = load i8, i8* %94
%96 = icmp eq i8 %95, 0
br i1 %96, label %97, label %100
97: ; preds = %93
%98 = tail call i32 @free(i8* %38)
%99 = tail call i32 @print_passf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
br label %105
100: ; preds = %93, %89, %85, %81, %77, %73, %69, %65, %61, %57, %53, %49, %45, %41, %36
%101 = phi i32 [ 0, %36 ], [ 1, %41 ], [ 2, %45 ], [ 3, %49 ], [ 4, %53 ], [ 5, %57 ], [ 6, %61 ], [ 7, %65 ], [ 8, %69 ], [ 9, %73 ], [ 10, %77 ], [ 11, %81 ], [ 12, %85 ], [ 13, %89 ], [ 14, %93 ]
%102 = tail call i32 @free(i8* %38)
%103 = add nuw nsw i32 %37, 1
%104 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0), i32 %101)
br label %105
105: ; preds = %100, %97
%106 = phi i32 [ %37, %97 ], [ %103, %100 ]
%107 = tail call i8* @mstrelem(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%108 = tail call i64 @strcmp(i8* %107, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%109 = icmp eq i64 %108, 0
br i1 %109, label %113, label %110
110: ; preds = %105
%111 = add nuw nsw i32 %106, 1
%112 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0), i8* %107)
br label %113
113: ; preds = %110, %105
%114 = phi i32 [ %111, %110 ], [ %106, %105 ]
%115 = tail call i8* @mstrelem(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1)
%116 = tail call i64 @strcmp(i8* %115, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%117 = icmp eq i64 %116, 0
br i1 %117, label %121, label %118
118: ; preds = %113
%119 = add nuw nsw i32 %114, 1
%120 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.14, i64 0, i64 0), i8* %115)
br label %121
121: ; preds = %118, %113
%122 = phi i32 [ %119, %118 ], [ %114, %113 ]
%123 = tail call i8* @mstrelem(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2)
%124 = tail call i64 @strcmp(i8* %123, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%125 = icmp eq i64 %124, 0
br i1 %125, label %129, label %126
126: ; preds = %121
%127 = add nuw nsw i32 %122, 1
%128 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.16, i64 0, i64 0), i8* %123)
br label %129
129: ; preds = %126, %121
%130 = phi i32 [ %127, %126 ], [ %122, %121 ]
%131 = tail call i8* @mstrelem(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3)
%132 = icmp eq i8* %131, null
br i1 %132, label %136, label %133
133: ; preds = %129
%134 = add nuw nsw i32 %130, 1
%135 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0), i8* %131)
br label %136
136: ; preds = %133, %129
%137 = phi i32 [ %134, %133 ], [ %130, %129 ]
%138 = tail call i8* @mstrelem(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 0)
%139 = icmp eq i8* %138, null
br i1 %139, label %143, label %140
140: ; preds = %136
%141 = add nuw nsw i32 %137, 1
%142 = tail call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.18, i64 0, i64 0), i8* %138)
br label %143
143: ; preds = %140, %136
%144 = phi i32 [ %141, %140 ], [ %137, %136 ]
%145 = call i32 @memset(i8* %4, i32 0, i32 18)
%146 = call i32 @mstrncat(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 18)
%147 = icmp eq i32 %146, 3
br i1 %147, label %151, label %148
148: ; preds = %143
%149 = add nuw nsw i32 %144, 1
%150 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0), i32 %146)
br label %151
151: ; preds = %148, %143
%152 = phi i32 [ %149, %148 ], [ %144, %143 ]
%153 = call i32 @mstrncat(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 18)
%154 = icmp eq i32 %153, 3
br i1 %154, label %158, label %155
155: ; preds = %151
%156 = add nuw nsw i32 %152, 1
%157 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0), i32 %153)
br label %158
158: ; preds = %155, %151
%159 = phi i32 [ %156, %155 ], [ %152, %151 ]
%160 = call i32 @mstrncat(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 18)
%161 = icmp eq i32 %160, 5
br i1 %161, label %165, label %162
162: ; preds = %158
%163 = add nuw nsw i32 %159, 1
%164 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0), i32 %160)
br label %165
165: ; preds = %162, %158
%166 = phi i32 [ %163, %162 ], [ %159, %158 ]
%167 = call i32 @mstrncat(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 18)
%168 = icmp eq i32 %167, 2
br i1 %168, label %172, label %169
169: ; preds = %165
%170 = add nuw nsw i32 %166, 1
%171 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.21, i64 0, i64 0), i32 %167)
br label %172
172: ; preds = %169, %165
%173 = phi i32 [ %170, %169 ], [ %166, %165 ]
%174 = call i32 @mstrncat(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), i32 18)
%175 = icmp eq i32 %174, 0
br i1 %175, label %179, label %176
176: ; preds = %172
%177 = add nuw nsw i32 %173, 1
%178 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.23, i64 0, i64 0), i32 %174)
br label %179
179: ; preds = %176, %172
%180 = phi i32 [ %177, %176 ], [ %173, %172 ]
%181 = call i8* @mstrelem(i8* %4, i32 0)
%182 = call i64 @strcmp(i8* %181, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%183 = icmp eq i64 %182, 0
br i1 %183, label %187, label %184
184: ; preds = %179
%185 = add nuw nsw i32 %180, 1
%186 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0), i8* %181)
br label %187
187: ; preds = %184, %179
%188 = phi i32 [ %185, %184 ], [ %180, %179 ]
%189 = call i8* @mstrelem(i8* %4, i32 1)
%190 = call i64 @strcmp(i8* %189, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%191 = icmp eq i64 %190, 0
br i1 %191, label %195, label %192
192: ; preds = %187
%193 = add nuw nsw i32 %188, 1
%194 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.14, i64 0, i64 0), i8* %189)
br label %195
195: ; preds = %192, %187
%196 = phi i32 [ %193, %192 ], [ %188, %187 ]
%197 = call i8* @mstrelem(i8* %4, i32 2)
%198 = call i64 @strcmp(i8* %197, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%199 = icmp eq i64 %198, 0
br i1 %199, label %203, label %200
200: ; preds = %195
%201 = add nuw nsw i32 %196, 1
%202 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.16, i64 0, i64 0), i8* %197)
br label %203
203: ; preds = %200, %195
%204 = phi i32 [ %201, %200 ], [ %196, %195 ]
%205 = call i8* @mstrelem(i8* %4, i32 3)
%206 = call i64 @strcmp(i8* %205, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%207 = icmp eq i64 %206, 0
br i1 %207, label %211, label %208
208: ; preds = %203
%209 = add nuw nsw i32 %204, 1
%210 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.25, i64 0, i64 0), i8* %205)
br label %211
211: ; preds = %208, %203
%212 = phi i32 [ %209, %208 ], [ %204, %203 ]
%213 = call i8* @mstrdup(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%214 = call i8* @mstrcat(i8* %213, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0))
%215 = call i8* @mstrelem(i8* %214, i32 3)
%216 = icmp eq i8* %215, null
br i1 %216, label %222, label %217
217: ; preds = %211
%218 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8* %215)
%219 = icmp eq i64 %218, 0
br i1 %219, label %220, label %222
220: ; preds = %217
%221 = call i32 @print_passf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.26, i64 0, i64 0))
br label %225
222: ; preds = %217, %211
%223 = add nuw nsw i32 %212, 1
%224 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.27, i64 0, i64 0), i8* %215)
br label %225
225: ; preds = %222, %220
%226 = phi i32 [ %212, %220 ], [ %223, %222 ]
%227 = call i8* @mstrdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%228 = call i8* @mstrcat(i8* %227, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%229 = call i8* @mstrelem(i8* %228, i32 0)
%230 = icmp eq i8* %229, null
br i1 %230, label %236, label %231
231: ; preds = %225
%232 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* %229)
%233 = icmp eq i64 %232, 0
br i1 %233, label %234, label %236
234: ; preds = %231
%235 = call i32 @print_passf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.28, i64 0, i64 0))
br label %239
236: ; preds = %231, %225
%237 = add nuw nsw i32 %226, 1
%238 = call i32 (i8*, ...) @print_failf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.29, i64 0, i64 0), i8* %229)
br label %239
239: ; preds = %236, %234
%240 = phi i32 [ %226, %234 ], [ %237, %236 ]
ret i32 %240
}