xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strlen(char *);
scalar_t__ strnlen(char *, int);
void strnlen_is_not_strlen(char *x) {
  clang_analyzer_eval(strnlen(x, 10) == strlen(x));
}


x86 assembly (clang, -O0):
<strnlen_is_not_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1040 <strnlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen_is_not_strlen>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xa,%esi
call   1040 <strnlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %edi,%edi
cmp    %rax,%r14
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @strnlen_is_not_strlen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strnlen(i8* %3, i32 10)
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
%9 = call i32 @clang_analyzer_eval(i32 %8)
ret void
}

LLVM IR (-O2):
define void @strnlen_is_not_strlen(i8* %0) {
%2 = tail call i64 @strnlen(i8* %0, i32 10)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @clang_analyzer_eval(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int be32toh(int /*<<< orphan*/);
size_t fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
bool is_class(FILE *class_file) {
  uint32_t magicNum;
  size_t num_read = fread(&magicNum, sizeof(uint32_t), 1, class_file);
  return num_read == 1 && be32toh(magicNum) == 0xcafebabe;
}


x86 assembly (clang, -O0):
<is_class>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x1,-0x18(%rbp)
mov    %al,-0x19(%rbp)
jne    116a <is_class+0x4a>
mov    -0xc(%rbp),%edi
call   1040 <be32toh@plt>
cmp    $0xcafebabe,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_class>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x1,%rcx
jne    1159 <is_class+0x39>
mov    0x4(%rsp),%edi
call   1040 <be32toh@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xcafebabe,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_class(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @fread(i32* %3, i32 4, i32 1, i32* %5)
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @be32toh(i32 %10)
%12 = icmp eq i32 %11, -889275714
br label %13
13: ; preds = %9, %1
%14 = phi i1 [ false, %1 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_class(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = icmp eq i64 %4, 1
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = tail call i32 @be32toh(i32 %7)
%9 = icmp eq i32 %8, -889275714
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %1
%12 = phi i32 [ 0, %1 ], [ %10, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void routineZ(void *data) {
  int i;
  printf("<Z: %p>", &i);
  printf("[Z: end]");
}


x86 assembly (clang, -O0):
<routineZ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<routineZ>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"<Z: %p>\00"
@.str.1 = [9 x i8] c"[Z: end]\00"
define void @routineZ(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"<Z: %p>\00"
@.str.1 = [9 x i8] c"[Z: end]\00"
define void @routineZ(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_golang_comments() {
  test_parser_verify_parse(test_parser_sourcefile("go", " //comment"), "go", "",
                           "//comment", 0);
}


x86 assembly (clang, -O0):
<test_golang_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebb(%rip),%rdx
lea    0xeb6(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_golang_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec4(%rip),%rdx
lea    0xebf(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"go\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_golang_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"go\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_golang_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_results(char *, int);
int /*<<< orphan*/ printf(char *);
int test_safe_atoi();
int main(int argc, char **argv) {
  int result = 0;
  argc = argc;
  argv = argv;
  result = test_safe_atoi();
  printf("\n-----------------------------");
  print_results("TOTAL_TESTSUITE:", result);
  printf("-----------------------------\n");
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test_safe_atoi@plt>
mov    %eax,-0x14(%rbp)
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1050 <print_results@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <test_safe_atoi@plt>
mov    %eax,%ebx
lea    0xeaf(%rip),%rdi
call   1050 <printf@plt>
lea    0xec2(%rip),%rdi
mov    %ebx,%esi
call   1060 <print_results@plt>
lea    0xe96(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0A-----------------------------\00"
@.str.1 = [17 x i8] c"TOTAL_TESTSUITE:\00"
@.str.2 = [31 x i8] c"-----------------------------\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
store i32 %7, i32* %4
%8 = load i8**, i8*** %5
store i8** %8, i8*** %5
%9 = call i32 (...) @test_safe_atoi()
store i32 %9, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %6
%12 = call i32 @print_results(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0A-----------------------------\00"
@.str.1 = [17 x i8] c"TOTAL_TESTSUITE:\00"
@str = [30 x i8] c"-----------------------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_safe_atoi()
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @print_results(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 %3
}
void baz(struct node *n) {}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
ret

LLVM IR (-O0):
%struct.node = type opaque
define void @baz(%struct.node* %0) {
%2 = alloca %struct.node*
store %struct.node* %0, %struct.node** %2
ret void
}

LLVM IR (-O2):
%struct.node = type opaque
define void @baz(%struct.node* nocapture %0) {
ret void
}
int set_socket_nonblocking(int sock) {
  int err;
  if (sock == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<set_socket_nonblocking>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    111d <set_socket_nonblocking+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1124 <set_socket_nonblocking+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_socket_nonblocking>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @set_socket_nonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @set_socket_nonblocking(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = sext i1 %2 to i32
ret i32 %3
}
double eccentricity(double tdt) {
  double T;
  double e;
  T = (tdt - (2433282.42345905)) / (36525.0);
  e = 0.01673011 + T * (-0.00004193 + (T * (-0.000000126)));
  return (e);
}


x86 assembly (clang, -O0):
<eccentricity>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf0a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xef6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xecb(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xec7(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<eccentricity>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @eccentricity(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fsub double %5, 0x414290813633E7F9
%7 = fdiv double %6, 3.652500e+04
store double %7, double* %3
%8 = load double, double* %3
%9 = load double, double* %3
%10 = call double @llvm.fmuladd.f64(double %9, double -1.260000e-07, double -4.193000e-05)
%11 = call double @llvm.fmuladd.f64(double %8, double %10, double 0x3F9121B2AD3BE2DA)
store double %11, double* %4
%12 = load double, double* %4
ret double %12
}

LLVM IR (-O2):
define double @eccentricity(double %0) {
%2 = fadd double %0, 0xC14290813633E7F9
%3 = fdiv double %2, 3.652500e+04
%4 = tail call double @llvm.fmuladd.f64(double %3, double -1.260000e-07, double -4.193000e-05)
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double 0x3F9121B2AD3BE2DA)
ret double %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int wantsTheH(char *line) { return strcmp(line, "history") == 0; }


x86 assembly (clang, -O0):
<wantsTheH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wantsTheH>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"history\00"
define i32 @wantsTheH(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [8 x i8] c"history\00"
define i32 @wantsTheH(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void testAssignment() {
  int a, b;
  a = 3;
  b = a;
  printf("b == %d\n", b);
}


x86 assembly (clang, -O0):
<testAssignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAssignment>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"b == %d\0A\00"
define void @testAssignment() {
%1 = alloca i32
%2 = alloca i32
store i32 3, i32* %1
%3 = load i32, i32* %1
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"b == %d\0A\00"
define void @testAssignment() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ budd_panic_int(char *, int);
int /*<<< orphan*/ genByte(int);
void genVal(int v) {
  if ((v < 0) || (v > 0xFFFF)) {
    budd_panic_int("illegal value", v);
  }
  genByte(v & 0xFF);
  genByte(v >> 8);
}


x86 assembly (clang, -O0):
<genVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1142 <genVal+0x22>
cmpl   $0xffff,-0x4(%rbp)
jle    1151 <genVal+0x31>
mov    -0x4(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1040 <budd_panic_int@plt>
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <genByte@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
call   1030 <genByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genVal>:
push   %rbx
mov    %edi,%ebx
cmp    $0x10000,%edi
jb     1139 <genVal+0x19>
lea    0xece(%rip),%rdi
mov    %ebx,%esi
call   1040 <budd_panic_int@plt>
movzbl %bl,%edi
call   1030 <genByte@plt>
sar    $0x8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <genByte@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"illegal value\00"
define void @genVal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 65535
br i1 %7, label %8, label %11
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = call i32 @budd_panic_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %5
%12 = load i32, i32* %2
%13 = and i32 %12, 255
%14 = call i32 @genByte(i32 %13)
%15 = load i32, i32* %2
%16 = ashr i32 %15, 8
%17 = call i32 @genByte(i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"illegal value\00"
define void @genVal(i32 %0) {
%2 = icmp ugt i32 %0, 65535
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @budd_panic_int(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %1, %3
%6 = and i32 %0, 255
%7 = tail call i32 @genByte(i32 %6)
%8 = ashr i32 %0, 8
%9 = tail call i32 @genByte(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_cpuid(int);
int /*<<< orphan*/ set_n_cpus();
int main(int argc, char **argv) {
  if (argc == 1)
    do_cpuid(0xaaaaaaaa);
  else if (argc == 2)
    do_cpuid(0xfa11dead);
  set_n_cpus();
  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)
cmpl   $0x1,-0x8(%rbp)
jne    114f <main+0x2f>
mov    $0xaaaaaaaa,%edi
call   1040 <do_cpuid@plt>
jmp    1168 <main+0x48>
cmpl   $0x2,-0x8(%rbp)
jne    1163 <main+0x43>
mov    $0xfa11dead,%edi
call   1040 <do_cpuid@plt>
jmp    1168 <main+0x48>
mov    $0x0,%al
call   1030 <set_n_cpus@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
je     1132 <main+0x12>
cmp    $0x2,%edi
jne    113c <main+0x1c>
mov    $0xfa11dead,%edi
jmp    1137 <main+0x17>
mov    $0xaaaaaaaa,%edi
call   1040 <do_cpuid@plt>
xor    %eax,%eax
call   1030 <set_n_cpus@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @do_cpuid(i32 -1431655766)
br label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @do_cpuid(i32 -99492179)
br label %15
15: ; preds = %13, %10
br label %16
16: ; preds = %15, %8
%17 = call i32 (...) @set_n_cpus()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
switch i32 %0, label %7 [
i32 1, label %4
i32 2, label %3
]
3: ; preds = %2
br label %4
4: ; preds = %2, %3
%5 = phi i32 [ -99492179, %3 ], [ -1431655766, %2 ]
%6 = tail call i32 @do_cpuid(i32 %5)
br label %7
7: ; preds = %4, %2
%8 = tail call i32 (...) @set_n_cpus()
ret i32 0
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *memCalloc(size_t n, size_t size) {
  void *tmp;
  tmp = calloc(n, size);
  if (tmp == (void *)NULL) {
    fprintf(stderr, "Unable to allocate memory...Exiting\n");
    exit(1);
  }
  return (tmp);
}


x86 assembly (clang, -O0):
<memCalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <memCalloc+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memCalloc>:
push   %rax
call   1030 <calloc@plt>
test   %rax,%rax
je     113d <memCalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Unable to allocate memory...Exiting\0A\00"
define i8* @memCalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Unable to allocate memory...Exiting\0A\00"
define noalias i8* @memCalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t swap_uint16(uint16_t val) { return (val << 8) | (val >> 8); }


x86 assembly (clang, -O0):
<swap_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_uint16>:
mov    %edi,%eax
shl    $0x8,%eax
sar    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @swap_uint16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @swap_uint16(i32 %0) {
%2 = shl i32 %0, 8
%3 = ashr i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
void ff_hevc_put_hevc_bi_w_qpel_hv64_8_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_bi_w_qpel_hv64_8_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_bi_w_qpel_hv64_8_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_bi_w_qpel_hv64_8_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_hv64_8_sse4() {
ret void
}
/* Variables and functions */
int bar();
int foo(int, int);
int main(void) {
  int a, b, c;
  a = foo(5, 7) + foo(6, 7) + bar();
  b = 4;
  c = b * b;
  if (b > c)
    return b - c;
  else
    return b + c;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x7,%esi
call   1040 <foo@plt>
mov    %eax,-0x18(%rbp)
mov    $0x6,%edi
mov    $0x7,%esi
call   1040 <foo@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1196 <main+0x76>
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    119f <main+0x7f>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x7,%esi
call   1040 <foo@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1040 <foo@plt>
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x14,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @foo(i32 5, i32 7)
%6 = call i32 @foo(i32 6, i32 7)
%7 = add nsw i32 %5, %6
%8 = call i32 (...) @bar()
%9 = add nsw i32 %7, %8
store i32 %9, i32* %2
store i32 4, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = mul nsw i32 %10, %11
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %0
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = sub nsw i32 %17, %18
store i32 %19, i32* %1
br label %24
20: ; preds = %0
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = add nsw i32 %21, %22
store i32 %23, i32* %1
br label %24
24: ; preds = %20, %16
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 5, i32 7)
%2 = tail call i32 @foo(i32 6, i32 7)
%3 = tail call i32 (...) @bar()
ret i32 20
}
/* Type definitions */
struct prog_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_blacklist(struct prog_info *);
int /*<<< orphan*/ free_constants(struct prog_info *);
int /*<<< orphan*/ free_defs(struct prog_info *);
int /*<<< orphan*/ free_labels(struct prog_info *);
int /*<<< orphan*/ free_orglist(struct prog_info *);
int /*<<< orphan*/ free_variables(struct prog_info *);
void free_pi(struct prog_info *pi) {
  free_defs(pi);
  free_labels(pi);
  free_constants(pi);
  free_variables(pi);
  free_blacklist(pi);
  free_orglist(pi);
}


x86 assembly (clang, -O0):
<free_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free_defs@plt>
mov    -0x8(%rbp),%rdi
call   1060 <free_labels@plt>
mov    -0x8(%rbp),%rdi
call   1080 <free_constants@plt>
mov    -0x8(%rbp),%rdi
call   1050 <free_variables@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free_blacklist@plt>
mov    -0x8(%rbp),%rdi
call   1070 <free_orglist@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_pi>:
push   %rbx
mov    %rdi,%rbx
call   1030 <free_defs@plt>
mov    %rbx,%rdi
call   1060 <free_labels@plt>
mov    %rbx,%rdi
call   1080 <free_constants@plt>
mov    %rbx,%rdi
call   1050 <free_variables@plt>
mov    %rbx,%rdi
call   1040 <free_blacklist@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <free_orglist@plt>

LLVM IR (-O0):
%struct.prog_info = type { i32 }
define void @free_pi(%struct.prog_info* %0) {
%2 = alloca %struct.prog_info*
store %struct.prog_info* %0, %struct.prog_info** %2
%3 = load %struct.prog_info*, %struct.prog_info** %2
%4 = call i32 @free_defs(%struct.prog_info* %3)
%5 = load %struct.prog_info*, %struct.prog_info** %2
%6 = call i32 @free_labels(%struct.prog_info* %5)
%7 = load %struct.prog_info*, %struct.prog_info** %2
%8 = call i32 @free_constants(%struct.prog_info* %7)
%9 = load %struct.prog_info*, %struct.prog_info** %2
%10 = call i32 @free_variables(%struct.prog_info* %9)
%11 = load %struct.prog_info*, %struct.prog_info** %2
%12 = call i32 @free_blacklist(%struct.prog_info* %11)
%13 = load %struct.prog_info*, %struct.prog_info** %2
%14 = call i32 @free_orglist(%struct.prog_info* %13)
ret void
}

LLVM IR (-O2):
%struct.prog_info = type { i32 }
define void @free_pi(%struct.prog_info* %0) {
%2 = tail call i32 @free_defs(%struct.prog_info* %0)
%3 = tail call i32 @free_labels(%struct.prog_info* %0)
%4 = tail call i32 @free_constants(%struct.prog_info* %0)
%5 = tail call i32 @free_variables(%struct.prog_info* %0)
%6 = tail call i32 @free_blacklist(%struct.prog_info* %0)
%7 = tail call i32 @free_orglist(%struct.prog_info* %0)
ret void
}
int main(int argc, char **argv) {
  int j, k;
  for (j = 0; j < argc; j++) {
    for (k = 0; k < argc; k++) {
      if ((((j) > (k)) ? (j) : (k)) || j)
        continue;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1192 <main+0x92>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117f <main+0x7f>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1153 <main+0x53>
cmpl   $0x0,-0x14(%rbp)
jne    1167 <main+0x67>
jmp    115d <main+0x5d>
cmpl   $0x0,-0x18(%rbp)
jne    1167 <main+0x67>
cmpl   $0x0,-0x14(%rbp)
je     116c <main+0x6c>
jmp    1171 <main+0x71>
jmp    1171 <main+0x71>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112c <main+0x2c>
jmp    1184 <main+0x84>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %8
8: ; preds = %36, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %39
12: ; preds = %8
store i32 0, i32* %7
br label %13
13: ; preds = %32, %12
%14 = load i32, i32* %7
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %35
17: ; preds = %13
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load i32, i32* %6
%23 = icmp ne i32 %22, 0
br i1 %23, label %30, label %27
24: ; preds = %17
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %24, %21
%28 = load i32, i32* %6
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %27, %24, %21
br label %32
31: ; preds = %27
br label %32
32: ; preds = %31, %30
%33 = load i32, i32* %7
%34 = add nsw i32 %33, 1
store i32 %34, i32* %7
br label %13
35: ; preds = %13
br label %36
36: ; preds = %35
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
br label %8
39: ; preds = %8
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
double M_PI;
float volumecone(float radius, float height) {
  float volume;
  volume = (1.0 / 3) * M_PI * (radius * radius) * height;
  return volume;
}


x86 assembly (clang, -O0):
<volumecone>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  0xeea(%rip),%xmm0
mov    0x2ecb(%rip),%rax
mulsd  (%rax),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<volumecone>:
mov    0x2ee1(%rip),%rax
movsd  (%rax),%xmm2
mulsd  0xeed(%rip),%xmm2
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define float @volumecone(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load double, double* @M_PI
%7 = fmul double 0x3FD5555555555555, %6
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = fpext float %10 to double
%12 = fmul double %7, %11
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = fmul double %12, %14
%16 = fptrunc double %15 to float
store float %16, float* %5
%17 = load float, float* %5
ret float %17
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define float @volumecone(float %0, float %1) {
%3 = load double, double* @M_PI
%4 = fmul double %3, 0x3FD5555555555555
%5 = fmul float %0, %0
%6 = fpext float %5 to double
%7 = fmul double %4, %6
%8 = fpext float %1 to double
%9 = fmul double %7, %8
%10 = fptrunc double %9 to float
ret float %10
}
struct param_d *dev_add_param_llint_ro(struct device_d *dev, const char *name,
                                       long long value, const char *format) {
  return ((void *)0);
}


x86 assembly (clang, -O0):
<dev_add_param_llint_ro>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dev_add_param_llint_ro>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.param_d = type opaque
%struct.device_d = type opaque
define %struct.param_d* @dev_add_param_llint_ro(%struct.device_d* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca %struct.device_d*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store %struct.device_d* %0, %struct.device_d** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
ret %struct.param_d* null
}

LLVM IR (-O2):
%struct.param_d = type opaque
%struct.device_d = type opaque
define noalias %struct.param_d* @dev_add_param_llint_ro(%struct.device_d* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i8* nocapture readnone %3) {
ret %struct.param_d* null
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
size_t __infer_nondet_int();
size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t *ps) {
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<wcsrtombs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsrtombs>:
xor    %eax,%eax
jmp    1030 <__infer_nondet_int@plt>

LLVM IR (-O0):
define i64 @wcsrtombs(i8* %0, i32** %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32**
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i32** %1, i32*** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = call i64 (...) @__infer_nondet_int()
ret i64 %9
}

LLVM IR (-O2):
define i64 @wcsrtombs(i8* nocapture readnone %0, i32** nocapture readnone %1, i64 %2, i32* nocapture readnone %3) {
%5 = tail call i64 (...) @__infer_nondet_int()
ret i64 %5
}
void seebig(int *len, int bigletter_height, int *big) {
  *big = 0;
  if (*len > bigletter_height) {
    *big = bigletter_height + 1;
    *len -= *big;
  }
}


x86 assembly (clang, -O0):
<seebig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <seebig+0x44>
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<seebig>:
movl   $0x0,(%rdx)
cmp    %esi,(%rdi)
jle    1111 <seebig+0x11>
add    $0x1,%esi
mov    %esi,(%rdx)
sub    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @seebig(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
store i32 0, i32* %7
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32, i32* %5
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %3
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = load i32*, i32** %6
store i32 %14, i32* %15
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %18
%20 = sub nsw i32 %19, %17
store i32 %20, i32* %18
br label %21
21: ; preds = %12, %3
ret void
}

LLVM IR (-O2):
define void @seebig(i32* nocapture %0, i32 %1, i32* nocapture writeonly %2) {
store i32 0, i32* %2
%4 = load i32, i32* %0
%5 = icmp sgt i32 %4, %1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = add nsw i32 %1, 1
store i32 %7, i32* %2
%8 = load i32, i32* %0
%9 = sub nsw i32 %8, %7
store i32 %9, i32* %0
br label %10
10: ; preds = %6, %3
ret void
}
int do_150() { return 150; }


x86 assembly (clang, -O0):
<do_150>:
push   %rbp
mov    %rsp,%rbp
mov    $0x96,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_150>:
mov    $0x96,%eax
ret

LLVM IR (-O0):
define i32 @do_150() {
ret i32 150
}

LLVM IR (-O2):
define i32 @do_150() {
ret i32 150
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char *);
char *xstrdup(char *str) {
  char *cpy = strdup(str);
  if (!cpy) {
    fprintf(stderr, "out of memory\n");
    exit(1);
  }
  return cpy;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xstrdup+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
int main() {
  int a;
  int b;
  int c;
  if (a && (b + a)) {
  A:
    c = -a;
  } else {
    b = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1136 <main+0x36>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1136 <main+0x36>
jmp    1129 <main+0x29>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x3d>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %8, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
br label %13
13: ; preds = %12
%14 = load i32, i32* %2
%15 = sub nsw i32 0, %14
store i32 %15, i32* %4
br label %17
16: ; preds = %7, %0
store i32 0, i32* %3
br label %17
17: ; preds = %16, %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, long, long);
int /*<<< orphan*/ printfail();
void expectl(long a, long b) {
  if (!(a == b)) {
    printfail();
    printf("\n  %ld expected, but got %ld\n", a, b);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<expectl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1173 <expectl+0x43>
mov    $0x0,%al
call   1040 <printfail@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expectl>:
cmp    %rsi,%rdi
jne    1136 <expectl+0x6>
ret
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <printfail@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"\0A %ld expected, but got %ld\0A\00"
define void @expectl(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = call i32 (...) @printfail()
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %10, i64 %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"\0A %ld expected, but got %ld\0A\00"
define void @expectl(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 (...) @printfail()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
int main() {
  if (sizeof(0) != 4)
    return 1;
  if (sizeof(char) != 1)
    return 2;
  if (sizeof(int) != 4)
    return 3;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help_redirection(void) {
  printf("\n the support is given for only redirecting output to file or "
         "concatenating");
  printf("\nfor any problem contact amrit kumar at amritkrs@gmail.com\n");
}


x86 assembly (clang, -O0):
<help_redirection>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf25(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_redirection>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [76 x i8] c"\0A the support is given for only redirecting output to file or concatenating\00"
@.str.1 = [60 x i8] c"\0Afor any problem contact amrit kumar at amritkrs@gmail.com\0A\00"
define void @help_redirection() {
%1 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [76 x i8] c"\0A the support is given for only redirecting output to file or concatenating\00"
@str = [59 x i8] c"\0Afor any problem contact amrit kumar at amritkrs@gmail.com\00"
define void @help_redirection() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ handle_tweet();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("--------------------------------------------\n"
         "|   ~Welcome to l33t-tw33ts ~    v.0.13.37 |\n"
         "--------------------------------------------\n");
  handle_tweet();
  return EXIT_SUCCESS;
}


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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <handle_tweet@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <handle_tweet@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [136 x i8] c"--------------------------------------------\0A| ~Welcome to l33t-tw33ts ~ v.0.13.37 |\0A--------------------------------------------\0A\00"
@EXIT_SUCCESS = global i32 0
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 i32 @printf(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @handle_tweet()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [135 x i8] c"--------------------------------------------\0A| ~Welcome to l33t-tw33ts ~ v.0.13.37 |\0A--------------------------------------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([135 x i8], [135 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @handle_tweet()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Type definitions */
struct _Locale_name_hint {
  int dummy;
};

/* Variables and functions */
char const *_Locale_extract_name(char const *, int *);
char const *_Locale_extract_ctype_name(const char *name,
                                       char *buf __attribute__((__unused__)),
                                       struct _Locale_name_hint *hint
                                       __attribute__((__unused__)),
                                       int *__err_code) {
  return _Locale_extract_name(name, __err_code);
}


x86 assembly (clang, -O0):
<_Locale_extract_ctype_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <_Locale_extract_name@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_extract_ctype_name>:
mov    %rcx,%rsi
jmp    1030 <_Locale_extract_name@plt>

LLVM IR (-O0):
%struct._Locale_name_hint = type { i32 }
define i8* @_Locale_extract_ctype_name(i8* %0, i8* %1, %struct._Locale_name_hint* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct._Locale_name_hint*
%8 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store %struct._Locale_name_hint* %2, %struct._Locale_name_hint** %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %8
%11 = call i8* @_Locale_extract_name(i8* %9, i32* %10)
ret i8* %11
}

LLVM IR (-O2):
%struct._Locale_name_hint = type { i32 }
define i8* @_Locale_extract_ctype_name(i8* %0, i8* nocapture readnone %1, %struct._Locale_name_hint* nocapture readnone %2, i32* %3) {
%5 = tail call i8* @_Locale_extract_name(i8* %0, i32* %3)
ret i8* %5
}