xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void imprimir(char **word, int size) {
  int i;
  for (i = 0; i < size; i++)
    printf("%s\n", word[i]);
}


x86 assembly (clang, -O0):
<imprimir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <imprimir+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <imprimir+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <imprimir+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <imprimir+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @imprimir(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8**, i8*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @imprimir(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void AddVector(float v1x, float v1y, float v1z, float v2x, float v2y, float v2z,
               float *rx, float *ry, float *rz) {
  *rx = v2x + v1x;
  *ry = v2y + v1y;
  *rz = v2z + v1z;
}


x86 assembly (clang, -O0):
<AddVector>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x18(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddVector>:
addss  %xmm3,%xmm0
movss  %xmm0,(%rdi)
addss  %xmm4,%xmm1
movss  %xmm1,(%rsi)
addss  %xmm5,%xmm2
movss  %xmm2,(%rdx)
ret

LLVM IR (-O0):
define void @AddVector(float %0, float %1, float %2, float %3, float %4, float %5, float* %6, float* %7, float* %8) {
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float*
%17 = alloca float*
%18 = alloca float*
store float %0, float* %10
store float %1, float* %11
store float %2, float* %12
store float %3, float* %13
store float %4, float* %14
store float %5, float* %15
store float* %6, float** %16
store float* %7, float** %17
store float* %8, float** %18
%19 = load float, float* %13
%20 = load float, float* %10
%21 = fadd float %19, %20
%22 = load float*, float** %16
store float %21, float* %22
%23 = load float, float* %14
%24 = load float, float* %11
%25 = fadd float %23, %24
%26 = load float*, float** %17
store float %25, float* %26
%27 = load float, float* %15
%28 = load float, float* %12
%29 = fadd float %27, %28
%30 = load float*, float** %18
store float %29, float* %30
ret void
}

LLVM IR (-O2):
define void @AddVector(float %0, float %1, float %2, float %3, float %4, float %5, float* nocapture writeonly %6, float* nocapture writeonly %7, float* nocapture writeonly %8) {
%10 = fadd float %0, %3
store float %10, float* %6
%11 = fadd float %1, %4
store float %11, float* %7
%12 = fadd float %2, %5
store float %12, float* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ z;

/* Variables and functions */
int /*<<< orphan*/ strncat(char *, char *, int);
void size_1() {
  char z[1];
  char str[] = "hi";
  strncat(z, str, sizeof(z));
}


x86 assembly (clang, -O0):
<size_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xed9(%rip),%al
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x1,%edx
call   1030 <strncat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_1>:
push   %rax
movb   $0x0,0x6(%rsp)
movw   $0x6968,0x4(%rsp)
lea    0x7(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <strncat@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.size_1.str = [3 x i8] c"hi\00"
define void @size_1() {
%1 = alloca [1 x i8]
%2 = alloca [3 x i8]
%3 = bitcast [3 x i8]* %2 to i8*
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%6 = call i32 @strncat(i8* %4, i8* %5, i32 1)
ret void
}

LLVM IR (-O2):
@__const.size_1.str = [3 x i8] c"hi\00"
define void @size_1() {
%1 = alloca [1 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @strncat(i8* %3, i8* %4, i32 1)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int node_compare(const void *d1, const void *d2) {
  const char *s1 = (const char *)d1;
  const char *s2 = (const char *)d2;
  return strcmp(s1, s2);
}


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

x86 assembly (clang, -O2):
<node_compare>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @node_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ TxTimedString(char *, char);
int /*<<< orphan*/ dtostrf(float, int, int, char *);
void TxTimedFloat(float f, char txDelay) {
  char str[20];
  dtostrf(f, 6, 2, str);
  TxTimedString(str, txDelay);
}


x86 assembly (clang, -O0):
<TxTimedFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
movss  %xmm0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x20(%rbp),%rdx
mov    $0x6,%edi
mov    $0x2,%esi
call   1040 <dtostrf@plt>
lea    -0x20(%rbp),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <TxTimedString@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TxTimedFloat>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
mov    %rsp,%r14
mov    $0x6,%edi
mov    $0x2,%esi
mov    %r14,%rdx
call   1040 <dtostrf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <TxTimedString@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @TxTimedFloat(float %0, i8 signext %1) {
%3 = alloca float
%4 = alloca i8
%5 = alloca [20 x i8]
store float %0, float* %3
store i8 %1, i8* %4
%6 = load float, float* %3
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%8 = call i32 @dtostrf(float %6, i32 6, i32 2, i8* %7)
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%10 = load i8, i8* %4
%11 = call i32 @TxTimedString(i8* %9, i8 signext %10)
ret void
}

LLVM IR (-O2):
define void @TxTimedFloat(float %0, i8 signext %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = call i32 @dtostrf(float %0, i32 6, i32 2, i8* %4)
%6 = call i32 @TxTimedString(i8* %4, i8 signext %1)
ret void
}
/* Variables and functions */
unsigned int factorial(unsigned int const);
unsigned int n_permutations(unsigned int const n) { return (factorial(n)); }


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

x86 assembly (clang, -O2):
<n_permutations>:
jmp    1030 <factorial@plt>

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

LLVM IR (-O2):
define i32 @n_permutations(i32 %0) {
%2 = tail call i32 @factorial(i32 %0)
ret i32 %2
}
int globalvar_add_simple_int(const char *name, int *value, const char *format) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @globalvar_add_simple_int(i8* %0, i32* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @globalvar_add_simple_int(i8* nocapture readnone %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glutWireSphere(double, int, int);
void drawSphere(void) {
  glColor3f(0.0, 0.0, 0.0);
  glutWireSphere(5.5, 30, 30);
}


x86 assembly (clang, -O0):
<drawSphere>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glColor3f@plt>
movsd  0xec6(%rip),%xmm0
mov    $0x1e,%esi
mov    %esi,%edi
call   1040 <glutWireSphere@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawSphere>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glColor3f@plt>
movsd  0xec9(%rip),%xmm0
mov    $0x1e,%edi
mov    $0x1e,%esi
pop    %rax
jmp    1040 <glutWireSphere@plt>

LLVM IR (-O0):
define void @drawSphere() {
%1 = call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = call i32 @glutWireSphere(double 5.500000e+00, i32 30, i32 30)
ret void
}

LLVM IR (-O2):
define void @drawSphere() {
%1 = tail call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = tail call i32 @glutWireSphere(double 5.500000e+00, i32 30, i32 30)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void _plugin_free(int *pi) {
  if (pi)
    free(pi);
}


x86 assembly (clang, -O0):
<_plugin_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <_plugin_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_plugin_free>:
test   %rdi,%rdi
je     111a <_plugin_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @_plugin_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = call i32 @free(i32* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @_plugin_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
const char *get_type_name_title_screen(struct castable *castable) {
  return "title_screen";
}


x86 assembly (clang, -O0):
<get_type_name_title_screen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.castable = type opaque
@.str = [13 x i8] c"title_screen\00"
define i8* @get_type_name_title_screen(%struct.castable* %0) {
%2 = alloca %struct.castable*
store %struct.castable* %0, %struct.castable** %2
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.castable = type opaque
@.str = [13 x i8] c"title_screen\00"
define i8* @get_type_name_title_screen(%struct.castable* nocapture readnone %0) {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
void SensorGetET_SANYO(unsigned char *RegBuf) {}


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

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

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

LLVM IR (-O2):
define void @SensorGetET_SANYO(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_handler(int sig) { exit(0); }


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ draw(char);
void drawEmpty() { draw(' '); }


x86 assembly (clang, -O0):
<drawEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1030 <draw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawEmpty>:
mov    $0x20,%edi
jmp    1030 <draw@plt>

LLVM IR (-O0):
define void @drawEmpty() {
%1 = call i32 @draw(i8 signext 32)
ret void
}

LLVM IR (-O2):
define void @drawEmpty() {
%1 = tail call i32 @draw(i8 signext 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void die(char *msg) {
  perror(msg);
  exit(0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char lower(int);
int /*<<< orphan*/ putchar(char);
main() {
  int l;
  for (l = 'A'; l <= 'Z'; l++) {
    putchar(l);
    putchar(lower(l));
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x41,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jg     1169 <main+0x49>
mov    -0x8(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%edi
call   1040 <lower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x41,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl %bl,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1040 <lower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x5b,%ebx
jne    1130 <main+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 65, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 90
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = trunc i32 %7 to i8
%9 = call i32 @putchar(i8 signext %8)
%10 = load i32, i32* %2
%11 = call signext i8 @lower(i32 %10)
%12 = call i32 @putchar(i8 signext %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
%17 = call i32 @putchar(i8 signext 10)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 65, %0 ], [ %7, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @putchar(i8 signext %3)
%5 = tail call signext i8 @lower(i32 %2)
%6 = tail call i32 @putchar(i8 signext %5)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 91
br i1 %8, label %9, label %1
9: ; preds = %1
%10 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}
/* Variables and functions */
int color(char const *, int);
int fg_color(const char *col) { return color(col, 30); }


x86 assembly (clang, -O0):
<fg_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1e,%esi
call   1030 <color@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fg_color>:
mov    $0x1e,%esi
jmp    1030 <color@plt>

LLVM IR (-O0):
define i32 @fg_color(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @color(i8* %3, i32 30)
ret i32 %4
}

LLVM IR (-O2):
define i32 @fg_color(i8* %0) {
%2 = tail call i32 @color(i8* %0, i32 30)
ret i32 %2
}
/* Variables and functions */
int jimi_getch_term(int /*<<< orphan*/);
int jimi_getch(void) { return jimi_getch_term(0); }


x86 assembly (clang, -O0):
<jimi_getch>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <jimi_getch_term@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jimi_getch>:
xor    %edi,%edi
jmp    1030 <jimi_getch_term@plt>

LLVM IR (-O0):
define i32 @jimi_getch() {
%1 = call i32 @jimi_getch_term(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @jimi_getch() {
%1 = tail call i32 @jimi_getch_term(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ USBSTK5505_I2C_close();
int /*<<< orphan*/ USBSTK5505_I2C_init();
short USBSTK5505_I2C_reset() {
  USBSTK5505_I2C_close();
  USBSTK5505_I2C_init();
  return 0;
}


x86 assembly (clang, -O0):
<USBSTK5505_I2C_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <USBSTK5505_I2C_close@plt>
mov    $0x0,%al
call   1030 <USBSTK5505_I2C_init@plt>
xor    %eax,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBSTK5505_I2C_reset>:
push   %rax
xor    %eax,%eax
call   1040 <USBSTK5505_I2C_close@plt>
xor    %eax,%eax
call   1030 <USBSTK5505_I2C_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @USBSTK5505_I2C_reset() {
%1 = call i32 (...) @USBSTK5505_I2C_close()
%2 = call i32 (...) @USBSTK5505_I2C_init()
ret i16 0
}

LLVM IR (-O2):
define signext i16 @USBSTK5505_I2C_reset() {
%1 = tail call i32 (...) @USBSTK5505_I2C_close()
%2 = tail call i32 (...) @USBSTK5505_I2C_init()
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ ili9325_WriteReg(int, int);
void ili9325_DisplayOff(void) {
  ili9325_WriteReg(0x10, 0x0000);
  ili9325_WriteReg(0x11, 0x0000);
  ili9325_WriteReg(0x12, 0x0000);
  ili9325_WriteReg(0x13, 0x0000);
  ili9325_WriteReg(0x29, 0x0000);
  ili9325_WriteReg(0x07, 0x0);
}


x86 assembly (clang, -O0):
<ili9325_DisplayOff>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x11,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x13,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x29,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x7,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ili9325_DisplayOff>:
push   %rax
mov    $0x10,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x11,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x13,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x29,%edi
xor    %esi,%esi
call   1030 <ili9325_WriteReg@plt>
mov    $0x7,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <ili9325_WriteReg@plt>

LLVM IR (-O0):
define void @ili9325_DisplayOff() {
%1 = call i32 @ili9325_WriteReg(i32 16, i32 0)
%2 = call i32 @ili9325_WriteReg(i32 17, i32 0)
%3 = call i32 @ili9325_WriteReg(i32 18, i32 0)
%4 = call i32 @ili9325_WriteReg(i32 19, i32 0)
%5 = call i32 @ili9325_WriteReg(i32 41, i32 0)
%6 = call i32 @ili9325_WriteReg(i32 7, i32 0)
ret void
}

LLVM IR (-O2):
define void @ili9325_DisplayOff() {
%1 = tail call i32 @ili9325_WriteReg(i32 16, i32 0)
%2 = tail call i32 @ili9325_WriteReg(i32 17, i32 0)
%3 = tail call i32 @ili9325_WriteReg(i32 18, i32 0)
%4 = tail call i32 @ili9325_WriteReg(i32 19, i32 0)
%5 = tail call i32 @ili9325_WriteReg(i32 41, i32 0)
%6 = tail call i32 @ili9325_WriteReg(i32 7, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iterate_programs();
int main(int argc, char **argv) {
  iterate_programs();
  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)
mov    $0x0,%al
call   1030 <iterate_programs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <iterate_programs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @iterate_programs()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @iterate_programs()
ret i32 0
}
void INT_Excep_ICU_IRQ15(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_IRQ15() {
ret void
}
/* Variables and functions */
scalar_t__ isdigit(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = '\0';
  if (isdigit(i))
    printf("%d *is* a digit\n", i);
  else
    printf("%d is *not* a digit\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     115c <main+0x3c>
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
jmp    116b <main+0x4b>
mov    -0x8(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
lea    0xedf(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%d *is* a digit\0A\00"
@.str.1 = [21 x i8] c"%d is *not* a digit\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"%d *is* a digit\0A\00"
@.str.1 = [21 x i8] c"%d is *not* a digit\0A\00"
define i32 @main() {
%1 = tail call i64 @isdigit(i32 0)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_add_result(int x, int y) {
  int add_result;
  add_result = x + y;
  printf("print_add_result's add_result = %d\n", add_result);
}


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

x86 assembly (clang, -O2):
<print_add_result>:
add    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"print_add_result's add_result = %d\0A\00"
define void @print_add_result(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"print_add_result's add_result = %d\0A\00"
define void @print_add_result(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
txt_arbitrary(leng, mess) char *mess;
{
  prtime();
  printf("Arbitrary bytes, leng=%d\n", leng);
}


x86 assembly (clang, -O0):
<txt_arbitrary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_arbitrary>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Arbitrary bytes, leng=%d\0A\00"
define i32 @txt_arbitrary(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = call i32 (...) @prtime()
%7 = load i32, i32* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [26 x i8] c"Arbitrary bytes, leng=%d\0A\00"
define i32 @txt_arbitrary(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @prtime()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
void PrintFactPNGetVar1(void *theEnv, const char *logicalName, void *theValue) {

}


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

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

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

LLVM IR (-O2):
define void @PrintFactPNGetVar1(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void lag_adjust(double *time, double net_lag) {
  double nolag_time = *time;
  *time -= net_lag;
  if (*time < (2.0 / 2) && nolag_time > (2.0 / 2))
    *time = (2.0 / 2);
}


x86 assembly (clang, -O0):
<lag_adjust>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xec5(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    116c <lag_adjust+0x6c>
movsd  -0x18(%rbp),%xmm0
movsd  0xeae(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116c <lag_adjust+0x6c>
mov    -0x8(%rbp),%rax
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lag_adjust>:
movsd  (%rdi),%xmm1
movsd  0xef4(%rip),%xmm2
movapd %xmm2,%xmm3
cmpltsd %xmm1,%xmm3
subsd  %xmm0,%xmm1
maxsd  %xmm1,%xmm2
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm3,%xmm2
movlpd %xmm2,(%rdi)
ret

LLVM IR (-O0):
define void @lag_adjust(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
%5 = alloca double
store double* %0, double** %3
store double %1, double* %4
%6 = load double*, double** %3
%7 = load double, double* %6
store double %7, double* %5
%8 = load double, double* %4
%9 = load double*, double** %3
%10 = load double, double* %9
%11 = fsub double %10, %8
store double %11, double* %9
%12 = load double*, double** %3
%13 = load double, double* %12
%14 = fcmp olt double %13, 1.000000e+00
br i1 %14, label %15, label %20
15: ; preds = %2
%16 = load double, double* %5
%17 = fcmp ogt double %16, 1.000000e+00
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = load double*, double** %3
store double 1.000000e+00, double* %19
br label %20
20: ; preds = %18, %15, %2
ret void
}

LLVM IR (-O2):
define void @lag_adjust(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fsub double %3, %1
%5 = fcmp olt double %4, 1.000000e+00
%6 = fcmp ogt double %3, 1.000000e+00
%7 = and i1 %6, %5
%8 = select i1 %7, double 1.000000e+00, double %4
store double %8, double* %0
ret void
}
/* Variables and functions */
unsigned int __get_cpsr();
int /*<<< orphan*/ __set_cpsr(unsigned int);
unsigned disableIRQ(void) {
  unsigned _cpsr;
  _cpsr = __get_cpsr();
  __set_cpsr(_cpsr | 0x00000080);
  return _cpsr;
}


x86 assembly (clang, -O0):
<disableIRQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__get_cpsr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
or     $0x80,%edi
call   1030 <__set_cpsr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disableIRQ>:
push   %rbx
xor    %eax,%eax
call   1040 <__get_cpsr@plt>
mov    %eax,%ebx
mov    %eax,%edi
or     $0x80,%edi
call   1030 <__set_cpsr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @disableIRQ() {
%1 = alloca i32
%2 = call i32 (...) @__get_cpsr()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 128
%5 = call i32 @__set_cpsr(i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @disableIRQ() {
%1 = tail call i32 (...) @__get_cpsr()
%2 = or i32 %1, 128
%3 = tail call i32 @__set_cpsr(i32 %2)
ret i32 %1
}
/* Variables and functions */
float fabs(float x) {
  if (x < 0)
    return (x - x) - (x);
  else
    return x;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112f <fabs+0x2f>
movss  -0x8(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1139 <fabs+0x39>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movaps %xmm0,%xmm2
subss  %xmm0,%xmm2
subss  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @fabs(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fsub float %0, %0
%4 = fsub float %3, %0
%5 = select i1 %2, float %4, float %0
ret float %5
}
int aaip_get_acl_text(char *path, char **text, int flag) { return (0); }


x86 assembly (clang, -O0):
<aaip_get_acl_text>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @aaip_get_acl_text(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @aaip_get_acl_text(i8* nocapture readnone %0, i8** nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Type definitions */
struct pktgen_config {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ worker_loop(struct pktgen_config *);
int launch_worker(void *config) {
  worker_loop((struct pktgen_config *)config);
  return 0;
}


x86 assembly (clang, -O0):
<launch_worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <worker_loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<launch_worker>:
push   %rax
call   1030 <worker_loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pktgen_config = type { i32 }
define i32 @launch_worker(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.pktgen_config*
%5 = call i32 @worker_loop(%struct.pktgen_config* %4)
ret i32 0
}

LLVM IR (-O2):
%struct.pktgen_config = type { i32 }
define i32 @launch_worker(i8* %0) {
%2 = bitcast i8* %0 to %struct.pktgen_config*
%3 = tail call i32 @worker_loop(%struct.pktgen_config* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x8d() {
  Assert_real((isspace(141) == 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_isspace.c",
              710, ("isspace should be 0 for 0x8d"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x8d>:
push   %rax
mov    $0x8d,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2c6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x8d\00"
define void @t_isspace_0x8d() {
%1 = call i64 @isspace(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x8d\00"
define void @t_isspace_0x8d() {
%1 = tail call i64 @isspace(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int get_dur(struct timeval *start_time, struct timeval *end_time) {
  int res;
  res = (end_time->tv_sec - start_time->tv_sec) * 1000 * 1000 +
        (end_time->tv_usec - start_time->tv_usec);
  return res;
}


x86 assembly (clang, -O0):
<get_dur>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
imul   $0x3e8,%eax,%eax
imul   $0x3e8,%eax,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
mov    -0x8(%rbp),%rdx
sub    0x4(%rdx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dur>:
mov    (%rsi),%ecx
mov    0x4(%rsi),%eax
sub    (%rdi),%ecx
imul   $0xf4240,%ecx,%ecx
sub    0x4(%rdi),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_dur(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
%5 = alloca i32
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load %struct.timeval*, %struct.timeval** %3
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = sub nsw i32 %8, %11
%13 = mul nsw i32 %12, 1000
%14 = mul nsw i32 %13, 1000
%15 = load %struct.timeval*, %struct.timeval** %4
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = load %struct.timeval*, %struct.timeval** %3
%19 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 1
%20 = load i32, i32* %19
%21 = sub nsw i32 %17, %20
%22 = add nsw i32 %14, %21
store i32 %22, i32* %5
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_dur(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
%8 = mul i32 %7, 1000000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%12 = load i32, i32* %11
%13 = sub i32 %10, %12
%14 = add nsw i32 %13, %8
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ ctrl_char(unsigned char const);
bool qdtext_char(unsigned char const c) {
  assert('\0' != c);
  return '"' != c && !ctrl_char(c);
}


x86 assembly (clang, -O0):
<qdtext_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movzbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x22,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     116d <qdtext_char+0x4d>
movzbl -0x1(%rbp),%edi
call   1030 <ctrl_char@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qdtext_char>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1040 <assert@plt>
xor    %eax,%eax
cmp    $0x22,%bl
je     1148 <qdtext_char+0x28>
movzbl %bl,%edi
call   1030 <ctrl_char@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @qdtext_char(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ne i32 0, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = icmp ne i32 34, %9
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i8, i8* %2
%13 = call i32 @ctrl_char(i8 zeroext %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
br label %16
16: ; preds = %11, %1
%17 = phi i1 [ false, %1 ], [ %15, %11 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @qdtext_char(i8 zeroext %0) {
%2 = icmp ne i8 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq i8 %0, 34
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = tail call i32 @ctrl_char(i8 zeroext %0)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
float __ocml_rlen4_f32(float, float, float, float);
float rnorm4df(float x, float y, float z, float w) {
  return __ocml_rlen4_f32(x, y, z, w);
}


x86 assembly (clang, -O0):
<rnorm4df>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <__ocml_rlen4_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnorm4df>:
jmp    1030 <__ocml_rlen4_f32@plt>

LLVM IR (-O0):
define float @rnorm4df(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call float @__ocml_rlen4_f32(float %9, float %10, float %11, float %12)
ret float %13
}

LLVM IR (-O2):
define float @rnorm4df(float %0, float %1, float %2, float %3) {
%5 = tail call float @__ocml_rlen4_f32(float %0, float %1, float %2, float %3)
ret float %5
}
void foo1function() {}


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

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

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

LLVM IR (-O2):
define void @foo1function() {
ret void
}
indreg0regx1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((*p0) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0regx1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
ja     113b <indreg0regx1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <indreg0regx1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0regx1>:
mov    (%r8),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,4),%edx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @indreg0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = load i32, i32* %4
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = icmp ule i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
__attribute__((always_)) int __acpi_release_global_lock(unsigned int *lock) {
  unsigned int old, new, val;
  do {
    old = *lock;
    new = old & ~0x3;
    val = ((__typeof__(*(lock)))__cmpxchg(
        (lock), (unsigned long)(old), (unsigned long)(new), sizeof(*(lock))));
  } while (__builtin_expect(!!(val != old), 0));
  return old & 0x1;
}


x86 assembly (clang, -O0):
<__acpi_release_global_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xfffffffc,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    %eax,%esi
mov    -0x10(%rbp),%eax
mov    %eax,%edx
mov    $0x4,%ecx
mov    $0x0,%al
call   1030 <__cmpxchg@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
jne    111c <__acpi_release_global_lock+0xc>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__acpi_release_global_lock>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%r14),%ebx
mov    %ebx,%edx
and    $0xfffffffc,%edx
mov    $0x4,%ecx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <__cmpxchg@plt>
cmp    %ebx,%eax
jne    1117 <__acpi_release_global_lock+0x7>
and    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @__acpi_release_global_lock(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
br label %6
6: ; preds = %17, %1
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = and i32 %9, -4
store i32 %10, i32* %4
%11 = load i32*, i32** %2
%12 = load i32, i32* %3
%13 = zext i32 %12 to i64
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = call i32 (i32*, i64, i64, i64, ...) bitcast (i32 (...)* @__cmpxchg to i32 (i32*, i64, i64, i64, ...)*)(i32* %11, i64 %13, i64 %15, i64 4)
store i32 %16, i32* %5
br label %17
17: ; preds = %6
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = icmp ne i32 %18, %19
%21 = xor i1 %20, true
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = sext i32 %23 to i64
%25 = icmp ne i64 %24, 0
br i1 %25, label %6, label %26
26: ; preds = %17
%27 = load i32, i32* %3
%28 = and i32 %27, 1
ret i32 %28
}

LLVM IR (-O2):
define i32 @__acpi_release_global_lock(i32* %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* %0
%4 = and i32 %3, -4
%5 = zext i32 %3 to i64
%6 = zext i32 %4 to i64
%7 = tail call i32 (i32*, i64, i64, i64, ...) bitcast (i32 (...)* @__cmpxchg to i32 (i32*, i64, i64, i64, ...)*)(i32* %0, i64 %5, i64 %6, i64 4)
%8 = icmp eq i32 %7, %3
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = and i32 %3, 1
ret i32 %10
}