xunge/DecIR huggingface dataset:
/* Variables and functions */
int EINVAL;
int RAND_bytes(unsigned char *, size_t);
int crypt_backend_rng(char *buffer, size_t length, int quality, int fips) {
  if (fips)
    return -EINVAL;
  if (RAND_bytes((unsigned char *)buffer, length) != 1)
    return -EINVAL;
  return 0;
}


x86 assembly (clang, -O0):
<crypt_backend_rng>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1143 <crypt_backend_rng+0x33>
xor    %eax,%eax
mov    0x2ea7(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <crypt_backend_rng+0x63>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <RAND_bytes@plt>
cmp    $0x1,%eax
je     116c <crypt_backend_rng+0x5c>
xor    %eax,%eax
mov    0x2e7e(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <crypt_backend_rng+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_backend_rng>:
push   %rax
test   %ecx,%ecx
jne    1123 <crypt_backend_rng+0x13>
call   1030 <RAND_bytes@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
je     112e <crypt_backend_rng+0x1e>
mov    0x2eb6(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @crypt_backend_rng(i8* %0, i64 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
br label %15
9: ; preds = %4
%10 = tail call i32 @RAND_bytes(i8* %0, i64 %1)
%11 = icmp eq i32 %10, 1
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* @EINVAL
%14 = sub nsw i32 0, %13
br label %15
15: ; preds = %9, %12, %6
%16 = phi i32 [ %8, %6 ], [ %14, %12 ], [ 0, %9 ]
ret i32 %16
}
int f2(int t, int v) {
  int a = t - 1;
  int b = a * v;
  return v + b;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
ret i32 %3
}
void i32_swap(int *x, int *y) {
  int temp = *x;
  *x = *y;
  *y = temp;
}


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

x86 assembly (clang, -O2):
<i32_swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @i32_swap(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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @i32_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_lexval();
int yyselect();
labeltoken() {
  switch (yyselect()) {
  case 97: {
    get_lexval();
    get_lexval();
  } break;
  }
}


x86 assembly (clang, -O0):
<labeltoken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <yyselect@plt>
sub    $0x61,%eax
jne    114b <labeltoken+0x2b>
jmp    113d <labeltoken+0x1d>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<labeltoken>:
push   %rax
xor    %eax,%eax
call   1030 <yyselect@plt>
cmp    $0x61,%eax
jne    113b <labeltoken+0x1b>
xor    %eax,%eax
call   1040 <get_lexval@plt>
xor    %eax,%eax
call   1040 <get_lexval@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @labeltoken() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %6 [
i32 97, label %3
]
3: ; preds = %0
%4 = call i32 (...) @get_lexval()
%5 = call i32 (...) @get_lexval()
br label %6
6: ; preds = %0, %3
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @labeltoken() {
%1 = tail call i32 (...) @yyselect()
%2 = icmp eq i32 %1, 97
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @get_lexval()
%5 = tail call i32 (...) @get_lexval()
br label %6
6: ; preds = %0, %3
ret i32 undef
}
/* Type definitions */
struct mod {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ g_free(struct mod *);
int mod_exit(struct mod *mod) {
  if (mod == 0) {
    return 0;
  }
  g_free(mod);
  return 0;
}


x86 assembly (clang, -O0):
<mod_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <mod_exit+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1143 <mod_exit+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <g_free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_exit>:
test   %rdi,%rdi
je     111f <mod_exit+0xf>
push   %rax
call   1030 <g_free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.mod = type { i32 }
define i32 @mod_exit(%struct.mod* %0) {
%2 = alloca i32
%3 = alloca %struct.mod*
store %struct.mod* %0, %struct.mod** %3
%4 = load %struct.mod*, %struct.mod** %3
%5 = icmp eq %struct.mod* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load %struct.mod*, %struct.mod** %3
%9 = call i32 @g_free(%struct.mod* %8)
store i32 0, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.mod = type { i32 }
define i32 @mod_exit(%struct.mod* %0) {
%2 = icmp eq %struct.mod* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @g_free(%struct.mod* %0)
br label %5
5: ; preds = %1, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void test_firstprivate() {
  int i;
#pragma omp parallel
#pragma omp sections firstprivate(
  { foo(); }
#pragma omp parallel
#pragma omp sections firstprivate(,
  { foo(); }
#pragma omp parallel
#pragma omp sections firstprivate(, )
  { foo(); }
#pragma omp parallel
#pragma omp sections firstprivate()
  { foo(); }
#pragma omp parallel
#pragma omp sections firstprivate(int)
  { foo(); }
#pragma omp parallel
#pragma omp sections firstprivate(0)
  { foo(); }
  int x, y, z;
#pragma omp parallel
#pragma omp sections lastprivate(x) firstprivate(x)
  { foo(); }
#pragma omp parallel
#pragma omp sections lastprivate(x, y) firstprivate(x, y)
  { foo(); }
#pragma omp parallel
#pragma omp sections lastprivate(x, y, z) firstprivate(x, y, z)
  { foo(); }
}


x86 assembly (clang, -O0):
<test_firstprivate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_firstprivate>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @test_firstprivate() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @foo()
%6 = call i32 (...) @foo()
%7 = call i32 (...) @foo()
%8 = call i32 (...) @foo()
%9 = call i32 (...) @foo()
%10 = call i32 (...) @foo()
%11 = call i32 (...) @foo()
%12 = call i32 (...) @foo()
%13 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @test_firstprivate() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
%4 = tail call i32 (...) @foo()
%5 = tail call i32 (...) @foo()
%6 = tail call i32 (...) @foo()
%7 = tail call i32 (...) @foo()
%8 = tail call i32 (...) @foo()
%9 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ func2();
int pthread_self();
int rand();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
void *func1(void *arg) {
  sleep(rand() % 7);
  func2();
  fprintf(stderr, "Thread %x done\n", pthread_self());
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1040 <func2@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%edx
lea    0xe68(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
push   %rbx
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0xffffffff92492493,%rax,%rdi
shr    $0x20,%rdi
add    %eax,%edi
mov    %edi,%ecx
shr    $0x1f,%ecx
sar    $0x2,%edi
add    %ecx,%edi
lea    0x0(,%rdi,8),%ecx
sub    %ecx,%edi
add    %eax,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1040 <func2@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe61(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"Thread %x done\0A\00"
define i8* @func1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 7
%6 = call i32 @sleep(i32 %5)
%7 = call i32 (...) @func2()
%8 = load i32, i32* @stderr
%9 = call i32 (...) @pthread_self()
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Thread %x done\0A\00"
define noalias i8* @func1(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 7
%4 = tail call i32 @sleep(i32 %3)
%5 = tail call i32 (...) @func2()
%6 = load i32, i32* @stderr
%7 = tail call i32 (...) @pthread_self()
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("C:\\Windows\\System32\\ipconfig");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"C:\\Windows\\System32\\ipconfig\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"C:\\Windows\\System32\\ipconfig\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int any(c, str)
register int c;
register char *str;
{
  while (*str)
    if (c == *str++)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<any>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <any+0x46>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1141 <any+0x41>
movl   $0x1,-0x4(%rbp)
jmp    114d <any+0x4d>
jmp    110b <any+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any>:
movsbl (%rsi),%eax
test   %eax,%eax
je     1115 <any+0x15>
add    $0x1,%rsi
cmp    %edi,%eax
jne    1100 <any>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @any(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void turnMax() {
  system("echo  1900000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle");
  system("echo  1900000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle");
  system("echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable");
  system("echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable");
}


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

x86 assembly (clang, -O2):
<turnMax>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xf14(%rip),%rdi
call   1030 <system@plt>
lea    0xf40(%rip),%rdi
call   1030 <system@plt>
lea    0xf61(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"echo 1900000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle\00"
@.str.1 = [56 x i8] c"echo 1900000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle\00"
@.str.2 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.3 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
define void @turnMax() {
%1 = call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"echo 1900000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle\00"
@.str.1 = [56 x i8] c"echo 1900000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle\00"
@.str.2 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.3 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
define void @turnMax() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void macfn(void) {}


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

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

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

LLVM IR (-O2):
define void @macfn() {
ret void
}
void be_uint32_write(void *ptr, unsigned v) {
  unsigned char *ptr8 = (unsigned char *)ptr;
  ptr8[3] = v & 0xFF;
  ptr8[2] = (v >> 8) & 0xFF;
  ptr8[1] = (v >> 16) & 0xFF;
  ptr8[0] = (v >> 24) & 0xFF;
}


x86 assembly (clang, -O0):
<be_uint32_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_uint32_write>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @be_uint32_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 3
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = lshr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8 %15, i8* %17
%18 = load i32, i32* %4
%19 = lshr i32 %18, 16
%20 = and i32 %19, 255
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 1
store i8 %21, i8* %23
%24 = load i32, i32* %4
%25 = lshr i32 %24, 24
%26 = and i32 %25, 255
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 0
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @be_uint32_write(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %3, i8* %4
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %7
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %1, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %0
ret void
}
const char *rcsid(const char *p) {
  return rcsid(
      p = "@(#)$File: apprentice.c,v 1.169 2011/05/10 17:08:13 christos Exp $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcsid>:
jmp    1100 <rcsid>

LLVM IR (-O0):
@.str = [67 x i8] c"@(#)$File: apprentice.c,v 1.169 2011/05/10 17:08:13 christos Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "command line:  \n          -i [input file name], \n        -I [format], "
      "\n         -b [offset], \n         -x [xsize], \n          -y [ysize], "
      "\n          -o [output file name] \n        -O [out format] \n         "
      "-f [raw out encoding] \n        -H [raw out head on/off] \n        -C "
      "[conver yuv420 to formal yuv420P as input for mx25] \n ");
}


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

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

LLVM IR (-O0):
@.str = [329 x i8] c"command line: \0A -i [input file name], \0A -I [format], \0A -b [offset], \0A -x [xsize], \0A -y [ysize], \0A -o [output file name] \0A -O [out format] \0A -f [raw out encoding] \0A -H [raw out head on/off] \0A -C [conver yuv420 to formal yuv420P as input for mx25] \0A \00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([329 x i8], [329 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [329 x i8] c"command line: \0A -i [input file name], \0A -I [format], \0A -b [offset], \0A -x [xsize], \0A -y [ysize], \0A -o [output file name] \0A -O [out format] \0A -f [raw out encoding] \0A -H [raw out head on/off] \0A -C [conver yuv420 to formal yuv420P as input for mx25] \0A \00"
define void @usage() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([329 x i8], [329 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double M_PI;
scalar_t__ cos(int);
double cosh(double);
double sqrt(scalar_t__);
double ftrans(double x) {
  double c = cosh(x);
  return (sqrt(cos(3 * x) + cosh(M_PI)) / c) / c;
}


x86 assembly (clang, -O0):
<ftrans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cosh@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xeac(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <cos@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0x2e75(%rip),%rax
movsd  (%rax),%xmm0
call   1030 <cosh@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <sqrt@plt>
divsd  -0x10(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftrans>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <cosh@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xead(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x2e77(%rip),%rax
movsd  (%rax),%xmm0
call   1030 <cosh@plt>
addsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <sqrt@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @ftrans(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @cosh(double %4)
store double %5, double* %3
%6 = load double, double* %2
%7 = fmul double 3.000000e+00, %6
%8 = fptosi double %7 to i32
%9 = call i64 @cos(i32 %8)
%10 = sitofp i64 %9 to double
%11 = load double, double* @M_PI
%12 = call double @cosh(double %11)
%13 = fadd double %10, %12
%14 = fptosi double %13 to i64
%15 = call double @sqrt(i64 %14)
%16 = load double, double* %3
%17 = fdiv double %15, %16
%18 = load double, double* %3
%19 = fdiv double %17, %18
ret double %19
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @ftrans(double %0) {
%2 = tail call double @cosh(double %0)
%3 = fmul double %0, 3.000000e+00
%4 = fptosi double %3 to i32
%5 = tail call i64 @cos(i32 %4)
%6 = sitofp i64 %5 to double
%7 = load double, double* @M_PI
%8 = tail call double @cosh(double %7)
%9 = fadd double %8, %6
%10 = fptosi double %9 to i64
%11 = tail call double @sqrt(i64 %10)
%12 = fdiv double %11, %2
%13 = fdiv double %12, %2
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int /*<<< orphan*/);
wchar_t convert(wchar_t ch) {
  return (4 == sizeof(wchar_t)) ? htonl(ch) : htons(ch);
}


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

x86 assembly (clang, -O2):
<convert>:
jmp    1030 <htonl@plt>

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

LLVM IR (-O2):
define i32 @convert(i32 %0) {
%2 = tail call i32 @htonl(i32 %0)
ret i32 %2
}
__typeof__(sprintf(1, 1, "")) test_sprintf_250(void) {
  return sprintf(1, 1, "");
}


x86 assembly (clang, -O0):
<test_sprintf_250>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
lea    0xee0(%rip),%rdx
mov    %rsi,%rdi
mov    $0x0,%al
call   1030 <sprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sprintf_250>:
lea    0xee9(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @test_sprintf_250() {
%1 = call i32 (i8*, i8*, ...) @sprintf(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @test_sprintf_250() {
%1 = tail call i32 (i8*, i8*, ...) @sprintf(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
scalar_t__ isalnum(char);
bool isidchar(char value) { return isalnum(value) || value == '_'; }


x86 assembly (clang, -O0):
<isidchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <isidchar+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %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):
<isidchar>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isidchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isidchar(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ _LE_to_BE_long(unsigned long);
void insl(int port, long *ptr, int len) {
  unsigned long *io_ptr = (unsigned long *)(((unsigned long)0x80000000) + port);
  while (len-- > 0) {
    *ptr++ = _LE_to_BE_long(*io_ptr);
  }
}


x86 assembly (clang, -O0):
<insl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x80000000,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jle    1171 <insl+0x61>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1030 <_LE_to_BE_long@plt>
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,(%rax)
jmp    1137 <insl+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insl>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    114a <insl+0x3a>
mov    %edx,%ebp
mov    %rsi,%rbx
movslq %edi,%r14
add    $0x1,%ebp
mov    $0x80000000,%r15d
nopl   0x0(%rax)
mov    (%r14,%r15,1),%rdi
call   1030 <_LE_to_BE_long@plt>
cltq
mov    %rax,(%rbx)
add    $0x8,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <insl+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @insl(i32 %0, i64* nocapture writeonly %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = add nsw i64 %4, 2147483648
%6 = inttoptr i64 %5 to i64*
%7 = icmp sgt i32 %2, 0
br i1 %7, label %8, label %17
8: ; preds = %3, %8
%9 = phi i64* [ %15, %8 ], [ %1, %3 ]
%10 = phi i32 [ %11, %8 ], [ %2, %3 ]
%11 = add nsw i32 %10, -1
%12 = load i64, i64* %6
%13 = tail call i32 @_LE_to_BE_long(i64 %12)
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %9, i64 1
store i64 %14, i64* %9
%16 = icmp ugt i32 %10, 1
br i1 %16, label %8, label %17
17: ; preds = %8, %3
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int cd(char **args) {
  if (args[1] == NULL) {
    fprintf(stderr, "Error, errno = %d\n", errno);
  }
  return 1;
}


x86 assembly (clang, -O0):
<cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    1149 <cd+0x39>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd>:
push   %rax
cmpq   $0x0,0x8(%rdi)
jne    1136 <cd+0x26>
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Error, errno = %d\0A\00"
@errno = global i32 0
define i32 @cd(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 1
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* @errno
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Error, errno = %d\0A\00"
@errno = global i32 0
define i32 @cd(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i32, i32* @errno
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %1
ret i32 1
}
extern __attribute__((gnu_)) int isascii(int __c) { return !(__c & ~0x7f); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -128
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
signed int f21(signed int v_foo) {
  signed int v_shr = v_foo >> 28;
  signed int v_and = v_shr & 14;
  return v_and;
}


x86 assembly (clang, -O0):
<f21>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1c,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xe,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f21>:
mov    %edi,%eax
shr    $0x1c,%eax
and    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @f21(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 28
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, 14
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @f21(i32 %0) {
%2 = lshr i32 %0, 28
%3 = and i32 %2, 14
ret i32 %3
}
/* Variables and functions */
double exp(double);
double darkinhib(double IRR) {
  double darkinhib;
  if (IRR < 0) {
    darkinhib = 0.;
  } else {
    darkinhib = 0.5 + 0.5 * exp(-IRR * 1.e6 / 10.);
  }
  return darkinhib;
}


x86 assembly (clang, -O0):
<darkinhib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1138 <darkinhib+0x28>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1186 <darkinhib+0x76>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xeb4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe87(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<darkinhib>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    111f <darkinhib+0xf>
xorpd  %xmm0,%xmm0
ret
push   %rax
mulsd  0xed8(%rip),%xmm0
divsd  0xed8(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xed3(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @darkinhib(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %3
br label %14
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
%10 = fmul double %9, 1.000000e+06
%11 = fdiv double %10, 1.000000e+01
%12 = call double @exp(double %11)
%13 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %12, double 5.000000e-01)
store double %13, double* %3
br label %14
14: ; preds = %7, %6
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
define double @darkinhib(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = fmul double %0, -1.000000e+06
%5 = fdiv double %4, 1.000000e+01
%6 = tail call double @exp(double %5)
%7 = tail call double @llvm.fmuladd.f64(double %6, double 5.000000e-01, double 5.000000e-01)
br label %8
8: ; preds = %1, %3
%9 = phi double [ %7, %3 ], [ 0.000000e+00, %1 ]
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ context_load_from_pcb(int /*<<< orphan*/ *);
int /*<<< orphan*/ context_save_to_pcb(int /*<<< orphan*/ *);
int /*<<< orphan*/ elect();
void handle_irq(uint32_t *sp) {
  context_save_to_pcb(sp);
  elect();
  context_load_from_pcb(sp);
}


x86 assembly (clang, -O0):
<handle_irq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <context_save_to_pcb@plt>
mov    $0x0,%al
call   1030 <elect@plt>
mov    -0x8(%rbp),%rdi
call   1050 <context_load_from_pcb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_irq>:
push   %rbx
mov    %rdi,%rbx
call   1040 <context_save_to_pcb@plt>
xor    %eax,%eax
call   1030 <elect@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <context_load_from_pcb@plt>

LLVM IR (-O0):
define void @handle_irq(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @context_save_to_pcb(i32* %3)
%5 = call i32 (...) @elect()
%6 = load i32*, i32** %2
%7 = call i32 @context_load_from_pcb(i32* %6)
ret void
}

LLVM IR (-O2):
define void @handle_irq(i32* %0) {
%2 = tail call i32 @context_save_to_pcb(i32* %0)
%3 = tail call i32 (...) @elect()
%4 = tail call i32 @context_load_from_pcb(i32* %0)
ret void
}
/* Variables and functions */
int are_equal(int *, int *, int);
int /*<<< orphan*/ flip(int *, int, int);
int test_flip_none() {
  int input[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int expected[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  flip(input, 9, 10);
  return are_equal(input, expected, 10);
}


x86 assembly (clang, -O0):
<test_flip_none>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xed8(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
mov    $0xa,%edx
call   1030 <flip@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0xa,%edx
call   1050 <are_equal@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_flip_none>:
push   %rbx
sub    $0x60,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebc(%rip),%xmm1
movaps %xmm1,0x30(%rsp)
mov    %rax,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm1,(%rsp)
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xa,%edx
call   1030 <flip@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <are_equal@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_flip_none.input = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
@__const.test_flip_none.expected = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
define i32 @test_flip_none() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @flip(i32* %5, i32 9, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%9 = call i32 @are_equal(i32* %7, i32* %8, i32 10)
ret i32 %9
}

LLVM IR (-O2):
@__const.test_flip_none.expected = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
define i32 @test_flip_none() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @flip(i32* %5, i32 9, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = call i32 @are_equal(i32* %5, i32* %7, i32 10)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ cmp(int /*<<< orphan*/);
void count_int() {
  int rounds;
  uint64_t vali = 0;
  for (rounds = 0; rounds < 10000; ++rounds) {
    cmp(vali);
    vali++;
  }
}


x86 assembly (clang, -O0):
<count_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jge    1152 <count_int+0x42>
mov    -0x8(%rbp),%edi
call   1030 <cmp@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <count_int+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_int>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <cmp@plt>
add    $0x1,%ebx
cmp    $0x2710,%ebx
jne    1120 <count_int+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @count_int() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10000
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @cmp(i32 %7)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %11
11: ; preds = %6
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @count_int() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @cmp(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 10000
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
double relative_math(double input, double origin, bool absolute) {
  if (absolute)
    return input;
  else
    return input + origin;
}


x86 assembly (clang, -O0):
<relative_math>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     112a <relative_math+0x2a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1139 <relative_math+0x39>
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<relative_math>:
test   %edi,%edi
je     110c <relative_math+0xc>
movsd  0xef4(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @relative_math(double %0, double %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, double %1, double -0.000000e+00
%6 = fadd double %5, %0
ret double %6
}
int guild_check_conflict(int guild_id, int account_id, int char_id) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @guild_check_conflict(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x84() {
  Assert_real((isodigit(132) == 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_isodigit.c",
              665, ("isodigit should be 0 for 0x84"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x84\00"
define void @t_isodigit_0x84() {
%1 = tail call i64 @isodigit(i32 132)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 665, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 222;
  printf("i = %d\n", i);
  printf("i & ~0x31 = %d\n", (i & ~0x31));
  printf("i << 3 = %d\n", (i << 3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xde,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
and    $0xffffffce,%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
shl    $0x3,%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"i = %d\0A\00"
@.str.1 = [16 x i8] c"i & ~0x31 = %d\0A\00"
@.str.2 = [13 x i8] c"i << 3 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 222, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* %1
%5 = and i32 %4, -50
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = shl i32 %7, 3
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"i = %d\0A\00"
@.str.1 = [16 x i8] c"i & ~0x31 = %d\0A\00"
@.str.2 = [13 x i8] c"i << 3 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 222)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 206)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 1776)
ret i32 0
}