#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 /*<<< orphan*/ printf(char *);
scalar_t__ test_many255();
int main(int narg, char **args) {
  if (test_many255()) {
    printf("test_"
           "many255"
           " failed\n\n");
    return 1;
  } else
    printf("test_"
           "many255"
           " passed\n\n");
  ;
  printf("all tests passed, good work and go home.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_many255@plt>
cmp    $0x0,%rax
je     115f <main+0x3f>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    117e <main+0x5e>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <test_many255@plt>
test   %rax,%rax
je     113d <main+0x1d>
mov    $0x1,%ebx
lea    0xf03(%rip),%rdi
jmp    1150 <main+0x30>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"test_many255 failed\0A\0A\00"
@.str.1 = [22 x i8] c"test_many255 passed\0A\0A\00"
@.str.2 = [42 x i8] c"all tests passed, good work and go home.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 (...) @test_many255()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %14
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10
%13 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@str = [21 x i8] c"test_many255 passed\0A\00"
@str.3 = [41 x i8] c"all tests passed, good work and go home.\00"
@str.4 = [21 x i8] c"test_many255 failed\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @test_many255()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ getelementptr inbounds ([41 x i8], [41 x i8]* @str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.4, i64 0, i64 0), %2 ]
%9 = phi i32 [ 0, %5 ], [ 1, %2 ]
%10 = tail call i32 @puts(i8* dereferenceable(1) %8)
ret i32 %9
}