xunge/DecIR huggingface dataset:
int power(int a, unsigned int n, int p) {
  int res = 1;
  a = a % p;
  while (n > 0) {
    if (n & 1)
      res = (res * a) % p;
    n = n >> 1;
    a = (a * a) % p;
  }
  return res;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1161 <power+0x61>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1145 <power+0x45>
mov    -0x10(%rbp),%eax
imul   -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x4(%rbp)
jmp    111e <power+0x1e>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %esi,%esi
je     113c <power+0x3c>
mov    %edx,%r8d
mov    $0x1,%ecx
jmp    111e <power+0x1e>
xchg   %ax,%ax
mov    %esi,%eax
shr    %eax
imul   %edi,%edi
cmp    $0x1,%esi
mov    %eax,%esi
jbe    1139 <power+0x39>
mov    %edi,%eax
cltd
idiv   %r8d
mov    %edx,%edi
test   $0x1,%sil
je     1110 <power+0x10>
imul   %edi,%ecx
mov    %ecx,%eax
cltd
idiv   %r8d
mov    %edx,%ecx
jmp    1110 <power+0x10>
mov    %ecx,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @power(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 1, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = srem i32 %8, %9
store i32 %10, i32* %4
br label %11
11: ; preds = %24, %3
%12 = load i32, i32* %5
%13 = icmp ugt i32 %12, 0
br i1 %13, label %14, label %32
14: ; preds = %11
%15 = load i32, i32* %5
%16 = and i32 %15, 1
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load i32, i32* %7
%20 = load i32, i32* %4
%21 = mul nsw i32 %19, %20
%22 = load i32, i32* %6
%23 = srem i32 %21, %22
store i32 %23, i32* %7
br label %24
24: ; preds = %18, %14
%25 = load i32, i32* %5
%26 = lshr i32 %25, 1
store i32 %26, i32* %5
%27 = load i32, i32* %4
%28 = load i32, i32* %4
%29 = mul nsw i32 %27, %28
%30 = load i32, i32* %6
%31 = srem i32 %29, %30
store i32 %31, i32* %4
br label %11
32: ; preds = %11
%33 = load i32, i32* %7
ret i32 %33
}

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %20, label %5
5: ; preds = %3, %15
%6 = phi i32 [ %18, %15 ], [ %0, %3 ]
%7 = phi i32 [ %16, %15 ], [ 1, %3 ]
%8 = phi i32 [ %17, %15 ], [ %1, %3 ]
%9 = srem i32 %6, %2
%10 = and i32 %8, 1
%11 = icmp eq i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %5
%13 = mul nsw i32 %9, %7
%14 = srem i32 %13, %2
br label %15
15: ; preds = %12, %5
%16 = phi i32 [ %14, %12 ], [ %7, %5 ]
%17 = lshr i32 %8, 1
%18 = mul nsw i32 %9, %9
%19 = icmp ult i32 %8, 2
br i1 %19, label %20, label %5
20: ; preds = %15, %3
%21 = phi i32 [ 1, %3 ], [ %16, %15 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x27() {
  Assert_real((isbdigit(39) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              200, ("isbdigit should be 0 for '"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for '\00"
define void @t_isbdigit_0x27() {
%1 = call i64 @isbdigit(i32 39)
%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 200, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for '\00"
define void @t_isbdigit_0x27() {
%1 = tail call i64 @isbdigit(i32 39)
%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 200, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(void const *);
int aux_cmp(const void *x, const void *y) {
  assert(x);
  assert(y);
  const int *xi = (const int *)x;
  const int *yi = (const int *)y;
  return (*xi - *yi);
}


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

x86 assembly (clang, -O2):
<aux_cmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %r14,%rdi
call   1030 <assert@plt>
mov    (%rbx),%eax
sub    (%r14),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @aux_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @assert(i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @assert(i8* %9)
%11 = load i8*, i8** %3
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %5
%13 = load i8*, i8** %4
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %6
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = sub nsw i32 %16, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @aux_cmp(i8* %0, i8* %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i32 @assert(i8* %1)
%5 = bitcast i8* %0 to i32*
%6 = bitcast i8* %1 to i32*
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = sub nsw i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
int /*<<< orphan*/ usleep(int);
void write_float(void) {
  gpio_set(27, 1);
  usleep((4 * 80));
  gpio_set(27, 0);
  usleep((12 * 80));
  gpio_set(27, 1);
  usleep((12 * 80));
  gpio_set(27, 0);
  usleep((4 * 80));
}


x86 assembly (clang, -O0):
<write_float>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x140,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
mov    $0x3c0,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x3c0,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
mov    $0x140,%edi
call   1040 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_float>:
push   %rax
mov    $0x1b,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x140,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
mov    $0x3c0,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x3c0,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
mov    $0x140,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @write_float() {
%1 = call i32 @gpio_set(i32 27, i32 1)
%2 = call i32 @usleep(i32 320)
%3 = call i32 @gpio_set(i32 27, i32 0)
%4 = call i32 @usleep(i32 960)
%5 = call i32 @gpio_set(i32 27, i32 1)
%6 = call i32 @usleep(i32 960)
%7 = call i32 @gpio_set(i32 27, i32 0)
%8 = call i32 @usleep(i32 320)
ret void
}

LLVM IR (-O2):
define void @write_float() {
%1 = tail call i32 @gpio_set(i32 27, i32 1)
%2 = tail call i32 @usleep(i32 320)
%3 = tail call i32 @gpio_set(i32 27, i32 0)
%4 = tail call i32 @usleep(i32 960)
%5 = tail call i32 @gpio_set(i32 27, i32 1)
%6 = tail call i32 @usleep(i32 960)
%7 = tail call i32 @gpio_set(i32 27, i32 0)
%8 = tail call i32 @usleep(i32 320)
ret void
}
/* Variables and functions */
int get_line(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  while ((len = get_line(line, 1000)) > 0)
    printf("%s\n", line);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1167 <main+0x47>
lea    -0x3f0(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jle    116c <main+0x4c>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_line(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i32 @get_line(i8* %2, i32 1000)
%8 = icmp sgt i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
void fd245(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
p0C:
  goto p0C;
  goto a;
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd245>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd245+0x7>

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

LLVM IR (-O0):
define void @fd245(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; No predecessors!
%32 = load i32, i32* %2
%33 = zext i32 %32 to i64
br label %34
34: ; preds = %34, %31
br label %34
35: ; preds = %35
br label %35
36: ; No predecessors!
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
br label %39
39: ; preds = %39, %36
br label %39
40: ; preds = %40
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd245(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ consumer_create();
int /*<<< orphan*/ q_create();
void dsp_start() {
  q_create();
  consumer_create();
}


x86 assembly (clang, -O0):
<dsp_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <q_create@plt>
mov    $0x0,%al
call   1040 <consumer_create@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsp_start>:
push   %rax
xor    %eax,%eax
call   1030 <q_create@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <consumer_create@plt>

LLVM IR (-O0):
define void @dsp_start() {
%1 = call i32 (...) @q_create()
%2 = call i32 (...) @consumer_create()
ret void
}

LLVM IR (-O2):
define void @dsp_start() {
%1 = tail call i32 (...) @q_create()
%2 = tail call i32 (...) @consumer_create()
ret void
}
unsigned replace_byte(unsigned x, int i, unsigned char b) {
  int bytenum = i << 3;
  return (x & ~(0xFF << bytenum)) | (b << bytenum);
}


x86 assembly (clang, -O0):
<replace_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
mov    $0xff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0x9(%rbp),%edx
mov    -0x10(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace_byte>:
lea    0x0(,%rsi,8),%ecx
mov    $0xff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
shl    %cl,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @replace_byte(i32 %0, i32 %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i32, i32* %5
%9 = shl i32 %8, 3
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i32, i32* %7
%12 = shl i32 255, %11
%13 = xor i32 %12, -1
%14 = and i32 %10, %13
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i32, i32* %7
%18 = shl i32 %16, %17
%19 = or i32 %14, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @replace_byte(i32 %0, i32 %1, i8 zeroext %2) {
%4 = shl i32 %1, 3
%5 = shl i32 255, %4
%6 = xor i32 %5, -1
%7 = and i32 %6, %0
%8 = zext i8 %2 to i32
%9 = shl i32 %8, %4
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void startDescribeFunVerbose(const char *descr) {
  fputs("Describe: ", stdout);
  fputs(descr, stdout);
  fputs("\n", stdout);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<startDescribeFunVerbose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xea8(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startDescribeFunVerbose>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
lea    0xeb9(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Describe: \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @startDescribeFunVerbose(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Describe: \00"
@stdout = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @startDescribeFunVerbose(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
ret void
}
short f2(short *p, int i) { return p[i]; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
movslq %esi,%rax
movzwl (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define signext i16 @f2(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
store i16* %0, i16** %3
store i32 %1, i32* %4
%5 = load i16*, i16** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i16, i16* %5, i64 %7
%9 = load i16, i16* %8
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @f2(i16* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i16, i16* %0, i64 %3
%5 = load i16, i16* %4
ret i16 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long white_pixel;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_white_pixel(void *_p, unsigned long _v) {
  ((Screen *)_p)->white_pixel = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_Screen_white_pixel(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_Screen_white_pixel(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int fts3isspace(char c) {
  return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\v' ||
         c == '\f';
}


x86 assembly (clang, -O0):
<fts3isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1171 <fts3isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1171 <fts3isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1171 <fts3isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1171 <fts3isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     1171 <fts3isspace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0xc,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fts3isspace>:
cmp    $0x20,%dil
ja     1120 <fts3isspace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002e00,%rdx
bt     %rcx,%rdx
jae    1120 <fts3isspace+0x20>
ret
xor    %eax,%eax
cmp    $0xc,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @fts3isspace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 13
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 11
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 12
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @fts3isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 11, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 12
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int max_byte1;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_max_byte1(void *_p, unsigned _v) {
  ((XFontStruct *)_p)->max_byte1 = (unsigned)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_max_byte1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XFontStruct_max_byte1(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XFontStruct_max_byte1(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void CyBle_DisInit(void) {}


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

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

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

LLVM IR (-O2):
define void @CyBle_DisInit() {
ret void
}
/* Variables and functions */
short msdb_communityPurge();
short community_deleteAllCommunities() { return msdb_communityPurge(); }


x86 assembly (clang, -O0):
<community_deleteAllCommunities>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <msdb_communityPurge@plt>
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<community_deleteAllCommunities>:
xor    %eax,%eax
jmp    1030 <msdb_communityPurge@plt>

LLVM IR (-O0):
define signext i16 @community_deleteAllCommunities() {
%1 = call signext i16 (...) @msdb_communityPurge()
ret i16 %1
}

LLVM IR (-O2):
define signext i16 @community_deleteAllCommunities() {
%1 = tail call signext i16 (...) @msdb_communityPurge()
ret i16 %1
}
int point(char *s) { return ((long)s >= 128 || (long)s < 0); }


x86 assembly (clang, -O0):
<point>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmp    $0x80,%rcx
mov    %al,-0x9(%rbp)
jge    112c <point+0x2c>
mov    -0x8(%rbp),%rax
cmp    $0x0,%rax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<point>:
cmp    $0x7f,%rdi
setg   %al
test   %rdi,%rdi
sets   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @point(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = icmp sge i64 %4, 128
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = ptrtoint i8* %7 to i64
%9 = icmp slt i64 %8, 0
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 @point(i8* readnone %0) {
%2 = icmp sgt i8* %0, inttoptr (i64 127 to i8*)
%3 = icmp slt i8* %0, null
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int hex_digit(int c) {
  if (c >= '0' && c <= '9')
    return c - '0';
  if (c >= 'a' && c <= 'f')
    return c - 'a' + 10;
  return -1;
}


x86 assembly (clang, -O0):
<hex_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <hex_digit+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <hex_digit+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <hex_digit+0x55>
cmpl   $0x61,-0x8(%rbp)
jl     114e <hex_digit+0x4e>
cmpl   $0x66,-0x8(%rbp)
jg     114e <hex_digit+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <hex_digit+0x55>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_digit>:
lea    -0x61(%rdi),%eax
lea    -0x57(%rdi),%ecx
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
lea    -0x30(%rdi),%ecx
cmp    $0xa,%ecx
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hex_digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = add i32 %0, -97
%5 = icmp ult i32 %4, 6
%6 = add nsw i32 %0, -87
%7 = select i1 %5, i32 %6, i32 -1
%8 = select i1 %3, i32 %2, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ host_name;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_working_directory();
char *getenv(char *);
int /*<<< orphan*/ gethostname(char *, int);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void display_prompt() {
  char *working_directory = get_working_directory();
  char host_name[16];
  gethostname(host_name, sizeof(host_name));
  printf("[%s@%s %s]$ ", getenv("USER"), host_name, working_directory);
  free(working_directory);
}


x86 assembly (clang, -O0):
<display_prompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1050 <get_working_directory@plt>
mov    %rax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x10,%esi
call   1070 <gethostname@plt>
lea    0xe95(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xe71(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_prompt>:
push   %r14
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1050 <get_working_directory@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x10,%esi
call   1070 <gethostname@plt>
lea    0xe95(%rip),%rdi
call   1030 <getenv@plt>
lea    0xe7c(%rip),%rdi
mov    %rax,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"[%s@%s %s]$ \00"
@.str.1 = [5 x i8] c"USER\00"
define void @display_prompt() {
%1 = alloca i8*
%2 = alloca [16 x i8]
%3 = call i8* (...) @get_working_directory()
store i8* %3, i8** %1
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @gethostname(i8* %4, i32 16)
%6 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%8 = load i8*, i8** %1
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7, i8* %8)
%10 = load i8*, i8** %1
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[%s@%s %s]$ \00"
@.str.1 = [5 x i8] c"USER\00"
define void @display_prompt() {
%1 = alloca [16 x i8]
%2 = tail call i8* (...) @get_working_directory()
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%4 = call i32 @gethostname(i8* %3, i32 16)
%5 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %3, i8* %2)
%7 = call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ round(double);
long long int llround(double x) { return (long long int)round(x); }


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

x86 assembly (clang, -O2):
<llround>:
jmp    1030 <round@plt>

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

LLVM IR (-O2):
define i64 @llround(double %0) {
%2 = tail call i64 @round(double %0)
ret i64 %2
}
/* Type definitions */
typedef scalar_t__ pthread_t;

/* Variables and functions */
extern int pthread_equal(pthread_t pthread, pthread_t pthread2) {
  return pthread == pthread2;
}


x86 assembly (clang, -O0):
<pthread_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @pthread_equal(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 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @pthread_equal(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int umax(unsigned int a, unsigned int b) { return (a < b) ? b : a; }


x86 assembly (clang, -O0):
<umax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <umax+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <umax+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umax>:
mov    %edi,%eax
cmp    %esi,%edi
cmovb  %esi,%eax
ret

LLVM IR (-O0):
define i32 @umax(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 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @umax(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void revinplc2(void *in) {
  unsigned char tmp;
  tmp = ((unsigned char *)in)[0];
  ((unsigned char *)in)[0] = ((unsigned char *)in)[1];
  ((unsigned char *)in)[1] = tmp;
}


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

x86 assembly (clang, -O2):
<revinplc2>:
rolw   $0x8,(%rdi)
ret

LLVM IR (-O0):
define void @revinplc2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8, i8* %3
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @revinplc2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
ret void
}
void g_tree_lookup() {}


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

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

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

LLVM IR (-O2):
define void @g_tree_lookup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printUpper(char *);
int /*<<< orphan*/ printUpperP(char *);
int main() {
  char *test = "Fulano de_tal-cicrano";
  printUpper(test);
  printUpperP(test);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printUpper@plt>
mov    %rbx,%rdi
call   1040 <printUpperP@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Fulano de_tal-cicrano\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printUpper(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printUpperP(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Fulano de_tal-cicrano\00"
define i32 @main() {
%1 = tail call i32 @printUpper(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printUpperP(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void PrintUsage() {
  puts("Usage: (-d | -c) <file.cpk> [<-t> <desc.txt>] [<-o> <dir>]\n"
       "\t-d decompress / unpack specified CPK file\n"
       "\t-c compress / repack specified CPK file\n"
       "\t-t CPK description file (if not specified, default filename is used\n"
       "\t-o CPK files path (if not specified, default path is used\n");
}


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

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

LLVM IR (-O0):
@.str = [272 x i8] c"Usage: (-d | -c) <file.cpk> [<-t> <desc.txt>] [<-o> <dir>]\0A\09-d decompress / unpack specified CPK file\0A\09-c compress / repack specified CPK file\0A\09-t CPK description file (if not specified, default filename is used\0A\09-o CPK files path (if not specified, default path is used\0A\00"
define void @PrintUsage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([272 x i8], [272 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [272 x i8] c"Usage: (-d | -c) <file.cpk> [<-t> <desc.txt>] [<-o> <dir>]\0A\09-d decompress / unpack specified CPK file\0A\09-c compress / repack specified CPK file\0A\09-t CPK description file (if not specified, default filename is used\0A\09-o CPK files path (if not specified, default path is used\0A\00"
define void @PrintUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([272 x i8], [272 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ err_msg(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int write(int, void const *, size_t);
ssize_t Write(int sockfd, const void *buff, size_t count) {
  ssize_t n;
  if ((n = write(sockfd, buff, count)) == -1) {
    err_msg("error writing socket: %s", strerror(errno));
    exit(EXIT_FAILURE);
  }
  return n;
}


x86 assembly (clang, -O0):
<Write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
jne    1199 <Write+0x59>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    %eax,%esi
lea    0xe7a(%rip),%rdi
call   1040 <err_msg@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write>:
push   %rax
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     114d <Write+0xd>
pop    %rcx
ret
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe9e(%rip),%rdi
mov    %eax,%esi
call   1040 <err_msg@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"error writing socket: %s\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @Write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @write(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %19
13: ; preds = %3
%14 = load i32, i32* @errno
%15 = call i32 @strerror(i32 %14)
%16 = call i32 @err_msg(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %3
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@.str = [25 x i8] c"error writing socket: %s\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @Write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* @errno
%8 = tail call i32 @strerror(i32 %7)
%9 = tail call i32 @err_msg(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int RetournerInformationConfigIndex(char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *);
void testRetournerInformationConfigIndex() {
  char *parametreALire;
  char *index;
  char *valeurDefaut;
  char *resultat;
  int result = RetournerInformationConfigIndex(parametreALire, index,
                                               valeurDefaut, resultat);
  if (1) {
    printf(
        "%%TEST_FAILED%% time=0 testname=testRetournerInformationConfigIndex "
        "(Test_gestioncommandes) message=error message sample\n");
  }
}


x86 assembly (clang, -O0):
<testRetournerInformationConfigIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <RetournerInformationConfigIndex@plt>
mov    %eax,-0x24(%rbp)
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testRetournerInformationConfigIndex>:
push   %rax
call   1040 <RetournerInformationConfigIndex@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [122 x i8] c"%%TEST_FAILED%% time=0 testname=testRetournerInformationConfigIndex (Test_gestioncommandes) message=error message sample\0A\00"
define void @testRetournerInformationConfigIndex() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = load i8*, i8** %1
%7 = load i8*, i8** %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @RetournerInformationConfigIndex(i8* %6, i8* %7, i8* %8, i8* %9)
store i32 %10, i32* %5
%11 = call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [122 x i8] c"%%TEST_FAILED%% time=0 testname=testRetournerInformationConfigIndex (Test_gestioncommandes) message=error message sample\0A\00"
define void @testRetournerInformationConfigIndex() {
%1 = tail call i32 @RetournerInformationConfigIndex(i8* undef, i8* undef, i8* undef, i8* undef)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int **, int *, int);
int main(void) {
  int a;
  int *p;
  printf("a = %d,  &p = %p,  p = %p,  *p = %d\n", a, &p, p, *p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    (%rax),%r8d
lea    0xecc(%rip),%rdi
lea    -0x10(%rbp),%rdx
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    %rsp,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [37 x i8] c"a = %d, &p = %p, p = %p, *p = %d\0A\00"
define i32 @main() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 undef, i32** %1, i32* undef, i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ deconstructor();
void termination_handler(int signum) { deconstructor(); }


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

x86 assembly (clang, -O2):
<termination_handler>:
xor    %eax,%eax
jmp    1030 <deconstructor@plt>

LLVM IR (-O0):
define void @termination_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @deconstructor()
ret void
}

LLVM IR (-O2):
define void @termination_handler(i32 %0) {
%2 = tail call i32 (...) @deconstructor()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ set_ticker(int /*<<< orphan*/);
void Wrap_Up() {
  set_ticker(0);
  getchar();
  endwin();
  exit(0);
}


x86 assembly (clang, -O0):
<Wrap_Up>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <set_ticker@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<Wrap_Up>:
push   %rax
xor    %edi,%edi
call   1040 <set_ticker@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @Wrap_Up() {
%1 = call i32 @set_ticker(i32 0)
%2 = call i32 (...) @getchar()
%3 = call i32 (...) @endwin()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Wrap_Up() {
%1 = tail call i32 @set_ticker(i32 0)
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 (...) @endwin()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void phoneFriend() { printf("Phoning friend!"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Phoning friend!\00"
define void @phoneFriend() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Phoning friend!\00"
define void @phoneFriend() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
double inchesToCentimetres(double inches) { return inches * 2.54; }


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

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

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

LLVM IR (-O2):
define double @inchesToCentimetres(double %0) {
%2 = fmul double %0, 2.540000e+00
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __sighandler_t;

/* Variables and functions */
int /*<<< orphan*/ SA_RESETHAND;
int /*<<< orphan*/ __signal(int, int /*<<< orphan*/, int /*<<< orphan*/);
__sighandler_t sysv_signal(int signum, __sighandler_t handler) {
  return __signal(signum, handler, SA_RESETHAND);
}


x86 assembly (clang, -O0):
<sysv_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
call   1030 <__signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysv_signal>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <__signal@plt>

LLVM IR (-O0):
@SA_RESETHAND = global i32 0
define i32 @sysv_signal(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 = load i32, i32* @SA_RESETHAND
%8 = call i32 @__signal(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SA_RESETHAND = global i32 0
define i32 @sysv_signal(i32 %0, i32 %1) {
%3 = load i32, i32* @SA_RESETHAND
%4 = tail call i32 @__signal(i32 %0, i32 %1, i32 %3)
ret i32 %4
}