#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__ strcmp(char *, char *);
int main(void) {
  int err_count = 0;
  char *str;
  printf("CPU set to little-endian\t\t(WORDS_BIGENDIAN == 0)\n");
  printf("CPU set to an unknown type, probably due to a configuration error\n");
  err_count++;
  printf("using native 64-bit type\t\t(NO_64_BIT_MATH == 0)\n");
  str = "";
  printf("using %s as a random source\t(DEV_URANDOM == %s)\n", str, str);
  if (strcmp("", str) == 0) {
    err_count++;
  }
  if (err_count)
    printf("warning: configuration is probably in error "
           "(found %d problems)\n",
           err_count);
  return err_count;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf35(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xf10(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11ad <main+0x8d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11c8 <main+0xa8>
mov    -0x8(%rbp),%esi
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf3a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf95(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
lea    0xecd(%rip),%rbx
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
cmp    $0x1,%rax
mov    $0x1,%ebx
adc    $0x0,%ebx
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"CPU set to little-endian\09\09(WORDS_BIGENDIAN == 0)\0A\00"
@.str.1 = [67 x i8] c"CPU set to an unknown type, probably due to a configuration error\0A\00"
@.str.2 = [49 x i8] c"using native 64-bit type\09\09(NO_64_BIT_MATH == 0)\0A\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [49 x i8] c"using %s as a random source\09(DEV_URANDOM == %s)\0A\00"
@.str.5 = [65 x i8] c"warning: configuration is probably in error (found %d problems)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i8* %9, i8* %10)
%12 = load i8*, i8** %3
%13 = call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %0
%19 = load i32, i32* %2
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %18
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [49 x i8] c"using %s as a random source\09(DEV_URANDOM == %s)\0A\00"
@.str.5 = [65 x i8] c"warning: configuration is probably in error (found %d problems)\0A\00"
@str = [49 x i8] c"CPU set to little-endian\09\09(WORDS_BIGENDIAN == 0)\00"
@str.6 = [66 x i8] c"CPU set to an unknown type, probably due to a configuration error\00"
@str.7 = [48 x i8] c"using native 64-bit type\09\09(NO_64_BIT_MATH == 0)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.6, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.7, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 2, i32 1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0), i32 %7)
ret i32 %7
}