#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 */

/* Variables and functions */
int cobs_decode_basic();
int cobs_decode_empty();
int cobs_decode_emptyout();
int cobs_decode_multizero();
int cobs_decode_onlyzero();
int cobs_decode_reallylong();
int cobs_decode_withzero();
int cobs_encode_basic();
int cobs_encode_empty();
int cobs_encode_multizero();
int cobs_encode_onlyzero();
int cobs_encode_reallylong();
int cobs_encode_withzero();
int cobs_stream_basic();
int cobs_stream_empty();
int cobs_stream_emptyout();
int cobs_stream_multizero();
int cobs_stream_onlyzero();
int cobs_stream_reallylong();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int failures = 0;
  {
    int ret = cobs_encode_basic();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_encode_basic");
    } else {
      printf("Test %s passed.\n", "cobs_encode_basic");
    }
  };
  {
    int ret = cobs_encode_empty();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_encode_empty");
    } else {
      printf("Test %s passed.\n", "cobs_encode_empty");
    }
  };
  {
    int ret = cobs_encode_onlyzero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_encode_onlyzero");
    } else {
      printf("Test %s passed.\n", "cobs_encode_onlyzero");
    }
  };
  {
    int ret = cobs_encode_withzero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_encode_withzero");
    } else {
      printf("Test %s passed.\n", "cobs_encode_withzero");
    }
  };
  {
    int ret = cobs_encode_multizero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_encode_multizero");
    } else {
      printf("Test %s passed.\n", "cobs_encode_multizero");
    }
  };
  {
    int ret = cobs_encode_reallylong();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_encode_reallylong");
    } else {
      printf("Test %s passed.\n", "cobs_encode_reallylong");
    }
  };
  {
    int ret = cobs_decode_basic();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_basic");
    } else {
      printf("Test %s passed.\n", "cobs_decode_basic");
    }
  };
  {
    int ret = cobs_decode_empty();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_empty");
    } else {
      printf("Test %s passed.\n", "cobs_decode_empty");
    }
  };
  {
    int ret = cobs_decode_emptyout();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_emptyout");
    } else {
      printf("Test %s passed.\n", "cobs_decode_emptyout");
    }
  };
  {
    int ret = cobs_decode_onlyzero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_onlyzero");
    } else {
      printf("Test %s passed.\n", "cobs_decode_onlyzero");
    }
  };
  {
    int ret = cobs_decode_withzero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_withzero");
    } else {
      printf("Test %s passed.\n", "cobs_decode_withzero");
    }
  };
  {
    int ret = cobs_decode_multizero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_multizero");
    } else {
      printf("Test %s passed.\n", "cobs_decode_multizero");
    }
  };
  {
    int ret = cobs_decode_reallylong();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_decode_reallylong");
    } else {
      printf("Test %s passed.\n", "cobs_decode_reallylong");
    }
  };
  {
    int ret = cobs_stream_basic();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_stream_basic");
    } else {
      printf("Test %s passed.\n", "cobs_stream_basic");
    }
  };
  {
    int ret = cobs_stream_empty();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_stream_empty");
    } else {
      printf("Test %s passed.\n", "cobs_stream_empty");
    }
  };
  {
    int ret = cobs_stream_emptyout();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_stream_emptyout");
    } else {
      printf("Test %s passed.\n", "cobs_stream_emptyout");
    }
  };
  {
    int ret = cobs_stream_onlyzero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_stream_onlyzero");
    } else {
      printf("Test %s passed.\n", "cobs_stream_onlyzero");
    }
  };
  {
    int ret = cobs_stream_multizero();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_stream_multizero");
    } else {
      printf("Test %s passed.\n", "cobs_stream_multizero");
    }
  };
  {
    int ret = cobs_stream_reallylong();
    if (ret != 0) {
      failures++;
      fprintf(stderr, "Test %s FAILED!\n", "cobs_stream_reallylong");
    } else {
      printf("Test %s passed.\n", "cobs_stream_reallylong");
    }
  };
  return failures;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1110 <cobs_encode_basic@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     12ab <main+0x5b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
lea    0xd66(%rip),%rsi
lea    0xd70(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    12be <main+0x6e>
lea    0xd71(%rip),%rdi
lea    0xd58(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1150 <cobs_encode_empty@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     12fc <main+0xac>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2cfe(%rip),%rax
mov    (%rax),%edi
lea    0xd15(%rip),%rsi
lea    0xd42(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    130f <main+0xbf>
lea    0xd20(%rip),%rdi
lea    0xd2a(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1130 <cobs_encode_onlyzero@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     134d <main+0xfd>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2cad(%rip),%rax
mov    (%rax),%edi
lea    0xcc4(%rip),%rsi
lea    0xd03(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1360 <main+0x110>
lea    0xccf(%rip),%rdi
lea    0xceb(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1170 <cobs_encode_withzero@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     139e <main+0x14e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2c5c(%rip),%rax
mov    (%rax),%edi
lea    0xc73(%rip),%rsi
lea    0xcc7(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    13b1 <main+0x161>
lea    0xc7e(%rip),%rdi
lea    0xcaf(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1050 <cobs_encode_multizero@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     13ef <main+0x19f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2c0b(%rip),%rax
mov    (%rax),%edi
lea    0xc22(%rip),%rsi
lea    0xc8b(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1402 <main+0x1b2>
lea    0xc2d(%rip),%rdi
lea    0xc73(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1090 <cobs_encode_reallylong@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1440 <main+0x1f0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2bba(%rip),%rax
mov    (%rax),%edi
lea    0xbd1(%rip),%rsi
lea    0xc50(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1453 <main+0x203>
lea    0xbdc(%rip),%rdi
lea    0xc38(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1040 <cobs_decode_basic@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     1491 <main+0x241>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2b69(%rip),%rax
mov    (%rax),%edi
lea    0xb80(%rip),%rsi
lea    0xc16(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    14a4 <main+0x254>
lea    0xb8b(%rip),%rdi
lea    0xbfe(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   10e0 <cobs_decode_empty@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     14e2 <main+0x292>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2b18(%rip),%rax
mov    (%rax),%edi
lea    0xb2f(%rip),%rsi
lea    0xbd7(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    14f5 <main+0x2a5>
lea    0xb3a(%rip),%rdi
lea    0xbbf(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   10f0 <cobs_decode_emptyout@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     1533 <main+0x2e3>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2ac7(%rip),%rax
mov    (%rax),%edi
lea    0xade(%rip),%rsi
lea    0xb98(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1546 <main+0x2f6>
lea    0xae9(%rip),%rdi
lea    0xb80(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   10b0 <cobs_decode_onlyzero@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     1584 <main+0x334>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2a76(%rip),%rax
mov    (%rax),%edi
lea    0xa8d(%rip),%rsi
lea    0xb5c(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1597 <main+0x347>
lea    0xa98(%rip),%rdi
lea    0xb44(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1140 <cobs_decode_withzero@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
je     15d5 <main+0x385>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2a25(%rip),%rax
mov    (%rax),%edi
lea    0xa3c(%rip),%rsi
lea    0xb20(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    15e8 <main+0x398>
lea    0xa47(%rip),%rdi
lea    0xb08(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1100 <cobs_decode_multizero@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     1626 <main+0x3d6>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x29d4(%rip),%rax
mov    (%rax),%edi
lea    0x9eb(%rip),%rsi
lea    0xae4(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1639 <main+0x3e9>
lea    0x9f6(%rip),%rdi
lea    0xacc(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1160 <cobs_decode_reallylong@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
je     1677 <main+0x427>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2983(%rip),%rax
mov    (%rax),%edi
lea    0x99a(%rip),%rsi
lea    0xaa9(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    168a <main+0x43a>
lea    0x9a5(%rip),%rdi
lea    0xa91(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1030 <cobs_stream_basic@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     16c8 <main+0x478>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2932(%rip),%rax
mov    (%rax),%edi
lea    0x949(%rip),%rsi
lea    0xa6f(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    16db <main+0x48b>
lea    0x954(%rip),%rdi
lea    0xa57(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   10a0 <cobs_stream_empty@plt>
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
je     1719 <main+0x4c9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x28e1(%rip),%rax
mov    (%rax),%edi
lea    0x8f8(%rip),%rsi
lea    0xa30(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    172c <main+0x4dc>
lea    0x903(%rip),%rdi
lea    0xa18(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1060 <cobs_stream_emptyout@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
je     176a <main+0x51a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2890(%rip),%rax
mov    (%rax),%edi
lea    0x8a7(%rip),%rsi
lea    0x9f1(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    177d <main+0x52d>
lea    0x8b2(%rip),%rdi
lea    0x9d9(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1120 <cobs_stream_onlyzero@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
je     17bb <main+0x56b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x283f(%rip),%rax
mov    (%rax),%edi
lea    0x856(%rip),%rsi
lea    0x9b5(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    17ce <main+0x57e>
lea    0x861(%rip),%rdi
lea    0x99d(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   1070 <cobs_stream_multizero@plt>
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x5c(%rbp)
je     180c <main+0x5bc>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x27ee(%rip),%rax
mov    (%rax),%edi
lea    0x805(%rip),%rsi
lea    0x979(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    181f <main+0x5cf>
lea    0x810(%rip),%rdi
lea    0x961(%rip),%rsi
call   1080 <printf@plt>
mov    $0x0,%al
call   10d0 <cobs_stream_reallylong@plt>
mov    %eax,-0x60(%rbp)
cmpl   $0x0,-0x60(%rbp)
je     185d <main+0x60d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x279d(%rip),%rax
mov    (%rax),%edi
lea    0x7b4(%rip),%rsi
lea    0x93e(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1870 <main+0x620>
lea    0x7bf(%rip),%rdi
lea    0x926(%rip),%rsi
call   1080 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1110 <cobs_encode_basic@plt>
test   %eax,%eax
je     1281 <main+0x31>
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
lea    0xd92(%rip),%rsi
lea    0xd9c(%rip),%rdx
call   10c0 <fprintf@plt>
mov    $0x1,%ebx
jmp    1294 <main+0x44>
lea    0xd9b(%rip),%rdi
lea    0xd82(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1150 <cobs_encode_empty@plt>
test   %eax,%eax
je     12c0 <main+0x70>
add    $0x1,%ebx
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
lea    0xd4e(%rip),%rsi
lea    0xd7b(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    12d3 <main+0x83>
lea    0xd5c(%rip),%rdi
lea    0xd66(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1130 <cobs_encode_onlyzero@plt>
test   %eax,%eax
je     12ff <main+0xaf>
add    $0x1,%ebx
mov    0x2cf8(%rip),%rax
mov    (%rax),%edi
lea    0xd0f(%rip),%rsi
lea    0xd4e(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1312 <main+0xc2>
lea    0xd1d(%rip),%rdi
lea    0xd39(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1170 <cobs_encode_withzero@plt>
test   %eax,%eax
je     133e <main+0xee>
add    $0x1,%ebx
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
lea    0xcd0(%rip),%rsi
lea    0xd24(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1351 <main+0x101>
lea    0xcde(%rip),%rdi
lea    0xd0f(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1050 <cobs_encode_multizero@plt>
test   %eax,%eax
je     137d <main+0x12d>
add    $0x1,%ebx
mov    0x2c7a(%rip),%rax
mov    (%rax),%edi
lea    0xc91(%rip),%rsi
lea    0xcfa(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1390 <main+0x140>
lea    0xc9f(%rip),%rdi
lea    0xce5(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1090 <cobs_encode_reallylong@plt>
test   %eax,%eax
je     13bc <main+0x16c>
add    $0x1,%ebx
mov    0x2c3b(%rip),%rax
mov    (%rax),%edi
lea    0xc52(%rip),%rsi
lea    0xcd1(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    13cf <main+0x17f>
lea    0xc60(%rip),%rdi
lea    0xcbc(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1040 <cobs_decode_basic@plt>
test   %eax,%eax
je     13fb <main+0x1ab>
add    $0x1,%ebx
mov    0x2bfc(%rip),%rax
mov    (%rax),%edi
lea    0xc13(%rip),%rsi
lea    0xca9(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    140e <main+0x1be>
lea    0xc21(%rip),%rdi
lea    0xc94(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   10e0 <cobs_decode_empty@plt>
test   %eax,%eax
je     143a <main+0x1ea>
add    $0x1,%ebx
mov    0x2bbd(%rip),%rax
mov    (%rax),%edi
lea    0xbd4(%rip),%rsi
lea    0xc7c(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    144d <main+0x1fd>
lea    0xbe2(%rip),%rdi
lea    0xc67(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   10f0 <cobs_decode_emptyout@plt>
test   %eax,%eax
je     1479 <main+0x229>
add    $0x1,%ebx
mov    0x2b7e(%rip),%rax
mov    (%rax),%edi
lea    0xb95(%rip),%rsi
lea    0xc4f(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    148c <main+0x23c>
lea    0xba3(%rip),%rdi
lea    0xc3a(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   10b0 <cobs_decode_onlyzero@plt>
test   %eax,%eax
je     14b8 <main+0x268>
add    $0x1,%ebx
mov    0x2b3f(%rip),%rax
mov    (%rax),%edi
lea    0xb56(%rip),%rsi
lea    0xc25(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    14cb <main+0x27b>
lea    0xb64(%rip),%rdi
lea    0xc10(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1140 <cobs_decode_withzero@plt>
test   %eax,%eax
je     14f7 <main+0x2a7>
add    $0x1,%ebx
mov    0x2b00(%rip),%rax
mov    (%rax),%edi
lea    0xb17(%rip),%rsi
lea    0xbfb(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    150a <main+0x2ba>
lea    0xb25(%rip),%rdi
lea    0xbe6(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1100 <cobs_decode_multizero@plt>
test   %eax,%eax
je     1536 <main+0x2e6>
add    $0x1,%ebx
mov    0x2ac1(%rip),%rax
mov    (%rax),%edi
lea    0xad8(%rip),%rsi
lea    0xbd1(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1549 <main+0x2f9>
lea    0xae6(%rip),%rdi
lea    0xbbc(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1160 <cobs_decode_reallylong@plt>
test   %eax,%eax
je     1575 <main+0x325>
add    $0x1,%ebx
mov    0x2a82(%rip),%rax
mov    (%rax),%edi
lea    0xa99(%rip),%rsi
lea    0xba8(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1588 <main+0x338>
lea    0xaa7(%rip),%rdi
lea    0xb93(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1030 <cobs_stream_basic@plt>
test   %eax,%eax
je     15b4 <main+0x364>
add    $0x1,%ebx
mov    0x2a43(%rip),%rax
mov    (%rax),%edi
lea    0xa5a(%rip),%rsi
lea    0xb80(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    15c7 <main+0x377>
lea    0xa68(%rip),%rdi
lea    0xb6b(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   10a0 <cobs_stream_empty@plt>
test   %eax,%eax
je     15f3 <main+0x3a3>
add    $0x1,%ebx
mov    0x2a04(%rip),%rax
mov    (%rax),%edi
lea    0xa1b(%rip),%rsi
lea    0xb53(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1606 <main+0x3b6>
lea    0xa29(%rip),%rdi
lea    0xb3e(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1060 <cobs_stream_emptyout@plt>
test   %eax,%eax
je     1632 <main+0x3e2>
add    $0x1,%ebx
mov    0x29c5(%rip),%rax
mov    (%rax),%edi
lea    0x9dc(%rip),%rsi
lea    0xb26(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1645 <main+0x3f5>
lea    0x9ea(%rip),%rdi
lea    0xb11(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1120 <cobs_stream_onlyzero@plt>
test   %eax,%eax
je     1671 <main+0x421>
add    $0x1,%ebx
mov    0x2986(%rip),%rax
mov    (%rax),%edi
lea    0x99d(%rip),%rsi
lea    0xafc(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1684 <main+0x434>
lea    0x9ab(%rip),%rdi
lea    0xae7(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   1070 <cobs_stream_multizero@plt>
test   %eax,%eax
je     16b0 <main+0x460>
add    $0x1,%ebx
mov    0x2947(%rip),%rax
mov    (%rax),%edi
lea    0x95e(%rip),%rsi
lea    0xad2(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    16c3 <main+0x473>
lea    0x96c(%rip),%rdi
lea    0xabd(%rip),%rsi
call   1080 <printf@plt>
xor    %eax,%eax
call   10d0 <cobs_stream_reallylong@plt>
test   %eax,%eax
je     16ef <main+0x49f>
add    $0x1,%ebx
mov    0x2908(%rip),%rax
mov    (%rax),%edi
lea    0x91f(%rip),%rsi
lea    0xaa9(%rip),%rdx
call   10c0 <fprintf@plt>
jmp    1702 <main+0x4b2>
lea    0x92d(%rip),%rdi
lea    0xa94(%rip),%rsi
call   1080 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Test %s FAILED!\0A\00"
@.str.1 = [18 x i8] c"cobs_encode_basic\00"
@.str.2 = [17 x i8] c"Test %s passed.\0A\00"
@.str.3 = [18 x i8] c"cobs_encode_empty\00"
@.str.4 = [21 x i8] c"cobs_encode_onlyzero\00"
@.str.5 = [21 x i8] c"cobs_encode_withzero\00"
@.str.6 = [22 x i8] c"cobs_encode_multizero\00"
@.str.7 = [23 x i8] c"cobs_encode_reallylong\00"
@.str.8 = [18 x i8] c"cobs_decode_basic\00"
@.str.9 = [18 x i8] c"cobs_decode_empty\00"
@.str.10 = [21 x i8] c"cobs_decode_emptyout\00"
@.str.11 = [21 x i8] c"cobs_decode_onlyzero\00"
@.str.12 = [21 x i8] c"cobs_decode_withzero\00"
@.str.13 = [22 x i8] c"cobs_decode_multizero\00"
@.str.14 = [23 x i8] c"cobs_decode_reallylong\00"
@.str.15 = [18 x i8] c"cobs_stream_basic\00"
@.str.16 = [18 x i8] c"cobs_stream_empty\00"
@.str.17 = [21 x i8] c"cobs_stream_emptyout\00"
@.str.18 = [21 x i8] c"cobs_stream_onlyzero\00"
@.str.19 = [22 x i8] c"cobs_stream_multizero\00"
@.str.20 = [23 x i8] c"cobs_stream_reallylong\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 i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%26 = call i32 (...) @cobs_encode_basic()
store i32 %26, i32* %7
%27 = load i32, i32* %7
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %2
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %36
34: ; preds = %2
%35 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34, %29
%37 = call i32 (...) @cobs_encode_empty()
store i32 %37, i32* %8
%38 = load i32, i32* %8
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %45
40: ; preds = %36
%41 = load i32, i32* %6
%42 = add nsw i32 %41, 1
store i32 %42, i32* %6
%43 = load i32, i32* @stderr
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %47
45: ; preds = %36
%46 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %47
47: ; preds = %45, %40
%48 = call i32 (...) @cobs_encode_onlyzero()
store i32 %48, i32* %9
%49 = load i32, i32* %9
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %56
51: ; preds = %47
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 1
store i32 %53, i32* %6
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %58
56: ; preds = %47
%57 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %58
58: ; preds = %56, %51
%59 = call i32 (...) @cobs_encode_withzero()
store i32 %59, i32* %10
%60 = load i32, i32* %10
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %67
62: ; preds = %58
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
%65 = load i32, i32* @stderr
%66 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %69
67: ; preds = %58
%68 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %69
69: ; preds = %67, %62
%70 = call i32 (...) @cobs_encode_multizero()
store i32 %70, i32* %11
%71 = load i32, i32* %11
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %78
73: ; preds = %69
%74 = load i32, i32* %6
%75 = add nsw i32 %74, 1
store i32 %75, i32* %6
%76 = load i32, i32* @stderr
%77 = call i32 @fprintf(i32 %76, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %80
78: ; preds = %69
%79 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %80
80: ; preds = %78, %73
%81 = call i32 (...) @cobs_encode_reallylong()
store i32 %81, i32* %12
%82 = load i32, i32* %12
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %89
84: ; preds = %80
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 1
store i32 %86, i32* %6
%87 = load i32, i32* @stderr
%88 = call i32 @fprintf(i32 %87, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %91
89: ; preds = %80
%90 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %91
91: ; preds = %89, %84
%92 = call i32 (...) @cobs_decode_basic()
store i32 %92, i32* %13
%93 = load i32, i32* %13
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %91
%96 = load i32, i32* %6
%97 = add nsw i32 %96, 1
store i32 %97, i32* %6
%98 = load i32, i32* @stderr
%99 = call i32 @fprintf(i32 %98, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %102
100: ; preds = %91
%101 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %102
102: ; preds = %100, %95
%103 = call i32 (...) @cobs_decode_empty()
store i32 %103, i32* %14
%104 = load i32, i32* %14
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %111
106: ; preds = %102
%107 = load i32, i32* %6
%108 = add nsw i32 %107, 1
store i32 %108, i32* %6
%109 = load i32, i32* @stderr
%110 = call i32 @fprintf(i32 %109, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %113
111: ; preds = %102
%112 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %113
113: ; preds = %111, %106
%114 = call i32 (...) @cobs_decode_emptyout()
store i32 %114, i32* %15
%115 = load i32, i32* %15
%116 = icmp ne i32 %115, 0
br i1 %116, label %117, label %122
117: ; preds = %113
%118 = load i32, i32* %6
%119 = add nsw i32 %118, 1
store i32 %119, i32* %6
%120 = load i32, i32* @stderr
%121 = call i32 @fprintf(i32 %120, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
br label %124
122: ; preds = %113
%123 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
br label %124
124: ; preds = %122, %117
%125 = call i32 (...) @cobs_decode_onlyzero()
store i32 %125, i32* %16
%126 = load i32, i32* %16
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %133
128: ; preds = %124
%129 = load i32, i32* %6
%130 = add nsw i32 %129, 1
store i32 %130, i32* %6
%131 = load i32, i32* @stderr
%132 = call i32 @fprintf(i32 %131, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %135
133: ; preds = %124
%134 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %135
135: ; preds = %133, %128
%136 = call i32 (...) @cobs_decode_withzero()
store i32 %136, i32* %17
%137 = load i32, i32* %17
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %144
139: ; preds = %135
%140 = load i32, i32* %6
%141 = add nsw i32 %140, 1
store i32 %141, i32* %6
%142 = load i32, i32* @stderr
%143 = call i32 @fprintf(i32 %142, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %146
144: ; preds = %135
%145 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %146
146: ; preds = %144, %139
%147 = call i32 (...) @cobs_decode_multizero()
store i32 %147, i32* %18
%148 = load i32, i32* %18
%149 = icmp ne i32 %148, 0
br i1 %149, label %150, label %155
150: ; preds = %146
%151 = load i32, i32* %6
%152 = add nsw i32 %151, 1
store i32 %152, i32* %6
%153 = load i32, i32* @stderr
%154 = call i32 @fprintf(i32 %153, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %157
155: ; preds = %146
%156 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %157
157: ; preds = %155, %150
%158 = call i32 (...) @cobs_decode_reallylong()
store i32 %158, i32* %19
%159 = load i32, i32* %19
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %166
161: ; preds = %157
%162 = load i32, i32* %6
%163 = add nsw i32 %162, 1
store i32 %163, i32* %6
%164 = load i32, i32* @stderr
%165 = call i32 @fprintf(i32 %164, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %168
166: ; preds = %157
%167 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %168
168: ; preds = %166, %161
%169 = call i32 (...) @cobs_stream_basic()
store i32 %169, i32* %20
%170 = load i32, i32* %20
%171 = icmp ne i32 %170, 0
br i1 %171, label %172, label %177
172: ; preds = %168
%173 = load i32, i32* %6
%174 = add nsw i32 %173, 1
store i32 %174, i32* %6
%175 = load i32, i32* @stderr
%176 = call i32 @fprintf(i32 %175, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
br label %179
177: ; preds = %168
%178 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
br label %179
179: ; preds = %177, %172
%180 = call i32 (...) @cobs_stream_empty()
store i32 %180, i32* %21
%181 = load i32, i32* %21
%182 = icmp ne i32 %181, 0
br i1 %182, label %183, label %188
183: ; preds = %179
%184 = load i32, i32* %6
%185 = add nsw i32 %184, 1
store i32 %185, i32* %6
%186 = load i32, i32* @stderr
%187 = call i32 @fprintf(i32 %186, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
br label %190
188: ; preds = %179
%189 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
br label %190
190: ; preds = %188, %183
%191 = call i32 (...) @cobs_stream_emptyout()
store i32 %191, i32* %22
%192 = load i32, i32* %22
%193 = icmp ne i32 %192, 0
br i1 %193, label %194, label %199
194: ; preds = %190
%195 = load i32, i32* %6
%196 = add nsw i32 %195, 1
store i32 %196, i32* %6
%197 = load i32, i32* @stderr
%198 = call i32 @fprintf(i32 %197, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %201
199: ; preds = %190
%200 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %201
201: ; preds = %199, %194
%202 = call i32 (...) @cobs_stream_onlyzero()
store i32 %202, i32* %23
%203 = load i32, i32* %23
%204 = icmp ne i32 %203, 0
br i1 %204, label %205, label %210
205: ; preds = %201
%206 = load i32, i32* %6
%207 = add nsw i32 %206, 1
store i32 %207, i32* %6
%208 = load i32, i32* @stderr
%209 = call i32 @fprintf(i32 %208, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.18, i64 0, i64 0))
br label %212
210: ; preds = %201
%211 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.18, i64 0, i64 0))
br label %212
212: ; preds = %210, %205
%213 = call i32 (...) @cobs_stream_multizero()
store i32 %213, i32* %24
%214 = load i32, i32* %24
%215 = icmp ne i32 %214, 0
br i1 %215, label %216, label %221
216: ; preds = %212
%217 = load i32, i32* %6
%218 = add nsw i32 %217, 1
store i32 %218, i32* %6
%219 = load i32, i32* @stderr
%220 = call i32 @fprintf(i32 %219, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0))
br label %223
221: ; preds = %212
%222 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0))
br label %223
223: ; preds = %221, %216
%224 = call i32 (...) @cobs_stream_reallylong()
store i32 %224, i32* %25
%225 = load i32, i32* %25
%226 = icmp ne i32 %225, 0
br i1 %226, label %227, label %232
227: ; preds = %223
%228 = load i32, i32* %6
%229 = add nsw i32 %228, 1
store i32 %229, i32* %6
%230 = load i32, i32* @stderr
%231 = call i32 @fprintf(i32 %230, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
br label %234
232: ; preds = %223
%233 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
br label %234
234: ; preds = %232, %227
%235 = load i32, i32* %6
ret i32 %235
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Test %s FAILED!\0A\00"
@.str.1 = [18 x i8] c"cobs_encode_basic\00"
@.str.2 = [17 x i8] c"Test %s passed.\0A\00"
@.str.3 = [18 x i8] c"cobs_encode_empty\00"
@.str.4 = [21 x i8] c"cobs_encode_onlyzero\00"
@.str.5 = [21 x i8] c"cobs_encode_withzero\00"
@.str.6 = [22 x i8] c"cobs_encode_multizero\00"
@.str.7 = [23 x i8] c"cobs_encode_reallylong\00"
@.str.8 = [18 x i8] c"cobs_decode_basic\00"
@.str.9 = [18 x i8] c"cobs_decode_empty\00"
@.str.10 = [21 x i8] c"cobs_decode_emptyout\00"
@.str.11 = [21 x i8] c"cobs_decode_onlyzero\00"
@.str.12 = [21 x i8] c"cobs_decode_withzero\00"
@.str.13 = [22 x i8] c"cobs_decode_multizero\00"
@.str.14 = [23 x i8] c"cobs_decode_reallylong\00"
@.str.15 = [18 x i8] c"cobs_stream_basic\00"
@.str.16 = [18 x i8] c"cobs_stream_empty\00"
@.str.17 = [21 x i8] c"cobs_stream_emptyout\00"
@.str.18 = [21 x i8] c"cobs_stream_onlyzero\00"
@.str.19 = [22 x i8] c"cobs_stream_multizero\00"
@.str.20 = [23 x i8] c"cobs_stream_reallylong\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @cobs_encode_basic()
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %2
%9 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ 1, %5 ], [ 0, %8 ]
%12 = tail call i32 (...) @cobs_encode_empty()
%13 = icmp eq i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = add nuw nsw i32 %11, 1
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %20
18: ; preds = %10
%19 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18, %14
%21 = phi i32 [ %15, %14 ], [ %11, %18 ]
%22 = tail call i32 (...) @cobs_encode_onlyzero()
%23 = icmp eq i32 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %20
%25 = add nuw nsw i32 %21, 1
%26 = load i32, i32* @stderr
%27 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %30
28: ; preds = %20
%29 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %30
30: ; preds = %28, %24
%31 = phi i32 [ %25, %24 ], [ %21, %28 ]
%32 = tail call i32 (...) @cobs_encode_withzero()
%33 = icmp eq i32 %32, 0
br i1 %33, label %38, label %34
34: ; preds = %30
%35 = add nuw nsw i32 %31, 1
%36 = load i32, i32* @stderr
%37 = tail call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %40
38: ; preds = %30
%39 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %40
40: ; preds = %38, %34
%41 = phi i32 [ %35, %34 ], [ %31, %38 ]
%42 = tail call i32 (...) @cobs_encode_multizero()
%43 = icmp eq i32 %42, 0
br i1 %43, label %48, label %44
44: ; preds = %40
%45 = add nuw nsw i32 %41, 1
%46 = load i32, i32* @stderr
%47 = tail call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %50
48: ; preds = %40
%49 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %50
50: ; preds = %48, %44
%51 = phi i32 [ %45, %44 ], [ %41, %48 ]
%52 = tail call i32 (...) @cobs_encode_reallylong()
%53 = icmp eq i32 %52, 0
br i1 %53, label %58, label %54
54: ; preds = %50
%55 = add nuw nsw i32 %51, 1
%56 = load i32, i32* @stderr
%57 = tail call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %60
58: ; preds = %50
%59 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %60
60: ; preds = %58, %54
%61 = phi i32 [ %55, %54 ], [ %51, %58 ]
%62 = tail call i32 (...) @cobs_decode_basic()
%63 = icmp eq i32 %62, 0
br i1 %63, label %68, label %64
64: ; preds = %60
%65 = add nuw nsw i32 %61, 1
%66 = load i32, i32* @stderr
%67 = tail call i32 @fprintf(i32 %66, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %70
68: ; preds = %60
%69 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %70
70: ; preds = %68, %64
%71 = phi i32 [ %65, %64 ], [ %61, %68 ]
%72 = tail call i32 (...) @cobs_decode_empty()
%73 = icmp eq i32 %72, 0
br i1 %73, label %78, label %74
74: ; preds = %70
%75 = add nuw nsw i32 %71, 1
%76 = load i32, i32* @stderr
%77 = tail call i32 @fprintf(i32 %76, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %80
78: ; preds = %70
%79 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %80
80: ; preds = %78, %74
%81 = phi i32 [ %75, %74 ], [ %71, %78 ]
%82 = tail call i32 (...) @cobs_decode_emptyout()
%83 = icmp eq i32 %82, 0
br i1 %83, label %88, label %84
84: ; preds = %80
%85 = add nuw nsw i32 %81, 1
%86 = load i32, i32* @stderr
%87 = tail call i32 @fprintf(i32 %86, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
br label %90
88: ; preds = %80
%89 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
br label %90
90: ; preds = %88, %84
%91 = phi i32 [ %85, %84 ], [ %81, %88 ]
%92 = tail call i32 (...) @cobs_decode_onlyzero()
%93 = icmp eq i32 %92, 0
br i1 %93, label %98, label %94
94: ; preds = %90
%95 = add nuw nsw i32 %91, 1
%96 = load i32, i32* @stderr
%97 = tail call i32 @fprintf(i32 %96, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %100
98: ; preds = %90
%99 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
br label %100
100: ; preds = %98, %94
%101 = phi i32 [ %95, %94 ], [ %91, %98 ]
%102 = tail call i32 (...) @cobs_decode_withzero()
%103 = icmp eq i32 %102, 0
br i1 %103, label %108, label %104
104: ; preds = %100
%105 = add nuw nsw i32 %101, 1
%106 = load i32, i32* @stderr
%107 = tail call i32 @fprintf(i32 %106, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %110
108: ; preds = %100
%109 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %110
110: ; preds = %108, %104
%111 = phi i32 [ %105, %104 ], [ %101, %108 ]
%112 = tail call i32 (...) @cobs_decode_multizero()
%113 = icmp eq i32 %112, 0
br i1 %113, label %118, label %114
114: ; preds = %110
%115 = add nuw nsw i32 %111, 1
%116 = load i32, i32* @stderr
%117 = tail call i32 @fprintf(i32 %116, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %120
118: ; preds = %110
%119 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %120
120: ; preds = %118, %114
%121 = phi i32 [ %115, %114 ], [ %111, %118 ]
%122 = tail call i32 (...) @cobs_decode_reallylong()
%123 = icmp eq i32 %122, 0
br i1 %123, label %128, label %124
124: ; preds = %120
%125 = add nuw nsw i32 %121, 1
%126 = load i32, i32* @stderr
%127 = tail call i32 @fprintf(i32 %126, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %130
128: ; preds = %120
%129 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %130
130: ; preds = %128, %124
%131 = phi i32 [ %125, %124 ], [ %121, %128 ]
%132 = tail call i32 (...) @cobs_stream_basic()
%133 = icmp eq i32 %132, 0
br i1 %133, label %138, label %134
134: ; preds = %130
%135 = add nuw nsw i32 %131, 1
%136 = load i32, i32* @stderr
%137 = tail call i32 @fprintf(i32 %136, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
br label %140
138: ; preds = %130
%139 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.15, i64 0, i64 0))
br label %140
140: ; preds = %138, %134
%141 = phi i32 [ %135, %134 ], [ %131, %138 ]
%142 = tail call i32 (...) @cobs_stream_empty()
%143 = icmp eq i32 %142, 0
br i1 %143, label %148, label %144
144: ; preds = %140
%145 = add nuw nsw i32 %141, 1
%146 = load i32, i32* @stderr
%147 = tail call i32 @fprintf(i32 %146, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
br label %150
148: ; preds = %140
%149 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
br label %150
150: ; preds = %148, %144
%151 = phi i32 [ %145, %144 ], [ %141, %148 ]
%152 = tail call i32 (...) @cobs_stream_emptyout()
%153 = icmp eq i32 %152, 0
br i1 %153, label %158, label %154
154: ; preds = %150
%155 = add nuw nsw i32 %151, 1
%156 = load i32, i32* @stderr
%157 = tail call i32 @fprintf(i32 %156, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %160
158: ; preds = %150
%159 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
br label %160
160: ; preds = %158, %154
%161 = phi i32 [ %155, %154 ], [ %151, %158 ]
%162 = tail call i32 (...) @cobs_stream_onlyzero()
%163 = icmp eq i32 %162, 0
br i1 %163, label %168, label %164
164: ; preds = %160
%165 = add nuw nsw i32 %161, 1
%166 = load i32, i32* @stderr
%167 = tail call i32 @fprintf(i32 %166, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.18, i64 0, i64 0))
br label %170
168: ; preds = %160
%169 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.18, i64 0, i64 0))
br label %170
170: ; preds = %168, %164
%171 = phi i32 [ %165, %164 ], [ %161, %168 ]
%172 = tail call i32 (...) @cobs_stream_multizero()
%173 = icmp eq i32 %172, 0
br i1 %173, label %178, label %174
174: ; preds = %170
%175 = add nuw nsw i32 %171, 1
%176 = load i32, i32* @stderr
%177 = tail call i32 @fprintf(i32 %176, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0))
br label %180
178: ; preds = %170
%179 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0))
br label %180
180: ; preds = %178, %174
%181 = phi i32 [ %175, %174 ], [ %171, %178 ]
%182 = tail call i32 (...) @cobs_stream_reallylong()
%183 = icmp eq i32 %182, 0
br i1 %183, label %188, label %184
184: ; preds = %180
%185 = add nuw nsw i32 %181, 1
%186 = load i32, i32* @stderr
%187 = tail call i32 @fprintf(i32 %186, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
br label %190
188: ; preds = %180
%189 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
br label %190
190: ; preds = %188, %184
%191 = phi i32 [ %185, %184 ], [ %181, %188 ]
ret i32 %191
}