#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 */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, ...);
signed int adders(signed int llvm_cbe_in1, signed int llvm_cbe_in2,
                  signed int llvm_cbe_in3) {
  static unsigned long long aesl_llvm_cbe_1_count = 0;
  static unsigned long long aesl_llvm_cbe_2_count = 0;
  static unsigned long long aesl_llvm_cbe_3_count = 0;
  static unsigned long long aesl_llvm_cbe_4_count = 0;
  static unsigned long long aesl_llvm_cbe_5_count = 0;
  static unsigned long long aesl_llvm_cbe_6_count = 0;
  static unsigned long long aesl_llvm_cbe_7_count = 0;
  unsigned int llvm_cbe_tmp__1;
  static unsigned long long aesl_llvm_cbe_8_count = 0;
  unsigned int llvm_cbe_tmp__2;
  static unsigned long long aesl_llvm_cbe_9_count = 0;
  static unsigned long long aesl_llvm_cbe_10_count = 0;
  static unsigned long long aesl_llvm_cbe_11_count = 0;
  const char *AESL_DEBUG_TRACE = getenv("DEBUG_TRACE");
  if (AESL_DEBUG_TRACE)
    printf("\n\{ BEGIN @adders\n");
  if (AESL_DEBUG_TRACE)
    printf("\n  %%1 = add i32 %%in2, %%in1, !dbg !2 for 0x%I64xth hint within "
           "@adders  --> \n",
           ++aesl_llvm_cbe_7_count);
  llvm_cbe_tmp__1 =
      (unsigned int)((unsigned int)(llvm_cbe_in2 & 4294967295ull)) +
      ((unsigned int)(llvm_cbe_in1 & 4294967295ull));
  if (AESL_DEBUG_TRACE)
    printf("\n = 0x%X\n", ((unsigned int)(llvm_cbe_tmp__1 & 4294967295ull)));
  if (AESL_DEBUG_TRACE)
    printf("\n  %%2 = add i32 %%1, %%in3, !dbg !2 for 0x%I64xth hint within "
           "@adders  --> \n",
           ++aesl_llvm_cbe_8_count);
  llvm_cbe_tmp__2 =
      (unsigned int)((unsigned int)(llvm_cbe_tmp__1 & 4294967295ull)) +
      ((unsigned int)(llvm_cbe_in3 & 4294967295ull));
  if (AESL_DEBUG_TRACE)
    printf("\n = 0x%X\n", ((unsigned int)(llvm_cbe_tmp__2 & 4294967295ull)));
  if (AESL_DEBUG_TRACE)
    printf("\nEND @adders}\n");
  return llvm_cbe_tmp__2;
}


x86 assembly (clang, -O0):
<adders>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115a <adders+0x3a>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x20(%rbp)
je     1185 <adders+0x65>
mov    0x2efc(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2ef1(%rip)
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x8(%rbp),%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xffffffff,%rdx
and    %rdx,%rcx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11d7 <adders+0xb7>
mov    -0x10(%rbp),%eax
movabs $0xffffffff,%rcx
and    %rcx,%rax
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x20(%rbp)
je     1202 <adders+0xe2>
mov    0x2e87(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2e7c(%rip)
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
movabs $0xffffffff,%rcx
and    %rcx,%rax
movslq -0xc(%rbp),%rcx
movabs $0xffffffff,%rdx
and    %rdx,%rcx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1253 <adders+0x133>
mov    -0x14(%rbp),%eax
movabs $0xffffffff,%rcx
and    %rcx,%rax
mov    %eax,%esi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x20(%rbp)
je     126c <adders+0x14c>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adders>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xebe(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     11ca <adders+0x9a>
lea    0xf6f(%rip),%rdi
call   1040 <puts@plt>
mov    0x2ee1(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2ed6(%rip)
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    %ebp,%ebx
lea    0xedb(%rip),%rbp
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2eb4(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2ea9(%rip)
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    %r14d,%ebx
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xef1(%rip),%rdi
call   1040 <puts@plt>
jmp    11cf <adders+0x9f>
add    %ebp,%ebx
add    %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@adders.aesl_llvm_cbe_1_count = internal global i64 0
@adders.aesl_llvm_cbe_2_count = internal global i64 0
@adders.aesl_llvm_cbe_3_count = internal global i64 0
@adders.aesl_llvm_cbe_4_count = internal global i64 0
@adders.aesl_llvm_cbe_5_count = internal global i64 0
@adders.aesl_llvm_cbe_6_count = internal global i64 0
@adders.aesl_llvm_cbe_7_count = internal global i64 0
@adders.aesl_llvm_cbe_8_count = internal global i64 0
@adders.aesl_llvm_cbe_9_count = internal global i64 0
@adders.aesl_llvm_cbe_10_count = internal global i64 0
@adders.aesl_llvm_cbe_11_count = internal global i64 0
@.str = [12 x i8] c"DEBUG_TRACE\00"
@.str.1 = [18 x i8] c"\0A{ BEGIN @adders\0A\00"
@.str.2 = [80 x i8] c"\0A %%1 = add i32 %%in2, %%in1 for 0x%I64xth hint within @adders --> \0A\00"
@.str.3 = [10 x i8] c"\0A = 0x%X\0A\00"
@.str.4 = [78 x i8] c"\0A %%2 = add i32 %%1, %%in3 for 0x%I64xth hint within @adders --> \0A\00"
@.str.5 = [15 x i8] c"\0AEND @adders}\0A\00"
define i32 @adders(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %10, i8** %9
%11 = load i8*, i8** %9
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i8*, i8** %9
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i64, i64* @adders.aesl_llvm_cbe_7_count
%20 = add i64 %19, 1
store i64 %20, i64* @adders.aesl_llvm_cbe_7_count
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0), i64 %20)
br label %22
22: ; preds = %18, %15
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = and i64 %24, 4294967295
%26 = trunc i64 %25 to i32
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = and i64 %28, 4294967295
%30 = trunc i64 %29 to i32
%31 = add i32 %26, %30
store i32 %31, i32* %7
%32 = load i8*, i8** %9
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %40
34: ; preds = %22
%35 = load i32, i32* %7
%36 = zext i32 %35 to i64
%37 = and i64 %36, 4294967295
%38 = trunc i64 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %34, %22
%41 = load i8*, i8** %9
%42 = icmp ne i8* %41, null
br i1 %42, label %43, label %47
43: ; preds = %40
%44 = load i64, i64* @adders.aesl_llvm_cbe_8_count
%45 = add i64 %44, 1
store i64 %45, i64* @adders.aesl_llvm_cbe_8_count
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.4, i64 0, i64 0), i64 %45)
br label %47
47: ; preds = %43, %40
%48 = load i32, i32* %7
%49 = zext i32 %48 to i64
%50 = and i64 %49, 4294967295
%51 = trunc i64 %50 to i32
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = and i64 %53, 4294967295
%55 = trunc i64 %54 to i32
%56 = add i32 %51, %55
store i32 %56, i32* %8
%57 = load i8*, i8** %9
%58 = icmp ne i8* %57, null
br i1 %58, label %59, label %65
59: ; preds = %47
%60 = load i32, i32* %8
%61 = zext i32 %60 to i64
%62 = and i64 %61, 4294967295
%63 = trunc i64 %62 to i32
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %59, %47
%66 = load i8*, i8** %9
%67 = icmp ne i8* %66, null
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %70
70: ; preds = %68, %65
%71 = load i32, i32* %8
ret i32 %71
}

LLVM IR (-O2):
@adders.aesl_llvm_cbe_7_count = internal unnamed_addr global i64 0
@adders.aesl_llvm_cbe_8_count = internal unnamed_addr global i64 0
@.str = [12 x i8] c"DEBUG_TRACE\00"
@.str.2 = [80 x i8] c"\0A %%1 = add i32 %%in2, %%in1 for 0x%I64xth hint within @adders --> \0A\00"
@.str.3 = [10 x i8] c"\0A = 0x%X\0A\00"
@.str.4 = [78 x i8] c"\0A %%2 = add i32 %%1, %%in3 for 0x%I64xth hint within @adders --> \0A\00"
@str = [14 x i8] c"\0AEND @adders}\00"
@str.6 = [17 x i8] c"\0A{ BEGIN @adders\00"
define i32 @adders(i32 %0, i32 %1, i32 %2) {
%4 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = add i32 %1, %0
%8 = add i32 %7, %2
br label %22
9: ; preds = %3
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.6, i64 0, i64 0))
%11 = load i64, i64* @adders.aesl_llvm_cbe_7_count
%12 = add i64 %11, 1
store i64 %12, i64* @adders.aesl_llvm_cbe_7_count
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0), i64 %12)
%14 = add i32 %1, %0
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = load i64, i64* @adders.aesl_llvm_cbe_8_count
%17 = add i64 %16, 1
store i64 %17, i64* @adders.aesl_llvm_cbe_8_count
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @.str.4, i64 0, i64 0), i64 %17)
%19 = add i32 %14, %2
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %22
22: ; preds = %6, %9
%23 = phi i32 [ %8, %6 ], [ %19, %9 ]
ret i32 %23
}