xunge/DecIR huggingface dataset:
/* Variables and functions */
int O_NOCTTY;
int O_RDWR;
int open(char *, int);
int open_serial(char *dev) {
  int fd;
  fd = open(dev, O_RDWR | O_NOCTTY);
  if (fd == -1)
    return -1;
  return fd;
}


x86 assembly (clang, -O0):
<open_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ea8(%rip),%rax
or     (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1150 <open_serial+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <open_serial+0x46>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_serial>:
mov    0x2ed1(%rip),%rax
mov    0x2eba(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
define i32 @open_serial(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDWR
%7 = load i32, i32* @O_NOCTTY
%8 = or i32 %6, %7
%9 = call i32 @open(i8* %5, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %12
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
define i32 @open_serial(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_NOCTTY
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4)
ret i32 %5
}
/* Variables and functions */
int RAND_MAX;
int /*<<< orphan*/ printf(char *, ...);
void printOverview(void) {
  printf("seed random number generator with: srand(time(NULL));\n");
  printf("generate random number [0,%d] with: rand()\n", RAND_MAX);
}


x86 assembly (clang, -O0):
<printOverview>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printOverview>:
push   %rax
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"seed random number generator with: srand(time(NULL));\0A\00"
@.str.1 = [44 x i8] c"generate random number [0,%d] with: rand()\0A\00"
@RAND_MAX = global i32 0
define void @printOverview() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @RAND_MAX
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"generate random number [0,%d] with: rand()\0A\00"
@RAND_MAX = global i32 0
@str = [54 x i8] c"seed random number generator with: srand(time(NULL));\00"
define void @printOverview() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @RAND_MAX
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
const char *fp_get_type() { return "_Z_SSL_TLS"; }


x86 assembly (clang, -O0):
<fp_get_type>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_get_type>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"_Z_SSL_TLS\00"
define i8* @fp_get_type() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"_Z_SSL_TLS\00"
define i8* @fp_get_type() {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
int test_oneandl(unsigned long e) { return __builtin_popcountl(1 & e); }


x86 assembly (clang, -O0):
<test_oneandl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x1,%rcx
mov    %rcx,%rax
shr    %rax
movabs $0x5555555555555555,%rdx
55 55 55
and    %rdx,%rax
sub    %rax,%rcx
movabs $0x3333333333333333,%rdx
33 33 33
mov    %rcx,%rax
and    %rdx,%rax
shr    $0x2,%rcx
and    %rdx,%rcx
add    %rcx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rcx,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rcx,%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_oneandl>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_oneandl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 1, %3
%5 = call i64 @llvm.ctpop.i64(i64 %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_oneandl(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
ret i32 %3
}
void rozgrzewka(int n, int k, int *q, int *r) {
  *q = n / k;
  *r = n - k * (*q);
}


x86 assembly (clang, -O0):
<rozgrzewka>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rdx
imul   (%rdx),%eax
sub    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rozgrzewka>:
mov    %rdx,%r8
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,(%r8)
mov    %edx,(%rcx)
ret

LLVM IR (-O0):
define void @rozgrzewka(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = sdiv i32 %9, %10
%12 = load i32*, i32** %7
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = mul nsw i32 %14, %16
%18 = sub nsw i32 %13, %17
%19 = load i32*, i32** %8
store i32 %18, i32* %19
ret void
}

LLVM IR (-O2):
define void @rozgrzewka(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = sdiv i32 %0, %1
store i32 %5, i32* %2
%6 = mul nsw i32 %5, %1
%7 = srem i32 %0, %1
store i32 %7, i32* %3
ret void
}
/* Variables and functions */
size_t strnlen(const char *s, size_t count) {
  const char *sc;
  for (sc = s; *sc != '\0' && count--; ++sc)
    ;
  return sc - s;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1142 <strnlen+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1152 <strnlen+0x52>
jmp    1168 <strnlen+0x68>
jmp    1157 <strnlen+0x57>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strnlen+0x14>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
cmpb   $0x0,(%rdi)
mov    %rdi,%rax
je     1135 <strnlen+0x35>
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <strnlen+0x35>
add    $0xffffffffffffffff,%rsi
mov    %rdi,%rax
nopw   0x0(%rax,%rax,1)
sub    $0x1,%rsi
setb   %cl
cmpb   $0x0,0x1(%rax)
lea    0x1(%rax),%rax
je     1135 <strnlen+0x35>
test   %cl,%cl
je     1120 <strnlen+0x20>
sub    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %19, %2
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = load i64, i64* %4
%14 = add i64 %13, -1
store i64 %14, i64* %4
%15 = icmp ne i64 %13, 0
br label %16
16: ; preds = %12, %7
%17 = phi i1 [ false, %7 ], [ %15, %12 ]
br i1 %17, label %18, label %22
18: ; preds = %16
br label %19
19: ; preds = %18
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %5
br label %7
22: ; preds = %16
%23 = load i8*, i8** %5
%24 = load i8*, i8** %3
%25 = ptrtoint i8* %23 to i64
%26 = ptrtoint i8* %24 to i64
%27 = sub i64 %25, %26
ret i64 %27
}

LLVM IR (-O2):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
%5 = icmp eq i64 %1, 0
%6 = or i1 %4, %5
br i1 %6, label %16, label %7
7: ; preds = %2, %7
%8 = phi i8* [ %11, %7 ], [ %0, %2 ]
%9 = phi i64 [ %10, %7 ], [ %1, %2 ]
%10 = add i64 %9, -1
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
%14 = icmp eq i64 %10, 0
%15 = select i1 %13, i1 true, i1 %14
br i1 %15, label %16, label %7
16: ; preds = %7, %2
%17 = phi i8* [ %0, %2 ], [ %11, %7 ]
%18 = ptrtoint i8* %17 to i64
%19 = ptrtoint i8* %0 to i64
%20 = sub i64 %18, %19
ret i64 %20
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int load_u8(const char *icc, int length, int offset) {
  if (offset < 0 || offset > length)
    return 0;
  return *(uint8_t *)(&icc[offset]);
}


x86 assembly (clang, -O0):
<load_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1124 <load_u8+0x24>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1130 <load_u8+0x30>
movl   $0x0,-0x4(%rbp)
jmp    113e <load_u8+0x3e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_u8>:
xor    %eax,%eax
test   %edx,%edx
js     110f <load_u8+0xf>
cmp    %esi,%edx
jg     110f <load_u8+0xf>
mov    %edx,%eax
mov    (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @load_u8(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10, %3
store i32 0, i32* %4
br label %22
15: ; preds = %10
%16 = load i8*, i8** %5
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = bitcast i8* %19 to i32*
%21 = load i32, i32* %20
store i32 %21, i32* %4
br label %22
22: ; preds = %15, %14
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @load_u8(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 0
%5 = icmp sgt i32 %2, %1
%6 = or i1 %4, %5
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = zext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
br label %12
12: ; preds = %3, %7
%13 = phi i32 [ %11, %7 ], [ 0, %3 ]
ret i32 %13
}
void gdk_property_state_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_property_state_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fabs(double);
int foo() {
  int i, j, k;
  double x = 0, y = ((i == j) ? 1 : 0);
  for (i = 0; i < 10; i++)
    ;
  fabs(x - y);
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    115f <foo+0x4f>
jmp    1151 <foo+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1142 <foo+0x32>
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
call   1030 <fabs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xorps  %xmm0,%xmm0
call   1030 <fabs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double 0.000000e+00, double* %4
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
%11 = sitofp i32 %10 to double
store double %11, double* %5
store i32 0, i32* %1
br label %12
12: ; preds = %16, %0
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 10
br i1 %14, label %15, label %19
15: ; preds = %12
br label %16
16: ; preds = %15
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %12
19: ; preds = %12
%20 = load double, double* %4
%21 = load double, double* %5
%22 = fsub double %20, %21
%23 = call i32 @fabs(double %22)
ret i32 0
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 @fabs(double 0.000000e+00)
ret i32 0
}
int test_imm_A4int16_reg(short val) {
  return ((val) & (-0xA4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A4int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff5c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A4int16_reg>:
test   $0xff5c,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A4int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -164
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A4int16_reg(i16 signext %0) {
%2 = and i16 %0, -164
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xae() {
  Assert_real((isbdigit(174) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              875, ("isbdigit should be 0 for 0xae"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0xae>:
push   %rbp
mov    %rsp,%rbp
mov    $0xae,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x36b,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0xae>:
push   %rax
mov    $0xae,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x36b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xae\00"
define void @t_isbdigit_0xae() {
%1 = call i64 @isbdigit(i32 174)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 875, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xae\00"
define void @t_isbdigit_0xae() {
%1 = tail call i64 @isbdigit(i32 174)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 875, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int main(int argc, char **argv) {
  char buf[80];
  FILE *f = fopen(argv[1], "r");
  fgets(buf, sizeof buf, f);
  if (buf[8] == 'P')
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeab(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x68(%rbp),%rdx
mov    $0x50,%esi
call   1040 <fgets@plt>
movsbl -0x58(%rbp),%eax
cmp    $0x50,%eax
jne    1184 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
mov    0x8(%rsi),%rdi
lea    0xec1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rsp,%rdi
mov    $0x50,%esi
mov    %rax,%rdx
call   1040 <fgets@plt>
cmpb   $0x50,0x8(%rsp)
je     1162 <main+0x32>
xor    %eax,%eax
add    $0x58,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [80 x i8]
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %11, i32** %7
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%13 = load i32*, i32** %7
%14 = call i32 @fgets(i8* %12, i32 80, i32* %13)
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 8
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 80
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @fgets(i8* %4, i32 80, i32* %7)
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 80
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cm_accent_generic(int, int, int, char *, char,
                                     int /*<<< orphan*/, char *);
void cm_accent_grave(int arg, int start, int end) {
  cm_accent_generic(arg, start, end, "AEIOUaeiou", '`', 0, "grave");
}


x86 assembly (clang, -O0):
<cm_accent_grave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xecf(%rip),%rcx
mov    $0x60,%r8d
xor    %r9d,%r9d
lea    0xeca(%rip),%rax
mov    %rax,(%rsp)
call   1030 <cm_accent_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cm_accent_grave>:
push   %rax
lea    0xef3(%rip),%rax
mov    %rax,(%rsp)
lea    0xedd(%rip),%rcx
mov    $0x60,%r8d
xor    %r9d,%r9d
call   1030 <cm_accent_generic@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"AEIOUaeiou\00"
@.str.1 = [6 x i8] c"grave\00"
define void @cm_accent_grave(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @cm_accent_generic(i32 %7, i32 %8, i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext 96, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"AEIOUaeiou\00"
@.str.1 = [6 x i8] c"grave\00"
define void @cm_accent_grave(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @cm_accent_generic(i32 %0, i32 %1, i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext 96, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int QualityToLimitBits(int quality) { return 5 - quality / 20; }


x86 assembly (clang, -O0):
<QualityToLimitBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x5,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QualityToLimitBits>:
movslq %edi,%rax
imul   $0xffffffff99999999,%rax,%rax
mov    %rax,%rcx
sar    $0x23,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @QualityToLimitBits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 20
%5 = sub nsw i32 5, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @QualityToLimitBits(i32 %0) {
%2 = sdiv i32 %0, -20
%3 = add nsw i32 %2, 5
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_barabasi_albert();
int /*<<< orphan*/ test_erdos_renyi();
int /*<<< orphan*/ test_ravasz_barabasi();
int /*<<< orphan*/ test_watts_strogatz();
int main() {
  test_erdos_renyi();
  test_barabasi_albert();
  test_watts_strogatz();
  test_ravasz_barabasi();
  printf("success\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_erdos_renyi@plt>
mov    $0x0,%al
call   1030 <test_barabasi_albert@plt>
mov    $0x0,%al
call   1060 <test_watts_strogatz@plt>
mov    $0x0,%al
call   1050 <test_ravasz_barabasi@plt>
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_erdos_renyi@plt>
xor    %eax,%eax
call   1040 <test_barabasi_albert@plt>
xor    %eax,%eax
call   1060 <test_watts_strogatz@plt>
xor    %eax,%eax
call   1050 <test_ravasz_barabasi@plt>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"success\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_erdos_renyi()
%3 = call i32 (...) @test_barabasi_albert()
%4 = call i32 (...) @test_watts_strogatz()
%5 = call i32 (...) @test_ravasz_barabasi()
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"success\00"
define i32 @main() {
%1 = tail call i32 (...) @test_erdos_renyi()
%2 = tail call i32 (...) @test_barabasi_albert()
%3 = tail call i32 (...) @test_watts_strogatz()
%4 = tail call i32 (...) @test_ravasz_barabasi()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned vbit_rndup(unsigned bit, unsigned to) {
  bit += to - 1;
  bit -= (bit % to);
  return (bit);
}


x86 assembly (clang, -O0):
<vbit_rndup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vbit_rndup>:
lea    (%rdi,%rsi,1),%ecx
add    $0xffffffff,%ecx
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
sub    %edx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @vbit_rndup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sub i32 %5, 1
%7 = load i32, i32* %3
%8 = add i32 %7, %6
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = urem i32 %9, %10
%12 = load i32, i32* %3
%13 = sub i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @vbit_rndup(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = urem i32 %4, %1
%6 = sub i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_standard_Laurent_size_limit(int k, int *szl) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(604, &k, szl, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_standard_Laurent_size_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x25c,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_standard_Laurent_size_limit>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x25c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_standard_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 604, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_standard_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 604, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ send(int, int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void cbWriteLong(int fd, uint32_t write_value) {
  write_value = htonl(write_value);
  send(fd, &write_value, sizeof(uint32_t), 0);
}


x86 assembly (clang, -O0):
<cbWriteLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <htonl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbWriteLong>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @cbWriteLong(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @htonl(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @send(i32 %7, i32* %4, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
define void @cbWriteLong(i32 %0, i32 %1) {
%3 = alloca i32
%4 = tail call i32 @htonl(i32 %1)
store i32 %4, i32* %3
%5 = call i32 @send(i32 %0, i32* %3, i32 4, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ signal_pidfile(int, char *);
void uwsgi_opt_pidfile_signal(char *opt, char *pidfile, void *sig) {
  long *signum_fake_ptr = (long *)sig;
  int signum = (long)signum_fake_ptr;
  signal_pidfile(signum, pidfile);
  exit(0);
}


x86 assembly (clang, -O0):
<uwsgi_opt_pidfile_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <signal_pidfile@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<uwsgi_opt_pidfile_signal>:
push   %rax
mov    %rdx,%rdi
call   1030 <signal_pidfile@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @uwsgi_opt_pidfile_signal(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64*
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %7
%11 = load i64*, i64** %7
%12 = ptrtoint i64* %11 to i64
%13 = trunc i64 %12 to i32
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = load i8*, i8** %5
%16 = call i32 @signal_pidfile(i32 %14, i8* %15)
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @uwsgi_opt_pidfile_signal(i8* nocapture readnone %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @signal_pidfile(i32 %5, i8* %1)
%7 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/absynpp.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/absynpp.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/absynpp.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
float evaluatePostfixExp(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  float val;
  char exp[100];
  printf("\nEnter any postfix expression: ");
  gets(exp);
  val = evaluatePostfixExp(exp);
  printf("\nValue of the postfix expression = %.2f", val);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1050 <evaluatePostfixExp@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1050 <evaluatePostfixExp@plt>
cvtss2sd %xmm0,%xmm0
lea    0xebf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"\0AEnter any postfix expression: \00"
@.str.1 = [40 x i8] c"\0AValue of the postfix expression = %.2f\00"
define void @main() {
%1 = alloca float
%2 = alloca [100 x i8]
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call float @evaluatePostfixExp(i8* %6)
store float %7, float* %1
%8 = load float, float* %1
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), double %9)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AEnter any postfix expression: \00"
@.str.1 = [40 x i8] c"\0AValue of the postfix expression = %.2f\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call float @evaluatePostfixExp(i8* %2)
%6 = fpext float %5 to double
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), double %6)
ret void
}
double GetVx(double *sln, int yardage) {
  double size = sln[50001 * 10 + 1];
  if (yardage < size) {
    return sln[10 * yardage + 7];
  } else
    return 0;
}


x86 assembly (clang, -O0):
<GetVx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x3d0958(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    114d <GetVx+0x4d>
mov    -0x10(%rbp),%rax
imul   $0xa,-0x14(%rbp),%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <GetVx+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetVx>:
cvtsi2sd %esi,%xmm1
movsd  0x3d0958(%rdi),%xmm2
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jbe    1122 <GetVx+0x22>
add    %esi,%esi
lea    (%rsi,%rsi,4),%eax
cltq
movsd  0x38(%rdi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @GetVx(double* %0, i32 %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store double* %0, double** %4
store i32 %1, i32* %5
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 500011
%9 = load double, double* %8
store double %9, double* %6
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = load double, double* %6
%13 = fcmp olt double %11, %12
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = load double*, double** %4
%16 = load i32, i32* %5
%17 = mul nsw i32 10, %16
%18 = add nsw i32 %17, 7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %15, i64 %19
%21 = load double, double* %20
store double %21, double* %3
br label %23
22: ; preds = %2
store double 0.000000e+00, double* %3
br label %23
23: ; preds = %22, %14
%24 = load double, double* %3
ret double %24
}

LLVM IR (-O2):
define double @GetVx(double* nocapture %0, i32 %1) {
%3 = getelementptr inbounds double, double* %0, i64 500011
%4 = load double, double* %3
%5 = sitofp i32 %1 to double
%6 = fcmp ogt double %4, %5
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = mul nsw i32 %1, 10
%9 = add nsw i32 %8, 7
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
br label %13
13: ; preds = %2, %7
%14 = phi double [ %12, %7 ], [ 0.000000e+00, %2 ]
ret double %14
}
/* Type definitions */
typedef int /*<<< orphan*/ integerVariable;
typedef int /*<<< orphan*/ charVariable;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int integerVariable;
  char charVariable;
  size_t size;
  size = sizeof(integerVariable);
  printf("Size of Integer Variable is %zu bytes\n", size);
  printf("Size of char Variable is %zu bytes\n", sizeof(charVariable));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x4,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Size of Integer Variable is %zu bytes\0A\00"
@.str.1 = [36 x i8] c"Size of char Variable is %zu bytes\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i64
store i32 0, i32* %1
store i64 4, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Size of Integer Variable is %zu bytes\0A\00"
@.str.1 = [36 x i8] c"Size of char Variable is %zu bytes\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
scalar_t__ var_get(int, char *, char *, int);
int text_var_get_def(int uid, char *name, char *val, int len, char *def) {
  if (var_get(uid, name, val, len) != 0) {
    strncpy(val, def, len);
    val[len - 1] = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<text_var_get_def>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <var_get@plt>
cmp    $0x0,%rax
je     1178 <text_var_get_def+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<text_var_get_def>:
push   %rbp
push   %r14
push   %rbx
mov    %r8,%r14
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1040 <var_get@plt>
test   %rax,%rax
je     114b <text_var_get_def+0x2b>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @text_var_get_def(i32 %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = call i64 @var_get(i32 %11, i8* %12, i8* %13, i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %27
17: ; preds = %5
%18 = load i8*, i8** %8
%19 = load i8*, i8** %10
%20 = load i32, i32* %9
%21 = call i32 @strncpy(i8* %18, i8* %19, i32 %20)
%22 = load i8*, i8** %8
%23 = load i32, i32* %9
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %22, i64 %25
store i8 0, i8* %26
br label %27
27: ; preds = %17, %5
ret i32 0
}

LLVM IR (-O2):
define i32 @text_var_get_def(i32 %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = tail call i64 @var_get(i32 %0, i8* %1, i8* %2, i32 %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %5
%9 = tail call i32 @strncpy(i8* %2, i8* %4, i32 %3)
%10 = add nsw i32 %3, -1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %2, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %8, %5
ret i32 0
}
int modem_main() { return 0; }


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

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

LLVM IR (-O0):
define i32 @modem_main() {
ret i32 0
}

LLVM IR (-O2):
define i32 @modem_main() {
ret i32 0
}
void init(long long *a1, long long *a2) {
  long long s = -1;
  int i;
  for (i = 0; i < 100000; i++) {
    a1[i] = s;
    a2[i] = i;
    s = -s;
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0x186a0,-0x1c(%rbp)
jge    1160 <init+0x60>
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movslq -0x1c(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
xor    %eax,%eax
sub    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111b <init+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movq   $0xffffffffffffffff,(%rdi,%rax,8)
ff
mov    %rax,(%rsi,%rax,8)
movq   $0x1,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rcx
mov    %rcx,0x8(%rsi,%rax,8)
movq   $0xffffffffffffffff,0x10(%rdi,%rax,8)
ff ff
lea    0x2(%rax),%rcx
mov    %rcx,0x10(%rsi,%rax,8)
movq   $0x1,0x18(%rdi,%rax,8)
lea    0x3(%rax),%rcx
mov    %rcx,0x18(%rsi,%rax,8)
add    $0x4,%rax
cmp    $0x186a0,%rax
jne    1110 <init+0x10>
ret

LLVM IR (-O0):
define void @init(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i32
store i64* %0, i64** %3
store i64* %1, i64** %4
store i64 -1, i64* %5
store i32 0, i32* %6
br label %7
7: ; preds = %24, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 100000
br i1 %9, label %10, label %27
10: ; preds = %7
%11 = load i64, i64* %5
%12 = load i64*, i64** %3
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %12, i64 %14
store i64 %11, i64* %15
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = load i64*, i64** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i64, i64* %18, i64 %20
store i64 %17, i64* %21
%22 = load i64, i64* %5
%23 = sub nsw i64 0, %22
store i64 %23, i64* %5
br label %24
24: ; preds = %10
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %7
27: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @init(i64* nocapture writeonly %0, i64* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %16, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
store i64 -1, i64* %5
%6 = getelementptr inbounds i64, i64* %1, i64 %4
store i64 %4, i64* %6
%7 = or i64 %4, 1
%8 = getelementptr inbounds i64, i64* %0, i64 %7
store i64 1, i64* %8
%9 = getelementptr inbounds i64, i64* %1, i64 %7
store i64 %7, i64* %9
%10 = or i64 %4, 2
%11 = getelementptr inbounds i64, i64* %0, i64 %10
store i64 -1, i64* %11
%12 = getelementptr inbounds i64, i64* %1, i64 %10
store i64 %10, i64* %12
%13 = or i64 %4, 3
%14 = getelementptr inbounds i64, i64* %0, i64 %13
store i64 1, i64* %14
%15 = getelementptr inbounds i64, i64* %1, i64 %13
store i64 %13, i64* %15
%16 = add nuw nsw i64 %4, 4
%17 = icmp eq i64 %16, 100000
br i1 %17, label %18, label %3
18: ; preds = %3
ret void
}
double my_test_d() { return 0.0; }


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

x86 assembly (clang, -O2):
<my_test_d>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @my_test_d() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @my_test_d() {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int check_files() {
  if (access("/etc/brtablet/coef", R_OK) < 0 ||
      access("/etc/brtablet/uvz", R_OK) < 0) {
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<check_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <access@plt>
cmp    $0x0,%rax
jl     1156 <check_files+0x46>
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <access@plt>
cmp    $0x0,%rax
jge    1162 <check_files+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <check_files+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_files>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <access@plt>
test   %rax,%rax
js     113f <check_files+0x2f>
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <access@plt>
sar    $0x3f,%rax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/etc/brtablet/coef\00"
@R_OK = global i32 0
@.str.1 = [18 x i8] c"/etc/brtablet/uvz\00"
define i32 @check_files() {
%1 = alloca i32
%2 = load i32, i32* @R_OK
%3 = call i64 @access(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = load i32, i32* @R_OK
%7 = call i64 @access(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5, %0
store i32 -1, i32* %1
br label %11
10: ; preds = %5
store i32 0, i32* %1
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"/etc/brtablet/coef\00"
@R_OK = global i32 0
@.str.1 = [18 x i8] c"/etc/brtablet/uvz\00"
define i32 @check_files() {
%1 = load i32, i32* @R_OK
%2 = tail call i64 @access(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp slt i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = load i32, i32* @R_OK
%6 = tail call i64 @access(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = ashr i64 %6, 63
%8 = trunc i64 %7 to i32
br label %9
9: ; preds = %4, %0
%10 = phi i32 [ -1, %0 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ uart_put(int);
void putc(int c) { uart_put(c); }


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <uart_put@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <uart_put@plt>

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @uart_put(i32 %3)
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i32 @uart_put(i32 %0)
ret void
}