xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int ano = 0, idade = 0;
  printf("Digite o ano que nasceu ");
  scanf("%d", &ano);
  idade = 2016 - ano;
  printf("Voce tem %d anos de idade.", idade);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x7e0,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0x7e0,%esi
sub    0x4(%rsp),%esi
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Digite o ano que nasceu \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Voce tem %d anos de idade.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sub nsw i32 2016, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Digite o ano que nasceu \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Voce tem %d anos de idade.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sub nsw i32 2016, %5
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int _strlen(char *a) {
  int i;
  for (i = 0; a[i] != 0; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <_strlen+0x37>
jmp    1129 <_strlen+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <_strlen+0x10>
ret

LLVM IR (-O0):
define i32 @_strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%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 = %4
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
char *toUppercase(char *);
void showWelcomeMessage(char **name) {
  *name = malloc(sizeof(char) * 30);
  puts("Type your alias:");
  gets(*name);
  *name = toUppercase(*name);
  printf("Welcome, %s, to CapitalTrivia.\n", *name);
}


x86 assembly (clang, -O0):
<showWelcomeMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1e,%edi
call   1060 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1050 <gets@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1070 <toUppercase@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showWelcomeMessage>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1e,%edi
call   1060 <malloc@plt>
mov    %rax,(%rbx)
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdi
call   1050 <gets@plt>
mov    (%rbx),%rdi
call   1070 <toUppercase@plt>
mov    %rax,(%rbx)
lea    0xe8a(%rip),%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Type your alias:\00"
@.str.1 = [32 x i8] c"Welcome, %s, to CapitalTrivia.\0A\00"
define void @showWelcomeMessage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i8* @malloc(i32 30)
%4 = load i8**, i8*** %2
store i8* %3, i8** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = call i32 @gets(i8* %7)
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = call i8* @toUppercase(i8* %10)
%12 = load i8**, i8*** %2
store i8* %11, i8** %12
%13 = load i8**, i8*** %2
%14 = load i8*, i8** %13
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Type your alias:\00"
@.str.1 = [32 x i8] c"Welcome, %s, to CapitalTrivia.\0A\00"
define void @showWelcomeMessage(i8** nocapture %0) {
%2 = tail call dereferenceable_or_null(30) i8* @malloc(i32 30)
store i8* %2, i8** %0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %0
%5 = tail call i32 @gets(i8* %4)
%6 = load i8*, i8** %0
%7 = tail call i8* @toUppercase(i8* %6)
store i8* %7, i8** %0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}
/* Variables and functions */
double M_PI;
double tan(double);
int tanh(double);
double tooth(double phase) {
  phase = tan(M_PI * phase);
  return tanh(phase * phase) * 2 - 1;
}


x86 assembly (clang, -O0):
<tooth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2eb4(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <tan@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <tanh@plt>
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tooth>:
push   %rax
mov    0x2ec0(%rip),%rax
mulsd  (%rax),%xmm0
call   1040 <tan@plt>
mulsd  %xmm0,%xmm0
call   1030 <tanh@plt>
add    %eax,%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @tooth(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* @M_PI
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = call double @tan(double %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = call i32 @tanh(double %9)
%11 = mul nsw i32 %10, 2
%12 = sub nsw i32 %11, 1
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @tooth(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = tail call double @tan(double %3)
%5 = fmul double %4, %4
%6 = tail call i32 @tanh(double %5)
%7 = shl nsw i32 %6, 1
%8 = add nsw i32 %7, -1
%9 = sitofp i32 %8 to double
ret double %9
}
/* Type definitions */
struct surface {
  int dummy;
};

/* Variables and functions */
long collect_phn_pgn(struct surface *);
int /*<<< orphan*/ do_polyhedron_bounds(struct surface *);
scalar_t__ error();
int polygonize_polyhedron(struct surface *phn) {
  long n_polygon;
  n_polygon = collect_phn_pgn(phn);
  if (n_polygon <= 0) {
    return (0);
  }
  do_polyhedron_bounds(phn);
  if (error())
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<polygonize_polyhedron>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <collect_phn_pgn@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jg     1160 <polygonize_polyhedron+0x30>
movl   $0x0,-0x4(%rbp)
jmp    118d <polygonize_polyhedron+0x5d>
mov    -0x10(%rbp),%rdi
call   1050 <do_polyhedron_bounds@plt>
mov    $0x0,%al
call   1040 <error@plt>
cmp    $0x0,%rax
je     1186 <polygonize_polyhedron+0x56>
movl   $0x0,-0x4(%rbp)
jmp    118d <polygonize_polyhedron+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polygonize_polyhedron>:
push   %rbx
mov    %rdi,%rbx
call   1030 <collect_phn_pgn@plt>
test   %rax,%rax
jle    115a <polygonize_polyhedron+0x2a>
mov    %rbx,%rdi
call   1050 <do_polyhedron_bounds@plt>
xor    %eax,%eax
call   1040 <error@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.surface = type { i32 }
define i32 @polygonize_polyhedron(%struct.surface* %0) {
%2 = alloca i32
%3 = alloca %struct.surface*
%4 = alloca i64
store %struct.surface* %0, %struct.surface** %3
%5 = load %struct.surface*, %struct.surface** %3
%6 = call i64 @collect_phn_pgn(%struct.surface* %5)
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp sle i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %17
10: ; preds = %1
%11 = load %struct.surface*, %struct.surface** %3
%12 = call i32 @do_polyhedron_bounds(%struct.surface* %11)
%13 = call i64 (...) @error()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %2
br label %17
16: ; preds = %10
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.surface = type { i32 }
define i32 @polygonize_polyhedron(%struct.surface* %0) {
%2 = tail call i64 @collect_phn_pgn(%struct.surface* %0)
%3 = icmp slt i64 %2, 1
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @do_polyhedron_bounds(%struct.surface* %0)
%6 = tail call i64 (...) @error()
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}
float sign(float n) {
  if (n > 0)
    return +1;
  if (n < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112c <sign+0x2c>
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1153 <sign+0x53>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    114b <sign+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1153 <sign+0x53>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorps  %xmm1,%xmm1
movaps %xmm0,%xmm2
cmpltss %xmm1,%xmm2
movss  0xeed(%rip),%xmm3
andps  %xmm2,%xmm3
cmpltss %xmm0,%xmm1
movss  0xee1(%rip),%xmm0
andps  %xmm1,%xmm0
andnps %xmm3,%xmm1
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sign(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 1.000000e+00, float* %2
br label %12
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp olt float %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store float -1.000000e+00, float* %2
br label %12
11: ; preds = %7
store float 0.000000e+00, float* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load float, float* %2
ret float %13
}

LLVM IR (-O2):
define float @sign(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fcmp olt float %0, 0.000000e+00
%4 = select i1 %3, float -1.000000e+00, float 0.000000e+00
%5 = select i1 %2, float 1.000000e+00, float %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *, int *);
int /*<<< orphan*/ foo2(int);
int main(int argc) {
  int a, b, c;
  b = argc + 1;
  c = argc + 2;
  a = b + c;
  if (argc) {
    foo(&b, &c);
    a = b + c;
  }
  foo2(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116d <main+0x4d>
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <foo@plt>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <foo2@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x1(%rdi),%eax
mov    %eax,0x4(%rsp)
lea    0x2(%rdi),%eax
mov    %eax,(%rsp)
test   %edi,%edi
je     1148 <main+0x28>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <foo@plt>
mov    (%rsp),%edi
add    0x4(%rsp),%edi
jmp    114d <main+0x2d>
add    %edi,%edi
add    $0x3,%edi
call   1030 <foo2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = add nsw i32 %0, 1
store i32 %6, i32* %2
%7 = add nsw i32 %0, 2
store i32 %7, i32* %3
%8 = add nsw i32 %6, %7
%9 = icmp eq i32 %0, 0
br i1 %9, label %15, label %10
10: ; preds = %1
%11 = call i32 @foo(i32* %2, i32* %3)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
br label %15
15: ; preds = %10, %1
%16 = phi i32 [ %14, %10 ], [ %8, %1 ]
%17 = call i32 @foo2(i32 %16)
ret i32 0
}
void PBISTRinfoUSelect(unsigned long ulRINFOU) {
  (*((volatile unsigned long *)(0x400FB000 + 0x000001CC))) = ulRINFOU;
}


x86 assembly (clang, -O0):
<PBISTRinfoUSelect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400fb1cc,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PBISTRinfoUSelect>:
mov    %rdi,0x400fb1cc
40
ret

LLVM IR (-O0):
define void @PBISTRinfoUSelect(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074770380 to i64*)
ret void
}

LLVM IR (-O2):
define void @PBISTRinfoUSelect(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074770380 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr,
      "usage: checknr [-a.xx.yy.xx.yy...] [-c.xx.xx.xx...] [-s] [-f] file\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [68 x i8] c"usage: checknr [-a.xx.yy.xx.yy...] [-c.xx.xx.xx...] [-s] [-f] file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [68 x i8] c"usage: checknr [-a.xx.yy.xx.yy...] [-c.xx.xx.xx...] [-s] [-f] file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
double MPStoKPH(double MPS) {
  double KPH = 3.6 * MPS;
  return KPH;
}


x86 assembly (clang, -O0):
<MPStoKPH>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPStoKPH>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @MPStoKPH(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 3.600000e+00, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @MPStoKPH(double %0) {
%2 = fmul double %0, 3.600000e+00
ret double %2
}
void test17() {
  int *x;
  *x = 1;
  *x = 1;
}


x86 assembly (clang, -O0):
<test17>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @test17() {
%1 = alloca i32*
%2 = load i32*, i32** %1
store i32 1, i32* %2
%3 = load i32*, i32** %1
store i32 1, i32* %3
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void num_to_word_err() {
  fprintf(stderr, "Argument error.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<num_to_word_err>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<num_to_word_err>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Argument error.\0A\00"
define void @num_to_word_err() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Argument error.\0A\00"
define void @num_to_word_err() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int Setup(int width, int height) {
  printf("Error: GLX version 1.3 or 1.4 not available at compile time\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<Setup>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Error: GLX version 1.3 or 1.4 not available at compile time\0A\00"
define i32 @Setup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [60 x i8] c"Error: GLX version 1.3 or 1.4 not available at compile time\00"
define i32 @Setup(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *test19_malloc(size_t n) {
  static int invoke_count = 0;
  switch (++invoke_count) {
  case 1:
    return malloc(n);
  case 2:
    return malloc(n);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<test19_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2f0a(%rip),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    %eax,0x2efe(%rip)
sub    $0x1,%eax
je     114d <test19_malloc+0x3d>
jmp    113c <test19_malloc+0x2c>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     115f <test19_malloc+0x4f>
jmp    1171 <test19_malloc+0x61>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1179 <test19_malloc+0x69>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1179 <test19_malloc+0x69>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test19_malloc>:
mov    0x2f16(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0d(%rip)
cmp    $0x1,%eax
ja     1129 <test19_malloc+0x19>
jmp    1030 <malloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@test19_malloc.invoke_count = internal global i32 0
define i8* @test19_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i32, i32* @test19_malloc.invoke_count
%5 = add nsw i32 %4, 1
store i32 %5, i32* @test19_malloc.invoke_count
switch i32 %5, label %12 [
i32 1, label %6
i32 2, label %9
]
6: ; preds = %1
%7 = load i64, i64* %3
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %2
br label %13
9: ; preds = %1
%10 = load i64, i64* %3
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %2
br label %13
12: ; preds = %1
store i8* null, i8** %2
br label %13
13: ; preds = %12, %9, %6
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@test19_malloc.invoke_count = internal unnamed_addr global i32 0
define noalias i8* @test19_malloc(i64 %0) {
%2 = load i32, i32* @test19_malloc.invoke_count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @test19_malloc.invoke_count
%4 = icmp ult i32 %2, 2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i8* @malloc(i64 %0)
br label %7
7: ; preds = %1, %5
%8 = phi i8* [ null, %1 ], [ %6, %5 ]
ret i8* %8
}
float sqr(float x) { return x * x; }


x86 assembly (clang, -O0):
<sqr>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sqr(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
ret float %5
}

LLVM IR (-O2):
define float @sqr(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Variables and functions */
double acos(double);
double hl_math_acos(double a) { return acos(a); }


x86 assembly (clang, -O0):
<hl_math_acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hl_math_acos>:
jmp    1030 <acos@plt>

LLVM IR (-O0):
define double @hl_math_acos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @acos(double %3)
ret double %4
}

LLVM IR (-O2):
define double @hl_math_acos(double %0) {
%2 = tail call double @acos(double %0)
ret double %2
}
int main() {
  struct foo *x;
  return (struct blah *)x;
}


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

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

LLVM IR (-O0):
%struct.foo = type opaque
%struct.blah = type opaque
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.foo*
store i32 0, i32* %1
%3 = load %struct.foo*, %struct.foo** %2
%4 = bitcast %struct.foo* %3 to %struct.blah*
%5 = ptrtoint %struct.blah* %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
void mangle_qname(char *p) {
  int i;
  p[0] = 32;
  p[1] = (('*' >> 4) & 0x0F) + 'A';
  p[2] = ('*' & 0x0F) + 'A';
  for (i = 3; i < 33; i++)
    p[i] = 'A';
  p[i] = '\0';
}


x86 assembly (clang, -O0):
<mangle_qname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x43,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0x4b,0x2(%rax)
movl   $0x3,-0xc(%rbp)
cmpl   $0x21,-0xc(%rbp)
jge    114a <mangle_qname+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x41,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <mangle_qname+0x26>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mangle_qname>:
movw   $0x4320,(%rdi)
movb   $0x4b,0x2(%rdi)
movaps 0xef0(%rip),%xmm0
movups %xmm0,0x3(%rdi)
movups %xmm0,0x11(%rdi)
movb   $0x0,0x21(%rdi)
ret

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

LLVM IR (-O2):
define void @mangle_qname(i8* nocapture writeonly %0) {
store i8 32, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
store i8 67, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 2
store i8 75, i8* %3
%4 = getelementptr i8, i8* %0, i64 3
%5 = getelementptr inbounds i8, i8* %0, i64 33
store i8 0, i8* %5
ret void
}
void pil_put(void *peripheral_handle) {}


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

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

LLVM IR (-O0):
define void @pil_put(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @pil_put(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *cvt(double, int, int *, int *, char *, int /*<<< orphan*/);
char *fcvtbuf(double arg, int ndigits, int *decpt, int *sign, char *buf) {
  return cvt(arg, ndigits, decpt, sign, buf, 0);
}


x86 assembly (clang, -O0):
<fcvtbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <cvt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcvtbuf>:
xor    %r8d,%r8d
jmp    1030 <cvt@plt>

LLVM IR (-O0):
define i8* @fcvtbuf(double %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = alloca double
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
store double %0, double* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i8* %4, i8** %10
%11 = load double, double* %6
%12 = load i32, i32* %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i8*, i8** %10
%16 = call i8* @cvt(double %11, i32 %12, i32* %13, i32* %14, i8* %15, i32 0)
ret i8* %16
}

LLVM IR (-O2):
define i8* @fcvtbuf(double %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = tail call i8* @cvt(double %0, i32 %1, i32* %2, i32* %3, i8* %4, i32 0)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clearTerminal() { system("clear"); }


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

x86 assembly (clang, -O2):
<clearTerminal>:
lea    0xee9(%rip),%rdi
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @clearTerminal() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clearTerminal() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void RTSocketSgWriteNB(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSocketSgWriteNB() {
ret void
}
int weft(int i, int n) { return (i << n) + (1 << n) - 1; }


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

x86 assembly (clang, -O2):
<weft>:
mov    %esi,%ecx
lea    0x1(%rdi),%eax
shl    %cl,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @weft(i32 %0, i32 %1) {
%3 = add i32 %0, 1
%4 = shl i32 %3, %1
%5 = add nsw i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int ac, char *av[]) {
  (void)ac;
  (void)av;
  printf("Program of the project1\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"Program of the project1\0A\00"
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 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Program of the project1\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned getval_276() { return 46651017U; }


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

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

LLVM IR (-O0):
define i32 @getval_276() {
ret i32 46651017
}

LLVM IR (-O2):
define i32 @getval_276() {
ret i32 46651017
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ memcpy(char *, char const *, size_t);
wchar_t *wmemcpy(wchar_t *d, const wchar_t *s, size_t n) {
  return (wchar_t *)memcpy((char *)d, (const char *)s, n * sizeof(wchar_t));
}


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

x86 assembly (clang, -O2):
<wmemcpy>:
shl    $0x2,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i32* @wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** %5
%10 = bitcast i32* %9 to i8*
%11 = load i64, i64* %6
%12 = mul i64 %11, 4
%13 = call i64 @memcpy(i8* %8, i8* %10, i64 %12)
%14 = inttoptr i64 %13 to i32*
ret i32* %14
}

LLVM IR (-O2):
define i32* @wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = bitcast i32* %0 to i8*
%5 = bitcast i32* %1 to i8*
%6 = shl i64 %2, 2
%7 = tail call i64 @memcpy(i8* %4, i8* %5, i64 %6)
%8 = inttoptr i64 %7 to i32*
ret i32* %8
}
/* Variables and functions */
int /*<<< orphan*/ RegReadA(int, unsigned char *);
int OnsemiI2CCheck(void) {
  unsigned char UcLsiVer;
  RegReadA(0x027E, &UcLsiVer);
  return (UcLsiVer == 0xA1) ? 1 : 0;
}


x86 assembly (clang, -O0):
<OnsemiI2CCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x27e,%edi
lea    -0x1(%rbp),%rsi
call   1030 <RegReadA@plt>
movzbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0xa1,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OnsemiI2CCheck>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x27e,%edi
call   1030 <RegReadA@plt>
xor    %eax,%eax
cmpb   $0xa1,0x7(%rsp)
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @OnsemiI2CCheck() {
%1 = alloca i8
%2 = call i32 @RegReadA(i32 638, i8* %1)
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 161
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @OnsemiI2CCheck() {
%1 = alloca i8
%2 = call i32 @RegReadA(i32 638, i8* %1)
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, -95
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void notify(char *s) {
  printf("%s test appears to be inconsistent...\n", s);
  printf("   PLEASE NOTIFY KARPINKSI!\n");
}


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

x86 assembly (clang, -O2):
<notify>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"%s test appears to be inconsistent...\0A\00"
@.str.1 = [29 x i8] c" PLEASE NOTIFY KARPINKSI!\0A\00"
define void @notify(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"%s test appears to be inconsistent...\0A\00"
@str = [28 x i8] c" PLEASE NOTIFY KARPINKSI!\00"
define void @notify(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
int waitForInterruptPiFace(int pin, int mS) { return 0; }


x86 assembly (clang, -O0):
<waitForInterruptPiFace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @waitForInterruptPiFace(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ _reboot_error(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ sync();
int _reboot(void) {
  sync();
  errno = ENOSYS;
  _reboot_error(NULL, 1);
  return 0;
}


x86 assembly (clang, -O0):
<_reboot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <sync@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <_reboot_error@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_reboot>:
push   %rax
xor    %eax,%eax
call   1040 <sync@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    0x2ea0(%rip),%rcx
mov    %eax,(%rcx)
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <_reboot_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_reboot() {
%1 = call i32 (...) @sync()
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
%3 = call i32 @_reboot_error(i32* null, i32 1)
ret i32 0
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_reboot() {
%1 = tail call i32 (...) @sync()
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
%3 = tail call i32 @_reboot_error(i32* null, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int prc_b3(int a) {
  a = a - 30;
  printf("a-30 [%d]\n", a);
  return a;
}


x86 assembly (clang, -O0):
<prc_b3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1e,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prc_b3>:
push   %rbx
lea    -0x1e(%rdi),%ebx
lea    0xee5(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"a-30 [%d]\0A\00"
define i32 @prc_b3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 30
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [11 x i8] c"a-30 [%d]\0A\00"
define i32 @prc_b3(i32 %0) {
%2 = add nsw i32 %0, -30
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %2
}
void gtk_spin_button_set_digits() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_set_digits() {
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ uint16_t;
struct hle_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alist_clear(struct hle_t *, scalar_t__, scalar_t__);
void CLEARBUFF(struct hle_t *hle, uint32_t w1, uint32_t w2) {
  uint16_t dmem = w1;
  uint16_t count = w2 & 0xfff;
  if (count == 0)
    return;
  alist_clear(hle, dmem, count);
}


x86 assembly (clang, -O0):
<CLEARBUFF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    $0xfff,%eax
cltq
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1148 <CLEARBUFF+0x38>
jmp    1159 <CLEARBUFF+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <alist_clear@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CLEARBUFF>:
and    $0xfff,%edx
je     1122 <CLEARBUFF+0x12>
mov    %edx,%edx
movslq %esi,%rsi
jmp    1030 <alist_clear@plt>
ret

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @CLEARBUFF(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hle_t*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
store %struct.hle_t* %0, %struct.hle_t** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
store i64 %10, i64* %7
%11 = load i32, i32* %6
%12 = and i32 %11, 4095
%13 = sext i32 %12 to i64
store i64 %13, i64* %8
%14 = load i64, i64* %8
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %3
br label %22
17: ; preds = %3
%18 = load %struct.hle_t*, %struct.hle_t** %4
%19 = load i64, i64* %7
%20 = load i64, i64* %8
%21 = call i32 @alist_clear(%struct.hle_t* %18, i64 %19, i64 %20)
br label %22
22: ; preds = %17, %16
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @CLEARBUFF(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = and i32 %2, 4095
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = zext i32 %4 to i64
%8 = sext i32 %1 to i64
%9 = tail call i32 @alist_clear(%struct.hle_t* %0, i64 %8, i64 %7)
br label %10
10: ; preds = %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void _sys_irq_all_enable(void) {
  outb(0x21, 0x0);
  outb(0xA1, 0x0);
}


x86 assembly (clang, -O0):
<_sys_irq_all_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sys_irq_all_enable>:
push   %rax
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @_sys_irq_all_enable() {
%1 = call i32 @outb(i32 33, i32 0)
%2 = call i32 @outb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @_sys_irq_all_enable() {
%1 = tail call i32 @outb(i32 33, i32 0)
%2 = tail call i32 @outb(i32 161, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long long fwrite(char *, size_t, size_t, int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) long long
softboundcets_fwrite(char *ptr, size_t size, size_t nmemb, FILE *stream) {
  return fwrite(ptr, size, nmemb, stream);
}


x86 assembly (clang, -O0):
<softboundcets_fwrite>:
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    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_fwrite>:
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
define weak i64 @softboundcets_fwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fwrite(i8* %9, i64 %10, i64 %11, i32* %12)
ret i64 %13
}

LLVM IR (-O2):
define weak i64 @softboundcets_fwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
void d_putsb(register unsigned char *ptr, register signed char data) {
  *ptr = data;
}


x86 assembly (clang, -O0):
<d_putsb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_putsb>:
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @d_putsb(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
store i8 %5, i8* %6
ret void
}

LLVM IR (-O2):
define void @d_putsb(i8* nocapture writeonly %0, i8 signext %1) {
store i8 %1, i8* %0
ret void
}
unsigned char *sha1digest(bitstr, bitcnt)
unsigned char *bitstr;
unsigned long bitcnt;
{ return ((unsigned char *)shacomp(1, 1, bitstr, bitcnt)); }


x86 assembly (clang, -O0):
<sha1digest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1030 <shacomp@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha1digest>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <shacomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @sha1digest(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 1, i32 1, i8* %5, i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @sha1digest(i8* %0, i64 %1) {
%3 = tail call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 1, i32 1, i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int get_tag(char const *, int);
int keyset_keyid(const char *key, int create) {
  assert(key);
  return get_tag(key, create);
}


x86 assembly (clang, -O0):
<keyset_keyid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <get_tag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyset_keyid>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <get_tag@plt>

LLVM IR (-O0):
define i32 @keyset_keyid(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @get_tag(i8* %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @keyset_keyid(i8* %0, i32 %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i32 @get_tag(i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ vt100_EscSeq(int, unsigned char *, long long);
void vt100_CHA(int n) { vt100_EscSeq(n, (unsigned char *)"G", (long long)2); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x2,%edx
call   1030 <vt100_EscSeq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rsi
mov    $0x2,%edx
jmp    1030 <vt100_EscSeq@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"G\00"
define void @vt100_CHA(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @vt100_EscSeq(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 2)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"G\00"
define void @vt100_CHA(i32 %0) {
%2 = tail call i32 @vt100_EscSeq(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 2)
ret void
}
int divide(int x, int y) { return x / y; }


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @divide(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @divide(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}