#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 CISC\t\t\t\t(CPU_CISC == 1)\n");
  printf("using native 64-bit type\t\t(NO_64_BIT_MATH == 0)\n");
  printf("using stdout for error reporting\t(ERR_REPORTING_STDOUT == 1)\n");
  str = "/dev/urandom";
  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>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf50(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeec(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11b2 <main+0x92>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11cd <main+0xad>
mov    -0x8(%rbp),%esi
lea    0xf3d(%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    0xf47(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf83(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
lea    0xe91(%rip),%rbx
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    11a6 <main+0x76>
lea    0xea4(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
test   %rbx,%rbx
sete   %al
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 = [36 x i8] c"CPU set to CISC\09\09\09\09(CPU_CISC == 1)\0A\00"
@.str.2 = [49 x i8] c"using native 64-bit type\09\09(NO_64_BIT_MATH == 0)\0A\00"
@.str.3 = [62 x i8] c"using stdout for error reporting\09(ERR_REPORTING_STDOUT == 1)\0A\00"
@.str.4 = [13 x i8] c"/dev/urandom\00"
@.str.5 = [49 x i8] c"using %s as a random source\09(DEV_URANDOM == %s)\0A\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [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 ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %3
%12 = call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %0
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.7, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %17
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
@.str.4 = [13 x i8] c"/dev/urandom\00"
@.str.5 = [49 x i8] c"using %s as a random source\09(DEV_URANDOM == %s)\0A\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [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.8 = [35 x i8] c"CPU set to CISC\09\09\09\09(CPU_CISC == 1)\00"
@str.9 = [48 x i8] c"using native 64-bit type\09\09(NO_64_BIT_MATH == 0)\00"
@str.10 = [61 x i8] c"using stdout for error reporting\09(ERR_REPORTING_STDOUT == 1)\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 ([35 x i8], [35 x i8]* @str.8, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.9, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.10, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.7, i64 0, i64 0), i32 1)
br label %10
10: ; preds = %8, %0
%11 = zext i1 %7 to i32
ret i32 %11
}