xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ gfmiv(int);
scalar_t__ gfmult(int /*<<< orphan*/, int);
int gfpow(scalar_t__);
uint8_t coeffA(uint8_t x, uint8_t y) {
  return gfmult(gfmiv(gfpow(y - x) ^ 1), gfpow(y - x));
}


x86 assembly (clang, -O0):
<coeffA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
call   1050 <gfpow@plt>
mov    %eax,%edi
xor    $0x1,%edi
call   1040 <gfmiv@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
call   1050 <gfpow@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <gfmult@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coeffA>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
sub    %rdi,%rbx
mov    %rbx,%rdi
call   1050 <gfpow@plt>
xor    $0x1,%eax
mov    %eax,%edi
call   1040 <gfmiv@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <gfpow@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <gfmult@plt>

LLVM IR (-O0):
define i64 @coeffA(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = sub nsw i64 %5, %6
%8 = call i32 @gfpow(i64 %7)
%9 = xor i32 %8, 1
%10 = call i32 @gfmiv(i32 %9)
%11 = load i64, i64* %4
%12 = load i64, i64* %3
%13 = sub nsw i64 %11, %12
%14 = call i32 @gfpow(i64 %13)
%15 = call i64 @gfmult(i32 %10, i32 %14)
ret i64 %15
}

LLVM IR (-O2):
define i64 @coeffA(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = tail call i32 @gfpow(i64 %3)
%5 = xor i32 %4, 1
%6 = tail call i32 @gfmiv(i32 %5)
%7 = tail call i32 @gfpow(i64 %3)
%8 = tail call i64 @gfmult(i32 %6, i32 %7)
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void say_hello() { print("Hello, world!"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define void @say_hello() {
%1 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define void @say_hello() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
void Drop(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) {}


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

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

LLVM IR (-O0):
%struct.rt_rtmp_adapter = type opaque
%struct.rt_mlme_queue_elem = type opaque
define void @Drop(%struct.rt_rtmp_adapter* %0, %struct.rt_mlme_queue_elem* %1) {
%3 = alloca %struct.rt_rtmp_adapter*
%4 = alloca %struct.rt_mlme_queue_elem*
store %struct.rt_rtmp_adapter* %0, %struct.rt_rtmp_adapter** %3
store %struct.rt_mlme_queue_elem* %1, %struct.rt_mlme_queue_elem** %4
ret void
}

LLVM IR (-O2):
%struct.rt_rtmp_adapter = type opaque
%struct.rt_mlme_queue_elem = type opaque
define void @Drop(%struct.rt_rtmp_adapter* nocapture %0, %struct.rt_mlme_queue_elem* nocapture %1) {
ret void
}
int sendTCP() { return 0; }


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

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

LLVM IR (-O0):
define i32 @sendTCP() {
ret i32 0
}

LLVM IR (-O2):
define i32 @sendTCP() {
ret i32 0
}
int cmp_lt_ulong(const void *p, const void *q) {
  const unsigned long a = *(const unsigned long *)p;
  const unsigned long b = *(const unsigned long *)q;
  do {
    if (a > b)
      return +1;
    if (b > a)
      return -1;
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<cmp_lt_ulong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    113c <cmp_lt_ulong+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_lt_ulong+0x5d>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1156 <cmp_lt_ulong+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_lt_ulong+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_lt_ulong>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
cmp    %rcx,%rax
sbb    %edx,%edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_lt_ulong(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ugt i64 %4, %6
%8 = icmp ugt i64 %6, %4
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
int ft_str_is_lowercase(char *str) {
  int i;
  int result;
  i = 0;
  result = 1;
  while (str[i]) {
    if (str[i] < 'a' || str[i] > 'z')
      result = 0;
    i++;
  }
  return (result);
}


x86 assembly (clang, -O0):
<ft_str_is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1167 <ft_str_is_lowercase+0x67>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     1152 <ft_str_is_lowercase+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    1159 <ft_str_is_lowercase+0x59>
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <ft_str_is_lowercase+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_lowercase>:
mov    (%rdi),%cl
test   %cl,%cl
je     1135 <ft_str_is_lowercase+0x35>
add    $0x1,%rdi
mov    $0x1,%eax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x85,%cl
cmp    $0xe6,%cl
cmovb  %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <ft_str_is_lowercase+0x20>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ft_str_is_lowercase(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %32
12: ; preds = %5
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp slt i32 %18, 97
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sgt i32 %26, 122
br i1 %27, label %28, label %29
28: ; preds = %20, %12
store i32 0, i32* %4
br label %29
29: ; preds = %28, %20
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %5
32: ; preds = %5
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
define i32 @ft_str_is_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 1, %1 ]
%8 = add i8 %6, -123
%9 = icmp ult i8 %8, -26
%10 = select i1 %9, i32 0, i32 %7
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 1, %1 ], [ %10, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ swap_le32(unsigned int *, unsigned int *);
void swap_le32_num(unsigned int *s, unsigned int *d, int n) {
  int i;
  for (i = 0; i < n; i++, s++, d++)
    swap_le32(s, d);
}


x86 assembly (clang, -O0):
<swap_le32_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1169 <swap_le32_num+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <swap_le32@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    112a <swap_le32_num+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_le32_num>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    1149 <swap_le32_num+0x39>
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <swap_le32@plt>
add    $0x4,%rbp
add    $0x4,%rbx
add    $0xffffffff,%r14d
jne    1130 <swap_le32_num+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @swap_le32_num(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 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32*, i32** %5
%15 = call i32 @swap_le32(i32* %13, i32* %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i32 1
store i32* %20, i32** %4
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i32 1
store i32* %22, i32** %5
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @swap_le32_num(i32* %0, i32* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ 0, %3 ]
%7 = phi i32* [ %11, %5 ], [ %0, %3 ]
%8 = phi i32* [ %12, %5 ], [ %1, %3 ]
%9 = tail call i32 @swap_le32(i32* %7, i32* %8)
%10 = add nuw nsw i32 %6, 1
%11 = getelementptr inbounds i32, i32* %7, i64 1
%12 = getelementptr inbounds i32, i32* %8, i64 1
%13 = icmp eq i32 %10, %2
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret void
}
int futex_wait(int *futex, int val, struct timespec *ts) { return -1; }


x86 assembly (clang, -O0):
<futex_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timespec = type opaque
define i32 @futex_wait(i32* %0, i32 %1, %struct.timespec* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca %struct.timespec*
store i32* %0, i32** %4
store i32 %1, i32* %5
store %struct.timespec* %2, %struct.timespec** %6
ret i32 -1
}

LLVM IR (-O2):
%struct.timespec = type opaque
define i32 @futex_wait(i32* nocapture readnone %0, i32 %1, %struct.timespec* nocapture readnone %2) {
ret i32 -1
}
int fn5(int *x) { return sizeof x; }


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

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

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

LLVM IR (-O2):
define i32 @fn5(i32* nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xc6() {
  Assert_real((isbdigit(198) == 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",
              995, ("isbdigit should be 0 for 0xc6"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xc6>:
push   %rax
mov    $0xc6,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3e3,%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 = [30 x i8] c"isbdigit should be 0 for 0xc6\00"
define void @t_isbdigit_0xc6() {
%1 = call i64 @isbdigit(i32 198)
%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 995, 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xc6\00"
define void @t_isbdigit_0xc6() {
%1 = tail call i64 @isbdigit(i32 198)
%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 995, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void swapArr(float **a, float **b) {
  float *t = *a;
  *a = *b;
  *b = t;
}


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

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

LLVM IR (-O0):
define void @swapArr(float** %0, float** %1) {
%3 = alloca float**
%4 = alloca float**
%5 = alloca float*
store float** %0, float*** %3
store float** %1, float*** %4
%6 = load float**, float*** %3
%7 = load float*, float** %6
store float* %7, float** %5
%8 = load float**, float*** %4
%9 = load float*, float** %8
%10 = load float**, float*** %3
store float* %9, float** %10
%11 = load float*, float** %5
%12 = load float**, float*** %4
store float* %11, float** %12
ret void
}

LLVM IR (-O2):
define void @swapArr(float** nocapture %0, float** nocapture %1) {
%3 = load float*, float** %0
%4 = load float*, float** %1
store float* %4, float** %0
store float* %3, float** %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ExpandCentered_1D(double *, long, double *, double *, long);
int /*<<< orphan*/ ExpandStandard_1D(double *, long, double *, double *, long);
extern void Expand_1D(double In[], long NxIn, double Out[], double h[], long nh,
                      short IsCentered) {
  if (IsCentered)
    ExpandCentered_1D(In, NxIn, Out, h, nh);
  else
    ExpandStandard_1D(In, NxIn, Out, h, nh);
}


x86 assembly (clang, -O0):
<Expand_1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r9w,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %ax,-0x2a(%rbp)
cmpw   $0x0,-0x2a(%rbp)
je     116d <Expand_1D+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <ExpandCentered_1D@plt>
jmp    1186 <Expand_1D+0x66>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <ExpandStandard_1D@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Expand_1D>:
test   %r9w,%r9w
je     112b <Expand_1D+0xb>
jmp    1040 <ExpandCentered_1D@plt>
jmp    1030 <ExpandStandard_1D@plt>

LLVM IR (-O0):
define void @Expand_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4, i16 signext %5) {
%7 = alloca double*
%8 = alloca i64
%9 = alloca double*
%10 = alloca double*
%11 = alloca i64
%12 = alloca i16
store double* %0, double** %7
store i64 %1, i64* %8
store double* %2, double** %9
store double* %3, double** %10
store i64 %4, i64* %11
store i16 %5, i16* %12
%13 = load i16, i16* %12
%14 = icmp ne i16 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %6
%16 = load double*, double** %7
%17 = load i64, i64* %8
%18 = load double*, double** %9
%19 = load double*, double** %10
%20 = load i64, i64* %11
%21 = call i32 @ExpandCentered_1D(double* %16, i64 %17, double* %18, double* %19, i64 %20)
br label %29
22: ; preds = %6
%23 = load double*, double** %7
%24 = load i64, i64* %8
%25 = load double*, double** %9
%26 = load double*, double** %10
%27 = load i64, i64* %11
%28 = call i32 @ExpandStandard_1D(double* %23, i64 %24, double* %25, double* %26, i64 %27)
br label %29
29: ; preds = %22, %15
ret void
}

LLVM IR (-O2):
define void @Expand_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4, i16 signext %5) {
%7 = icmp eq i16 %5, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @ExpandCentered_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4)
br label %12
10: ; preds = %6
%11 = tail call i32 @ExpandStandard_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4)
br label %12
12: ; preds = %10, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_haml_comment() {
  test_parser_verify_parse(test_parser_sourcefile("haml", "/ comment"), "haml",
                           "", "/ comment", 0);
}


x86 assembly (clang, -O0):
<test_haml_comment>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xeb7(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_haml_comment>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
lea    0xed3(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xec0(%rip),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rcx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"haml\00"
@.str.1 = [10 x i8] c"/ comment\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_haml_comment() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"haml\00"
@.str.1 = [10 x i8] c"/ comment\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_haml_comment() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeDIVSCLK(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000002);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeDIVSCLK>:
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    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeDIVSCLK>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeDIVSCLK(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeDIVSCLK(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
/* Type definitions */
struct _tuple6 {
  int dummy;
};
struct Cyc_Sexp_Parser {
  int dummy;
};

/* Variables and functions */
struct _tuple6 *Cyc_Sexp_mk_ulonglong(unsigned long long);
unsigned long long Cyc_Sexp_parse_longlong(struct Cyc_Sexp_Parser *);
struct _tuple6 *Cyc_Sexp_parse_ulonglong(struct Cyc_Sexp_Parser *p) {
  unsigned long long _T0;
  struct _tuple6 *_T1;
  _T0 = Cyc_Sexp_parse_longlong(p);
  _T1 = Cyc_Sexp_mk_ulonglong(_T0);
  return _T1;
}


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

x86 assembly (clang, -O2):
<Cyc_Sexp_parse_ulonglong>:
push   %rax
call   1030 <Cyc_Sexp_parse_longlong@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <Cyc_Sexp_mk_ulonglong@plt>

LLVM IR (-O0):
%struct._tuple6 = type { i32 }
%struct.Cyc_Sexp_Parser = type { i32 }
define %struct._tuple6* @Cyc_Sexp_parse_ulonglong(%struct.Cyc_Sexp_Parser* %0) {
%2 = alloca %struct.Cyc_Sexp_Parser*
%3 = alloca i64
%4 = alloca %struct._tuple6*
store %struct.Cyc_Sexp_Parser* %0, %struct.Cyc_Sexp_Parser** %2
%5 = load %struct.Cyc_Sexp_Parser*, %struct.Cyc_Sexp_Parser** %2
%6 = call i64 @Cyc_Sexp_parse_longlong(%struct.Cyc_Sexp_Parser* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = call %struct._tuple6* @Cyc_Sexp_mk_ulonglong(i64 %7)
store %struct._tuple6* %8, %struct._tuple6** %4
%9 = load %struct._tuple6*, %struct._tuple6** %4
ret %struct._tuple6* %9
}

LLVM IR (-O2):
%struct._tuple6 = type { i32 }
%struct.Cyc_Sexp_Parser = type { i32 }
define %struct._tuple6* @Cyc_Sexp_parse_ulonglong(%struct.Cyc_Sexp_Parser* %0) {
%2 = tail call i64 @Cyc_Sexp_parse_longlong(%struct.Cyc_Sexp_Parser* %0)
%3 = tail call %struct._tuple6* @Cyc_Sexp_mk_ulonglong(i64 %2)
ret %struct._tuple6* %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ do_cube(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int main(int argc, char *argv[]) {
  static int num = 6;
  char *ptr;
  ptr = malloc(1024);
  do_cube(num);
  free(ptr);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2ed6(%rip),%edi
call   1040 <do_cube@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    $0x6,%edi
call   1040 <do_cube@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@main.num = internal global i32 6
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @malloc(i32 1024)
store i8* %7, i8** %6
%8 = load i32, i32* @main.num
%9 = call i32 @do_cube(i32 %8)
%10 = load i8*, i8** %6
%11 = call i32 @free(i8* %10)
%12 = load i32, i32* @EXIT_SUCCESS
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%4 = tail call i32 @do_cube(i32 6)
%5 = tail call i32 @free(i8* %3)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void test_min() { assert(((1) <= (2) ? (1) : (2)) == 1); }


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

x86 assembly (clang, -O2):
<test_min>:
mov    $0x1,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @test_min() {
%1 = call i32 @assert(i32 1)
ret void
}

LLVM IR (-O2):
define void @test_min() {
%1 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
void v_kclr(int /*<<< orphan*/);
int /*<<< orphan*/ v_lookup(int, char const *);
void v_clr(int vs, const char *name) { return v_kclr(v_lookup(vs, name)); }


x86 assembly (clang, -O0):
<v_clr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <v_lookup@plt>
mov    %eax,%edi
call   1030 <v_kclr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_clr>:
push   %rax
call   1040 <v_lookup@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <v_kclr@plt>

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

LLVM IR (-O2):
define void @v_clr(i32 %0, i8* %1) {
%3 = tail call i32 @v_lookup(i32 %0, i8* %1)
tail call void @v_kclr(i32 %3)
ret void
}
const char *skip_decimal(const char *str) {
  if (str) {
    if (*str == '.')
      str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<skip_decimal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <skip_decimal+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    112f <skip_decimal+0x2f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <skip_decimal+0x34>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_decimal>:
xor    %eax,%eax
test   %rdi,%rdi
je     1110 <skip_decimal+0x10>
cmpb   $0x2e,(%rdi)
sete   %al
add    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @skip_decimal(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 46
%6 = zext i1 %5 to i64
%7 = getelementptr i8, i8* %0, i64 %6
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %7, %3 ]
ret i8* %9
}
void delay() {
  volatile int i;
  for (i = 0; i < 1000; i++)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x3e8,%eax
jge    112c <delay+0x2c>
jmp    111e <delay+0x1e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x3e7,%eax
jg     1130 <delay+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x3e8,%eax
jl     1120 <delay+0x20>
ret

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
store volatile i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load volatile i32, i32* %1
%4 = icmp slt i32 %3, 1000
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load volatile i32, i32* %1
%8 = add nsw i32 %7, 1
store volatile i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp slt i32 %3, 1000
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load volatile i32, i32* %1
%7 = add nsw i32 %6, 1
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %1
%9 = icmp slt i32 %8, 1000
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret void
}
int f06(f06a01, f06a02)
unsigned short int f06a01, **f06a02;
{ return 0; }


x86 assembly (clang, -O0):
<f06>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f06(i32 %0, i16** %1) {
%3 = alloca i16
%4 = alloca i16**
%5 = trunc i32 %0 to i16
store i16 %5, i16* %3
store i16** %1, i16*** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @f06(i32 %0, i16** nocapture readnone %1) {
ret i32 0
}
__attribute__((noreturn)) void abort(void) {
  __asm__ __volatile__("cli; hlt");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
cli
hlt
jmp    1106 <abort+0x6>

x86 assembly (clang, -O2):
<abort>:
cli
hlt
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1110 <abort+0x10>

LLVM IR (-O0):
define void @abort() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @abort() {
tail call void asm sideeffect "cli; hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned long int int_hash(const int *p) { return 3 & *p; }


x86 assembly (clang, -O0):
<int_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x3,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_hash>:
mov    (%rdi),%eax
and    $0x3,%eax
ret

LLVM IR (-O0):
define i64 @int_hash(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 3, %4
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @int_hash(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 3
%4 = zext i32 %3 to i64
ret i64 %4
}
void swap_double(double *a, double *b) {
  double t;
  t = *a;
  *a = *b;
  *b = t;
}


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

x86 assembly (clang, -O2):
<swap_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  %xmm1,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @swap_double(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
store double %7, double* %5
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double, double* %5
%12 = load double*, double** %4
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @swap_double(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BFS1();
int /*<<< orphan*/ BFS2();
int /*<<< orphan*/ Construct();
int main(void) {
  Construct();
  BFS1();
  BFS2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <Construct@plt>
mov    $0x0,%al
call   1050 <BFS1@plt>
mov    $0x0,%al
call   1030 <BFS2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Construct()
%3 = call i32 (...) @BFS1()
%4 = call i32 (...) @BFS2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Construct()
%2 = tail call i32 (...) @BFS1()
%3 = tail call i32 (...) @BFS2()
ret i32 0
}
/* Variables and functions */
int read(int, unsigned char *, int);
unsigned char imu_waitByte(int fd) {
  unsigned char rxb[1];
  while (read(fd, rxb, 1) != 1)
    ;
  return rxb[0];
}


x86 assembly (clang, -O0):
<imu_waitByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     113a <imu_waitByte+0x2a>
jmp    111b <imu_waitByte+0xb>
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imu_waitByte>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x7(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    1120 <imu_waitByte+0x10>
mov    0x7(%rsp),%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define zeroext i8 @imu_waitByte(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i8]
store i32 %0, i32* %2
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %2
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%7 = call i32 @read(i32 %5, i8* %6, i32 1)
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %4
br label %4
10: ; preds = %4
%11 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%12 = load i8, i8* %11
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @imu_waitByte(i32 %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %4, %1
%5 = call i32 @read(i32 %0, i8* %3, i32 1)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = load i8, i8* %3
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ monitor_put(char);
void monitor_write(char *c) {
  int counter = 0;
  while (c[counter]) {
    monitor_put(c[counter++]);
  }
}


x86 assembly (clang, -O0):
<monitor_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <monitor_write+0x45>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <monitor_put@plt>
jmp    1123 <monitor_write+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monitor_write>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <monitor_write+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <monitor_put@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <monitor_write+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @monitor_write(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = add nuw i64 %5, 1
%8 = tail call i32 @monitor_put(i8 signext %6)
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ same_screen;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
int get_XButtonPressedEvent_same_screen(void *_p) {
  return (int)((XButtonPressedEvent *)_p)->same_screen;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XButtonPressedEvent_same_screen(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ listen(int, int);
int /*<<< orphan*/ perror(char *);
bool listen_unix_stream_socket(int sock, int cnt) {
  if (listen(sock, cnt) < 0) {
    perror("Error - listen_unix_stream_socket() - listen::");
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<listen_unix_stream_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <listen@plt>
cmp    $0x0,%rax
jge    115b <listen_unix_stream_socket+0x3b>
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    1162 <listen_unix_stream_socket+0x42>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listen_unix_stream_socket>:
push   %rax
call   1030 <listen@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
js     1135 <listen_unix_stream_socket+0x15>
pop    %rcx
ret
lea    0xec4(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Error - listen_unix_stream_socket() - listen::\00"
define i32 @listen_unix_stream_socket(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i64 @listen(i32 %6, i32 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %13
12: ; preds = %2
store i32 1, i32* %3
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [47 x i8] c"Error - listen_unix_stream_socket() - listen::\00"
define i32 @listen_unix_stream_socket(i32 %0, i32 %1) {
%3 = tail call i64 @listen(i32 %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %8
}
int il_free(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @il_free() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @il_free() {
ret i32 -1
}
/* Variables and functions */
int add_one(int *);
int /*<<< orphan*/ printf(char *, int);
int sum_num(int, int);
int main() {
  int x = 1;
  int y = 2;
  printf("sum_num(x,y) = %d\n", sum_num(x, y));
  printf("sum_num(NUM,10) = %d\n", sum_num(5, 10));
  printf("add_one(&x) = %d\n", add_one(&x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <sum_num@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0xa,%esi
call   1050 <sum_num@plt>
mov    %eax,%esi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1030 <add_one@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <sum_num@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0xa,%esi
call   1050 <sum_num@plt>
lea    0xea7(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1030 <add_one@plt>
lea    0xea5(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"sum_num(x,y) = %d\0A\00"
@.str.1 = [22 x i8] c"sum_num(NUM,10) = %d\0A\00"
@.str.2 = [18 x i8] c"add_one(&x) = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @sum_num(i32 %4, i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @sum_num(i32 5, i32 10)
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @add_one(i32* %2)
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"sum_num(x,y) = %d\0A\00"
@.str.1 = [22 x i8] c"sum_num(NUM,10) = %d\0A\00"
@.str.2 = [18 x i8] c"add_one(&x) = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = tail call i32 @sum_num(i32 1, i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @sum_num(i32 5, i32 10)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 @add_one(i32* %1)
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t unpack_int32(uint8_t *buf) {
  return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
}


x86 assembly (clang, -O0):
<unpack_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_int32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @unpack_int32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = or i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @unpack_int32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}