xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
main() {
  char line[80];
  getline(line, 80);
  printf("%s", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x50,%esi
call   1040 <getline@plt>
lea    -0x60(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1040 <getline@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 80)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void show_message(char *buffer, int type) {
  printf("%s %s", type == 0 ? "From server:" : "From client:", buffer);
}


x86 assembly (clang, -O0):
<show_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xeea(%rip),%rsi
lea    0xed6(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rsi
mov    -0x8(%rbp),%rdx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_message>:
mov    %rdi,%rdx
test   %esi,%esi
lea    0xeea(%rip),%rax
lea    0xef0(%rip),%rsi
cmove  %rax,%rsi
lea    0xed2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [13 x i8] c"From server:\00"
@.str.2 = [13 x i8] c"From client:\00"
define void @show_message(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0)
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [13 x i8] c"From server:\00"
@.str.2 = [13 x i8] c"From client:\00"
define void @show_message(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int rand();
int main(void) {
  int i;
  for (i = 0; i < rand() % 65536; i++)
    foo(rand() % 65536);
  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),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
cmp    %edx,%eax
jge    117a <main+0x5a>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <rand@plt>
test   $0x8000ffff,%eax
jle    1182 <main+0x62>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
mov    %eax,%edi
call   1030 <foo@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
cmp    %eax,%ebx
jl     1140 <main+0x20>
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 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 65536
%7 = icmp slt i32 %4, %6
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 65536
%11 = call i32 @foo(i32 %10)
br label %12
12: ; preds = %8
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rand()
%2 = and i32 %1, -2147418113
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %0, %4
%5 = phi i32 [ %9, %4 ], [ 0, %0 ]
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 65536
%8 = tail call i32 @foo(i32 %7)
%9 = add nuw nsw i32 %5, 1
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 65536
%12 = icmp slt i32 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %0
ret i32 0
}
adrx0reg1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((((unsigned int *)10000000)[x0]) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0reg1>:
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)
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
ja     1139 <adrx0reg1+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <adrx0reg1+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0reg1>:
movslq %edx,%rcx
xor    %eax,%eax
cmp    %esi,0x989680(,%rcx,4)
setbe  %al
ret

LLVM IR (-O0):
define i32 @adrx0reg1(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* %10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* %9
%19 = icmp ule i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %6
store i32 1, i32* %7
br label %22
21: ; preds = %6
store i32 0, i32* %7
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @adrx0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = icmp ule i32 %9, %1
%11 = zext i1 %10 to i32
ret i32 %11
}
int ft_strlen(const char *str) {
  int i;
  i = 0;
  while (str[i] != '\0')
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_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     1132 <ft_strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ft_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
}
int ft_sqrt(int nb) {
  int i;
  i = 0;
  if (nb < 0)
    return (0);
  while (i < nb) {
    if (i * i == nb)
      return (i);
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1124 <ft_sqrt+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1165 <ft_sqrt+0x65>
jmp    1129 <ft_sqrt+0x29>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <ft_sqrt+0x5e>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1150 <ft_sqrt+0x50>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <ft_sqrt+0x65>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <ft_sqrt+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
test   %edi,%edi
jle    1120 <ft_sqrt+0x20>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%ecx
imul   %eax,%ecx
cmp    %edi,%ecx
je     1122 <ft_sqrt+0x22>
add    $0x1,%eax
cmp    %eax,%edi
jne    1110 <ft_sqrt+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_sqrt(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ 0, %1 ]
%5 = mul nsw i32 %4, %4
%6 = icmp eq i32 %5, %0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %7, %1
%11 = phi i32 [ 0, %1 ], [ %4, %3 ], [ 0, %7 ]
ret i32 %11
}
/* Variables and functions */
int atoi(char *);
char *getenv(char *);
int getInteger(char *name, int def) {
  return ({
    char *_s;
    ((_s = getenv(name)) != NULL) ? atoi(_s) : def;
  });
}


x86 assembly (clang, -O0):
<getInteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1157 <getInteger+0x37>
mov    -0x18(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x20(%rbp)
jmp    115d <getInteger+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInteger>:
push   %rbx
mov    %esi,%ebx
call   1030 <getenv@plt>
test   %rax,%rax
je     1136 <getInteger+0x16>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <atoi@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getInteger(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = call i8* @getenv(i8* %7)
store i8* %8, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = call i32 @atoi(i8* %11)
br label %15
13: ; preds = %2
%14 = load i32, i32* %4
br label %15
15: ; preds = %13, %10
%16 = phi i32 [ %12, %10 ], [ %14, %13 ]
store i32 %16, i32* %6
%17 = load i32, i32* %6
ret i32 %17
}

LLVM IR (-O2):
define i32 @getInteger(i8* nocapture %0, i32 %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @atoi(i8* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ %1, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ XKeyEvent;

/* Variables and functions */
int XLookupString(int /*<<< orphan*/ *, char *, int, int /*<<< orphan*/ *,
                  int /*<<< orphan*/ *);
int cvt_key(XKeyEvent *ev) {
  int n;
  char buf[4];
  n = XLookupString(ev, buf, 4, NULL, NULL);
  if (n != 1)
    return -1;
  return buf[0];
}


x86 assembly (clang, -O0):
<cvt_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <XLookupString@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     114f <cvt_key+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <cvt_key+0x46>
movsbl -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_key>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <XLookupString@plt>
cmp    $0x1,%eax
movsbl 0x4(%rsp),%ecx
mov    $0xffffffff,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cvt_key(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [4 x i8]
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%8 = call i32 @XLookupString(i32* %6, i8* %7, i32 4, i32* null, i32* null)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %16
12: ; preds = %1
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @cvt_key(i32* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @XLookupString(i32* %0, i8* %3, i32 4, i32* null, i32* null)
%5 = icmp eq i32 %4, 1
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
/* Variables and functions */
int getCharacterAlias(unsigned char character, char *buffer, size_t size) {
  return 0;
}


x86 assembly (clang, -O0):
<getCharacterAlias>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @getCharacterAlias(i8 zeroext %0, i8* nocapture readnone %1, i64 %2) {
ret i32 0
}
unsigned int gcc_current_sp(void) {
  unsigned int sp = 0;
  return sp;
}


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

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

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

LLVM IR (-O2):
define i32 @gcc_current_sp() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t saturate16(int32_t val) {}


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

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

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

LLVM IR (-O2):
define i32 @saturate16(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ from;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *const, int /*<<< orphan*/ const *, int);
size_t store_serialize_uint32(void *const to, uint32_t const from) {
  memcpy(to, &from, sizeof(from));
  return sizeof(from);
}


x86 assembly (clang, -O0):
<store_serialize_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_serialize_uint32>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @store_serialize_uint32(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 @memcpy(i8* %5, i32* %4, i32 4)
ret i64 4
}

LLVM IR (-O2):
define i64 @store_serialize_uint32(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret i64 4
}
/* Variables and functions */
int /*<<< orphan*/ lruCacheSet(int, int);
void set(int key, int value) { lruCacheSet(key, value); }


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

x86 assembly (clang, -O2):
<set>:
jmp    1030 <lruCacheSet@plt>

LLVM IR (-O0):
define void @set(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 = call i32 @lruCacheSet(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @set(i32 %0, i32 %1) {
%3 = tail call i32 @lruCacheSet(i32 %0, i32 %1)
ret void
}
void MotePlatformP$SerialIdPin$makeInput(void) {
  HplAtm128GeneralIOPinP$4$IO$makeInput();
}


x86 assembly (clang, -O0):
<MotePlatformP$SerialIdPin$makeInput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplAtm128GeneralIOPinP$4$IO$makeInput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MotePlatformP$SerialIdPin$makeInput>:
xor    %eax,%eax
jmp    1030 <HplAtm128GeneralIOPinP$4$IO$makeInput@plt>

LLVM IR (-O0):
define void @"MotePlatformP$SerialIdPin$makeInput"() {
%1 = call i32 (...) @"HplAtm128GeneralIOPinP$4$IO$makeInput"()
ret void
}

LLVM IR (-O2):
define void @"MotePlatformP$SerialIdPin$makeInput"() {
%1 = tail call i32 (...) @"HplAtm128GeneralIOPinP$4$IO$makeInput"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA_PSS_PARAMS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ RSA_PSS_PARAMS_it;
RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in,
                                   long len) {
  return (RSA_PSS_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                         &RSA_PSS_PARAMS_it);
}


x86 assembly (clang, -O0):
<d2i_RSA_PSS_PARAMS>:
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
mov    0x2eb1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_RSA_PSS_PARAMS>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@RSA_PSS_PARAMS_it = global i32 0
define i32* @d2i_RSA_PSS_PARAMS(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @RSA_PSS_PARAMS_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@RSA_PSS_PARAMS_it = global i32 0
define i32* @d2i_RSA_PSS_PARAMS(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @RSA_PSS_PARAMS_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
int uniquePathsR(int m, int n) {
  if (m == 1 || n == 1) {
    return 1;
  }
  return uniquePathsR(m - 1, n) + uniquePathsR(m, n - 1);
}


x86 assembly (clang, -O0):
<uniquePathsR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1132 <uniquePathsR+0x22>
cmpl   $0x1,-0xc(%rbp)
jne    113e <uniquePathsR+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1167 <uniquePathsR+0x57>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <uniquePathsR@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <uniquePathsR@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniquePathsR>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
cmp    $0x1,%edi
je     1147 <uniquePathsR+0x37>
mov    %esi,%ebp
cmp    $0x1,%esi
je     1147 <uniquePathsR+0x37>
mov    %edi,%r14d
add    $0xffffffff,%r14d
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %r14d,%edi
mov    %ebp,%esi
call   1030 <uniquePathsR@plt>
add    $0xffffffff,%ebp
add    %eax,%ebx
cmp    $0x1,%ebp
jne    1130 <uniquePathsR+0x20>
add    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @uniquePathsR(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
%4 = icmp eq i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %17, label %6
6: ; preds = %2
%7 = add nsw i32 %0, -1
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %1, %6 ], [ %12, %8 ]
%10 = phi i32 [ 0, %6 ], [ %13, %8 ]
%11 = tail call i32 @uniquePathsR(i32 %7, i32 %9)
%12 = add nsw i32 %9, -1
%13 = add nsw i32 %11, %10
%14 = icmp eq i32 %12, 1
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = add i32 %13, 1
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 1, %2 ], [ %16, %15 ]
ret i32 %18
}
/* Variables and functions */
unsigned long atomic_exchange_and_add(unsigned long volatile *, long);
unsigned long atomic_add_long_nv(volatile unsigned long *target, long delta) {
  return atomic_exchange_and_add(target, delta) + 1;
}


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

x86 assembly (clang, -O2):
<atomic_add_long_nv>:
push   %rax
call   1030 <atomic_exchange_and_add@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @atomic_add_long_nv(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = call i64 @atomic_exchange_and_add(i64* %5, i64 %6)
%8 = add i64 %7, 1
ret i64 %8
}

LLVM IR (-O2):
define i64 @atomic_add_long_nv(i64* %0, i64 %1) {
%3 = tail call i64 @atomic_exchange_and_add(i64* %0, i64 %1)
%4 = add i64 %3, 1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ task_consumer(int, int *);
int *task_producer(int);
int main() {
  int *p = 0;
  p = task_producer(5);
  task_consumer(5, p);
#pragma omp taskwait
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x5,%edi
call   1040 <task_producer@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x5,%edi
call   1030 <task_consumer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <task_producer@plt>
mov    $0x5,%edi
mov    %rax,%rsi
call   1030 <task_consumer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = call i32* @task_producer(i32 5)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @task_consumer(i32 5, i32* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @task_producer(i32 5)
%2 = tail call i32 @task_consumer(i32 5, i32* %1)
ret i32 0
}
int trap(int mask) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @trap(i32 %0) {
ret i32 0
}
__attribute__((warn_unused_result)) f() {}


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

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ le();
int /*<<< orphan*/ swap32(int /*<<< orphan*/);
void write32le(uint32_t *p, uint32_t w) { *p = (le() ? w : swap32(w)); }


x86 assembly (clang, -O0):
<write32le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <le@plt>
cmp    $0x0,%rax
je     114b <write32le+0x2b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <write32le+0x36>
mov    -0xc(%rbp),%edi
call   1040 <swap32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32le>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <le@plt>
test   %rax,%rax
jne    113d <write32le+0x1d>
mov    %ebp,%edi
call   1040 <swap32@plt>
mov    %eax,%ebp
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @write32le(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i64 (...) @le()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %4
br label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @swap32(i32 %10)
br label %12
12: ; preds = %9, %7
%13 = phi i32 [ %8, %7 ], [ %11, %9 ]
%14 = load i32*, i32** %3
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @write32le(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i64 (...) @le()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @swap32(i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ %1, %2 ]
store i32 %8, i32* %0
ret void
}
int vde_chain_nm7_alloc(void **mem, const int *idata, const double *rdata) {
  if (mem)
    *mem = 0;
  (void)idata;
  (void)rdata;
  return 0;
}


x86 assembly (clang, -O0):
<vde_chain_nm7_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <vde_chain_nm7_alloc+0x26>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm7_alloc>:
test   %rdi,%rdi
je     110c <vde_chain_nm7_alloc+0xc>
movq   $0x0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @vde_chain_nm7_alloc(i8** %0, i32* %1, double* %2) {
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca double*
store i8** %0, i8*** %4
store i32* %1, i32** %5
store double* %2, double** %6
%7 = load i8**, i8*** %4
%8 = icmp ne i8** %7, null
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i8**, i8*** %4
store i8* null, i8** %10
br label %11
11: ; preds = %9, %3
%12 = load i32*, i32** %5
%13 = load double*, double** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @vde_chain_nm7_alloc(i8** writeonly %0, i32* nocapture readnone %1, double* nocapture readnone %2) {
%4 = icmp eq i8** %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
store i8* null, i8** %0
br label %6
6: ; preds = %5, %3
ret i32 0
}
/* Type definitions */
struct mloop_work {
  int dummy;
};

/* Variables and functions */
int mloop__unref_any(struct mloop_work *);
__attribute__((visibility("default"))) int
mloop_work_unref(struct mloop_work *self) {
  return mloop__unref_any(self);
}


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

x86 assembly (clang, -O2):
<mloop_work_unref>:
jmp    1030 <mloop__unref_any@plt>

LLVM IR (-O0):
%struct.mloop_work = type { i32 }
define i32 @mloop_work_unref(%struct.mloop_work* %0) {
%2 = alloca %struct.mloop_work*
store %struct.mloop_work* %0, %struct.mloop_work** %2
%3 = load %struct.mloop_work*, %struct.mloop_work** %2
%4 = call i32 @mloop__unref_any(%struct.mloop_work* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.mloop_work = type { i32 }
define i32 @mloop_work_unref(%struct.mloop_work* %0) {
%2 = tail call i32 @mloop__unref_any(%struct.mloop_work* %0)
ret i32 %2
}
void avio_get_str16le() {}


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

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

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

LLVM IR (-O2):
define void @avio_get_str16le() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void TimerADCEventSet(uint32_t ui32Base, uint32_t ui32ADCEvent) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000070))) = ui32ADCEvent;
}


x86 assembly (clang, -O0):
<TimerADCEventSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x70(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerADCEventSet>:
mov    %rsi,0x70(%rdi)
ret

LLVM IR (-O0):
define void @TimerADCEventSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 112
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerADCEventSet(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 112
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
const int av_toupper(int c) {
  if (c >= 'a' && c <= 'z')
    c ^= 0x20;
  return c;
}


x86 assembly (clang, -O0):
<av_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1124 <av_toupper+0x24>
cmpl   $0x7a,-0x4(%rbp)
jg     1124 <av_toupper+0x24>
mov    -0x4(%rbp),%eax
xor    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_toupper>:
lea    -0x61(%rdi),%ecx
mov    %edi,%eax
xor    $0x20,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @av_toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = xor i32 %9, 32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @av_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = xor i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
void *malloc(size_t);
void *get_mem(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<get_mem>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @get_mem(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @get_mem(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int powe(int base, int exp1) {
  if (exp1 % 2 == 0)
    return 1;
  return -1;
}


x86 assembly (clang, -O0):
<powe>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112a <powe+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <powe+0x31>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<powe>:
and    $0x1,%esi
neg    %esi
sbb    %eax,%eax
or     $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @powe(i32 %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 1, i32 -1
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t SSIClockSourceGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000FC8))));
}


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

x86 assembly (clang, -O2):
<SSIClockSourceGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0xfc8(%rax),%rax
ret

LLVM IR (-O0):
define i64 @SSIClockSourceGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 4040
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @SSIClockSourceGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 4040
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int execvp(char const *, char *const *);
int octave_execvp_wrapper(const char *file, char *const *argv) {
  return execvp(file, argv);
}


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

x86 assembly (clang, -O2):
<octave_execvp_wrapper>:
jmp    1030 <execvp@plt>

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

LLVM IR (-O2):
define i32 @octave_execvp_wrapper(i8* %0, i8** %1) {
%3 = tail call i32 @execvp(i8* %0, i8** %1)
ret i32 %3
}
int countTillNonNull(char **arg) {
  int count = 0;
  while (arg[count++] != '\0')
    ;
  return count - 1;
}


x86 assembly (clang, -O0):
<countTillNonNull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1131 <countTillNonNull+0x31>
jmp    110f <countTillNonNull+0xf>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @countTillNonNull(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw i64 %3, 1
%5 = getelementptr inbounds i8*, i8** %0, i64 %3
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void to_sign_int_store_n(__float128 a, int *p, long n) { p[n] = (int)a; }


x86 assembly (clang, -O0):
<to_sign_int_store_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movaps -0x10(%rbp),%xmm0
call   1130 <__fixtfsi>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_sign_int_store_n>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1120 <__fixtfsi>
mov    %eax,(%rbx,%r14,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define void @to_sign_int_store_n(fp128 %0, i32* %1, i64 %2) {
%4 = alloca fp128
%5 = alloca i32*
%6 = alloca i64
store fp128 %0, fp128* %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load fp128, fp128* %4
%8 = fptosi fp128 %7 to i32
%9 = load i32*, i32** %5
%10 = load i64, i64* %6
%11 = getelementptr inbounds i32, i32* %9, i64 %10
store i32 %8, i32* %11
ret void
}

LLVM IR (-O2):
define void @to_sign_int_store_n(fp128 %0, i32* nocapture writeonly %1, i64 %2) {
%4 = fptosi fp128 %0 to i32
%5 = getelementptr inbounds i32, i32* %1, i64 %2
store i32 %4, i32* %5
ret void
}
int feraiseexcept(int mask) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @feraiseexcept(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ seven_1();
int /*<<< orphan*/ seven_2();
int main() {
  seven_1();
  printf("\n*******\n\n");
  seven_2();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\0A*******\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @seven_1()
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @seven_2()
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"\0A*******\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @seven_1()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @seven_2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cpunum();
int /*<<< orphan*/ lapicinit(int /*<<< orphan*/);
int /*<<< orphan*/ mpmain();
int /*<<< orphan*/ seginit();
int /*<<< orphan*/ switchkvm();
void mpenter(void) {
  switchkvm();
  seginit();
  lapicinit(cpunum());
  mpmain();
}


x86 assembly (clang, -O0):
<mpenter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <switchkvm@plt>
mov    $0x0,%al
call   1070 <seginit@plt>
mov    $0x0,%al
call   1030 <cpunum@plt>
mov    %eax,%edi
call   1040 <lapicinit@plt>
mov    $0x0,%al
call   1060 <mpmain@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpenter>:
push   %rax
xor    %eax,%eax
call   1050 <switchkvm@plt>
xor    %eax,%eax
call   1070 <seginit@plt>
xor    %eax,%eax
call   1030 <cpunum@plt>
mov    %eax,%edi
call   1040 <lapicinit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <mpmain@plt>

LLVM IR (-O0):
define void @mpenter() {
%1 = call i32 (...) @switchkvm()
%2 = call i32 (...) @seginit()
%3 = call i32 (...) @cpunum()
%4 = call i32 @lapicinit(i32 %3)
%5 = call i32 (...) @mpmain()
ret void
}

LLVM IR (-O2):
define void @mpenter() {
%1 = tail call i32 (...) @switchkvm()
%2 = tail call i32 (...) @seginit()
%3 = tail call i32 (...) @cpunum()
%4 = tail call i32 @lapicinit(i32 %3)
%5 = tail call i32 (...) @mpmain()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int fix[100];
  int comp[100];
  int i;
  for (i = 0; i <= 4; i++) {
    scanf("%d", &comp[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x334(%rbp)
cmpl   $0x4,-0x334(%rbp)
jg     116e <main+0x5e>
movslq -0x334(%rbp),%rax
lea    -0x330(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeab(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x334(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x334(%rbp)
jmp    112c <main+0x1c>
mov    -0x4(%rbp),%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x190,%rsp
lea    0xee1(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 2
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 3
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 4
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
ret i32 0
}
short prog_q168cinv(short signe, short value) {
  if (signe == 0) {
    return -value;
  }
  return value;
}


x86 assembly (clang, -O0):
<prog_q168cinv>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jne    1130 <prog_q168cinv+0x30>
movswl -0x6(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %ax,-0x2(%rbp)
jmp    1138 <prog_q168cinv+0x38>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prog_q168cinv>:
mov    %esi,%eax
neg    %eax
test   %di,%di
cmovne %esi,%eax
ret

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

LLVM IR (-O2):
define signext i16 @prog_q168cinv(i16 signext %0, i16 signext %1) {
%3 = icmp eq i16 %0, 0
%4 = sub i16 0, %1
%5 = select i1 %3, i16 %4, i16 %1
ret i16 %5
}
V_visual(d) int d;
{
  Z_fatal("visual mode is not available on this machine\n");
  return (-d);
}


x86 assembly (clang, -O0):
<V_visual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <Z_fatal@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<V_visual>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <Z_fatal@plt>
neg    %ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"visual mode is not available on this machine\0A\00"
define i32 @V_visual(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @Z_fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = sub nsw i32 0, %4
ret i32 %5
}

LLVM IR (-O2):
@.str = [46 x i8] c"visual mode is not available on this machine\0A\00"
define i32 @V_visual(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @Z_fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = sub nsw i32 0, %0
ret i32 %3
}