xunge/DecIR huggingface dataset:
int BLNK_QuickHashName(char *name) {
  char *s;
  int i, hi;
  i = 0;
  s = name;
  while (*s)
    i = i * 251 + (*s++);
  hi = ((i * 251) >> 8) & 0xFFF;
  return (hi);
}


x86 assembly (clang, -O0):
<BLNK_QuickHashName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <BLNK_QuickHashName+0x47>
imul   $0xfb,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <BLNK_QuickHashName+0x17>
imul   $0xfb,-0x14(%rbp),%eax
sar    $0x8,%eax
and    $0xfff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLNK_QuickHashName>:
mov    (%rdi),%cl
test   %cl,%cl
je     112f <BLNK_QuickHashName+0x2f>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %eax,%ecx
imul   $0xfb,%ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <BLNK_QuickHashName+0x10>
shr    $0x8,%eax
and    $0xfff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @BLNK_QuickHashName(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = sext i8 %5 to i32
%10 = add nsw i32 %7, %9
%11 = mul i32 %10, 251
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = lshr i32 %11, 8
%16 = and i32 %15, 4095
br label %17
17: ; preds = %14, %1
%18 = phi i32 [ 0, %1 ], [ %16, %14 ]
ret i32 %18
}
/* Variables and functions */
scalar_t__ readline(char *, size_t);
int strtol(char *, int /*<<< orphan*/ *, int);
int readnum(char *buf, size_t buf_size) {
  if (readline(buf, buf_size))
    return -1;
  return strtol(&buf[0], NULL, 10);
}


x86 assembly (clang, -O0):
<readnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <readline@plt>
cmp    $0x0,%rax
je     1153 <readnum+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <readnum+0x48>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readnum>:
push   %rbx
mov    %rdi,%rbx
call   1030 <readline@plt>
test   %rax,%rax
je     1135 <readnum+0x15>
mov    $0xffffffff,%eax
pop    %rbx
ret
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
pop    %rbx
jmp    1040 <strtol@plt>

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

LLVM IR (-O2):
define i32 @readnum(i8* %0, i64 %1) {
%3 = tail call i64 @readline(i8* %0, i64 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @strtol(i8* nocapture %0, i32* null, i32 10)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ read_num_from_file(char *, int *);
int inotifytools_get_max_queued_events() {
  int ret;
  if (!read_num_from_file("/proc/sys/fs/inotify/"
                          "max_queued_watches",
                          &ret))
    return -1;
  return ret;
}


x86 assembly (clang, -O0):
<inotifytools_get_max_queued_events>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <read_num_from_file@plt>
cmp    $0x0,%eax
jne    113d <inotifytools_get_max_queued_events+0x2d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1143 <inotifytools_get_max_queued_events+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inotifytools_get_max_queued_events>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <read_num_from_file@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"/proc/sys/fs/inotify/max_queued_watches\00"
define i32 @inotifytools_get_max_queued_events() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @read_num_from_file(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %0
store i32 -1, i32* %1
br label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %5
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [40 x i8] c"/proc/sys/fs/inotify/max_queued_watches\00"
define i32 @inotifytools_get_max_queued_events() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @read_num_from_file(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 0
%5 = load i32, i32* %1
%6 = select i1 %4, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int exact_sqare(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  scanf("%d", &number);
  printf("%d", exact_sqare(number));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <exact_sqare@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_sqare(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int f(int a, int b, int c, int d, int e) { return a + b * (c + d * e); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%esi
imul   -0x14(%rbp),%esi
add    %esi,%edx
imul   %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
imul   %r8d,%ecx
lea    (%rcx,%rdx,1),%eax
imul   %esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %13, %16
%18 = mul nsw i32 %12, %17
%19 = add nsw i32 %11, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul nsw i32 %4, %3
%7 = add nsw i32 %6, %2
%8 = mul nsw i32 %7, %1
%9 = add nsw i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ test_usual_conv();
void testmain() {
  print("usual conversion");
  test_usual_conv();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <print@plt>
mov    $0x0,%al
call   1040 <test_usual_conv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_usual_conv@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"usual conversion\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_usual_conv()
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"usual conversion\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_usual_conv()
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ buffer_write(struct buffer *, long *, int);
void buffer_write_long(struct buffer *__restrict buf, long data) {
  buffer_write(buf, &data, sizeof(data));
}


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

x86 assembly (clang, -O2):
<buffer_write_long>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <buffer_write@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define void @buffer_write_long(%struct.buffer* noalias %0, i64 %1) {
%3 = alloca %struct.buffer*
%4 = alloca i64
store %struct.buffer* %0, %struct.buffer** %3
store i64 %1, i64* %4
%5 = load %struct.buffer*, %struct.buffer** %3
%6 = call i32 @buffer_write(%struct.buffer* %5, i64* %4, i32 8)
ret void
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define void @buffer_write_long(%struct.buffer* noalias %0, i64 %1) {
%3 = alloca i64
store i64 %1, i64* %3
%4 = call i32 @buffer_write(%struct.buffer* %0, i64* %3, i32 8)
ret void
}
void mul() {
  asm volatile("popq %%rbx\n\t"
               "mulq %%rbx\n\t"
               "pushq %%rax\n\t" ::
                   :);
}


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

x86 assembly (clang, -O2):
<mul>:
pop    %rbx
mul    %rbx
push   %rax
ret

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

LLVM IR (-O2):
define void @mul() {
tail call void asm sideeffect "popq %rbx\0A\09mulq %rbx\0A\09pushq %rax\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i > -1; i++) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jle    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ panic(int);
void panic9() { panic(10); }


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

x86 assembly (clang, -O2):
<panic9>:
mov    $0xa,%edi
jmp    1030 <panic@plt>

LLVM IR (-O0):
define void @panic9() {
%1 = call i32 @panic(i32 10)
ret void
}

LLVM IR (-O2):
define void @panic9() {
%1 = tail call i32 @panic(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_MSG(int /*<<< orphan*/);
int gen_MSG(void) {
  handle_MSG(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @gen_MSG() {
%1 = tail call i32 @handle_MSG(i32 0)
ret i32 0
}
/* Type definitions */
struct DynArr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ log(double);
int /*<<< orphan*/ popDynArr(struct DynArr *);
int /*<<< orphan*/ pushDynArr(struct DynArr *, int /*<<< orphan*/);
double topDynArr(struct DynArr *);
void natural_log(struct DynArr *stack) {
  double i = topDynArr(stack);
  popDynArr(stack);
  pushDynArr(stack, log(i));
}


x86 assembly (clang, -O0):
<natural_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <topDynArr@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <popDynArr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <pushDynArr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<natural_log>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <topDynArr@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <popDynArr@plt>
movsd  0x8(%rsp),%xmm0
call   1050 <log@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1060 <pushDynArr@plt>

LLVM IR (-O0):
%struct.DynArr = type { i32 }
define void @natural_log(%struct.DynArr* %0) {
%2 = alloca %struct.DynArr*
%3 = alloca double
store %struct.DynArr* %0, %struct.DynArr** %2
%4 = load %struct.DynArr*, %struct.DynArr** %2
%5 = call double @topDynArr(%struct.DynArr* %4)
store double %5, double* %3
%6 = load %struct.DynArr*, %struct.DynArr** %2
%7 = call i32 @popDynArr(%struct.DynArr* %6)
%8 = load %struct.DynArr*, %struct.DynArr** %2
%9 = load double, double* %3
%10 = call i32 @log(double %9)
%11 = call i32 @pushDynArr(%struct.DynArr* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.DynArr = type { i32 }
define void @natural_log(%struct.DynArr* %0) {
%2 = tail call double @topDynArr(%struct.DynArr* %0)
%3 = tail call i32 @popDynArr(%struct.DynArr* %0)
%4 = tail call i32 @log(double %2)
%5 = tail call i32 @pushDynArr(%struct.DynArr* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_div_d(double *, double, double);
double xil_fpo_div_d(double a, double b) {
  double res_d;
  xip_fpo_div_d(&res_d, a, b);
  return res_d;
}


x86 assembly (clang, -O0):
<xil_fpo_div_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x18(%rbp),%rdi
call   1030 <xip_fpo_div_d@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xil_fpo_div_d>:
push   %rax
mov    %rsp,%rdi
call   1030 <xip_fpo_div_d@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @xil_fpo_div_d(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* %4
%8 = call i32 @xip_fpo_div_d(double* %5, double %6, double %7)
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @xil_fpo_div_d(double %0, double %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @xip_fpo_div_d(double* %3, double %0, double %1)
%6 = load double, double* %3
ret double %6
}
double add_doubles(double a, double b) { return a + b; }


x86 assembly (clang, -O0):
<add_doubles>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_doubles>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @add_doubles(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @add_doubles(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
int foo(void) {
  static const int a = 0.5;
  static const int b = (int)13.5 + 1;
  return a + b;
}


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

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

LLVM IR (-O0):
@foo.a = internal constant i32 0
@foo.b = internal constant i32 14
define i32 @foo() {
ret i32 14
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 14
}
/* Variables and functions */
int /*<<< orphan*/ BASTORE();
void CASTORE() { BASTORE(); }


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

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

LLVM IR (-O0):
define void @CASTORE() {
%1 = call i32 (...) @BASTORE()
ret void
}

LLVM IR (-O2):
define void @CASTORE() {
%1 = tail call i32 (...) @BASTORE()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *malloc(size_t);
bool util_malloc(void **ptr, size_t len) {
  assert(ptr != NULL);
  *ptr = malloc(len);
  if (*ptr == NULL) {
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<util_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    116f <util_malloc+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1176 <util_malloc+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %r14,%rdi
call   1040 <malloc@plt>
mov    %rax,(%rbx)
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @util_malloc(i8** %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i64
store i8** %0, i8*** %4
store i64 %1, i64* %5
%6 = load i8**, i8*** %4
%7 = icmp ne i8** %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i64, i64* %5
%11 = call i8* @malloc(i64 %10)
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
%13 = load i8**, i8*** %4
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @util_malloc(i8** writeonly %0, i64 %1) {
%3 = icmp ne i8** %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i8* @malloc(i64 %1)
store i8* %6, i8** %0
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printbin_rec(int /*<<< orphan*/, int /*<<< orphan*/);
void printbin(uint64_t b) { printbin_rec(b, 0); }


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

x86 assembly (clang, -O2):
<printbin>:
xor    %esi,%esi
jmp    1030 <printbin_rec@plt>

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

LLVM IR (-O2):
define void @printbin(i32 %0) {
%2 = tail call i32 @printbin_rec(i32 %0, i32 0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int poweroff(int argc, char *argv[]) {
  printf("POWER OFF NOT SUPPORTED ON ARM\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<poweroff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poweroff>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"POWER OFF NOT SUPPORTED ON ARM\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @poweroff(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [31 x i8] c"POWER OFF NOT SUPPORTED ON ARM\00"
define i32 @poweroff(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
double __attribute__((used)) sqrt(double x) { return x; }


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

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

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (double (double)* @sqrt to i8*)], section "llvm.metadata"
define double @sqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret double %3
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (double (double)* @sqrt to i8*)], section "llvm.metadata"
define double @sqrt(double returned %0) {
ret double %0
}
unsigned short _farnspeekw(unsigned long offset) {
  unsigned short result;
  __asm__ __volatile__(".byte 0x64\n"
                       "	movw (%k1),%w0"
                       : "=r"(result)
                       : "r"(offset));
  return result;
}


x86 assembly (clang, -O0):
<_farnspeekw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %fs:(%eax),%ax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_farnspeekw>:
mov    %fs:(%edi),%ax
ret

LLVM IR (-O0):
define zeroext i16 @_farnspeekw(i64 %0) {
%2 = alloca i64
%3 = alloca i16
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i16 asm sideeffect ".byte 0x64\0A\09movw (${1:k}),${0:w}", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @_farnspeekw(i64 %0) {
%2 = tail call i16 asm sideeffect ".byte 0x64\0A\09movw (${1:k}),${0:w}", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i16 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ logDebug(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int var = 42;
  printf("var = %d\n", var);
  logDebug("LOG_DEBUG() called!");
  logDebug("logDebug() called!");
  return 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)
movl   $0x2a,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
call   1040 <logDebug@plt>
lea    0xebf(%rip),%rdi
call   1040 <logDebug@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2a,%esi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
call   1040 <logDebug@plt>
lea    0xed9(%rip),%rdi
call   1040 <logDebug@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"var = %d\0A\00"
@.str.1 = [20 x i8] c"LOG_DEBUG() called!\00"
@.str.2 = [19 x i8] c"logDebug() called!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 42, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @logDebug(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @logDebug(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [10 x i8] c"var = %d\0A\00"
@.str.1 = [20 x i8] c"LOG_DEBUG() called!\00"
@.str.2 = [19 x i8] c"logDebug() called!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 42)
%4 = tail call i32 @logDebug(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @logDebug(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x27() {
  Assert_real((islower(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_islower.c",
              200, ("islower should be 0 for '"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for '\00"
define void @t_islower_0x27() {
%1 = tail call i64 @islower(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 ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
short htons(short);
int /*<<< orphan*/ memcpy(char *, short *, int);
int setErrorCode(short Errorcode, char *datagram) {
  char *tmp;
  tmp = datagram;
  tmp += 2;
  Errorcode = htons(Errorcode);
  memcpy(tmp, &Errorcode, sizeof(short));
  return 1;
}


x86 assembly (clang, -O0):
<setErrorCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <htons@plt>
mov    %ax,-0x2(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x2(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memcpy@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setErrorCode>:
push   %rbx
sub    $0x10,%rsp
lea    0x2(%rsi),%rbx
call   1030 <htons@plt>
mov    %ax,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <memcpy@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @setErrorCode(i16 signext %0, i8* %1) {
%3 = alloca i16
%4 = alloca i8*
%5 = alloca i8*
store i16 %0, i16* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 2
store i8* %8, i8** %5
%9 = load i16, i16* %3
%10 = call signext i16 @htons(i16 signext %9)
store i16 %10, i16* %3
%11 = load i8*, i8** %5
%12 = call i32 @memcpy(i8* %11, i16* %3, i32 2)
ret i32 1
}

LLVM IR (-O2):
define i32 @setErrorCode(i16 signext %0, i8* %1) {
%3 = alloca i16
%4 = getelementptr inbounds i8, i8* %1, i64 2
%5 = tail call signext i16 @htons(i16 signext %0)
store i16 %5, i16* %3
%6 = call i32 @memcpy(i8* %4, i16* %3, i32 2)
ret i32 1
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ cli_addr;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int /*<<< orphan*/ perror(char *);
int connect_with_client(int sockfd) {
  socklen_t clilen;
  int newsockfd;
  struct sockaddr_in cli_addr;
  clilen = sizeof(cli_addr);
  newsockfd = accept(sockfd, (struct sockaddr *)&cli_addr, &clilen);
  if (newsockfd == -1)
    perror("ERROR on binding");
  return newsockfd;
}


x86 assembly (clang, -O0):
<connect_with_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <accept@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    115b <connect_with_client+0x3b>
lea    0xeaa(%rip),%rdi
call   1030 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connect_with_client>:
push   %rbx
sub    $0x10,%rsp
movl   $0x4,0x4(%rsp)
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
call   1040 <accept@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     114b <connect_with_client+0x2b>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xeae(%rip),%rdi
call   1030 <perror@plt>
jmp    1143 <connect_with_client+0x23>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [17 x i8] c"ERROR on binding\00"
define i32 @connect_with_client(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_in
store i32 %0, i32* %2
store i32 4, i32* %3
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %3)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %1
%14 = load i32, i32* %4
ret i32 %14
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [17 x i8] c"ERROR on binding\00"
define i32 @connect_with_client(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = bitcast i32* %2 to i8*
%5 = bitcast %struct.sockaddr_in* %3 to i8*
store i32 4, i32* %2
%6 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %2)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret i32 %7
}
/* Variables and functions */
int ls_costN_nm5_f0(double const **, double **, int *, double *, int);
int ls_costN_nm5(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return ls_costN_nm5_f0(arg, res, iw, w, mem);
}


x86 assembly (clang, -O0):
<ls_costN_nm5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <ls_costN_nm5_f0@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm5>:
jmp    1030 <ls_costN_nm5_f0@plt>

LLVM IR (-O0):
define i32 @ls_costN_nm5(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @ls_costN_nm5_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @ls_costN_nm5(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @ls_costN_nm5_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
int test_imm_2Bint8_reg(signed char val) {
  return ((val) & (-0x2B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Bint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffd5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Bint8_reg>:
test   $0xd5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Bint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -43
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_2Bint8_reg(i8 signext %0) {
%2 = and i8 %0, -43
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct vertex {
  int dummy;
};
struct graph {
  int dummy;
};

/* Variables and functions */
struct vertex *graph_add_vertex(struct graph *, int);
struct vertex *graph_find_vertex(struct graph *, int);
struct vertex *graph_make_vertex(struct graph *g, int value) {
  struct vertex *v = graph_find_vertex(g, value);
  if (v == NULL) {
    v = graph_add_vertex(g, value);
  }
  return v;
}


x86 assembly (clang, -O0):
<graph_make_vertex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <graph_find_vertex@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115a <graph_make_vertex+0x3a>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <graph_add_vertex@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<graph_make_vertex>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <graph_find_vertex@plt>
test   %rax,%rax
je     1139 <graph_make_vertex+0x19>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <graph_add_vertex@plt>

LLVM IR (-O0):
%struct.vertex = type { i32 }
%struct.graph = type { i32 }
define %struct.vertex* @graph_make_vertex(%struct.graph* %0, i32 %1) {
%3 = alloca %struct.graph*
%4 = alloca i32
%5 = alloca %struct.vertex*
store %struct.graph* %0, %struct.graph** %3
store i32 %1, i32* %4
%6 = load %struct.graph*, %struct.graph** %3
%7 = load i32, i32* %4
%8 = call %struct.vertex* @graph_find_vertex(%struct.graph* %6, i32 %7)
store %struct.vertex* %8, %struct.vertex** %5
%9 = load %struct.vertex*, %struct.vertex** %5
%10 = icmp eq %struct.vertex* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load %struct.graph*, %struct.graph** %3
%13 = load i32, i32* %4
%14 = call %struct.vertex* @graph_add_vertex(%struct.graph* %12, i32 %13)
store %struct.vertex* %14, %struct.vertex** %5
br label %15
15: ; preds = %11, %2
%16 = load %struct.vertex*, %struct.vertex** %5
ret %struct.vertex* %16
}

LLVM IR (-O2):
%struct.vertex = type { i32 }
%struct.graph = type { i32 }
define %struct.vertex* @graph_make_vertex(%struct.graph* %0, i32 %1) {
%3 = tail call %struct.vertex* @graph_find_vertex(%struct.graph* %0, i32 %1)
%4 = icmp eq %struct.vertex* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call %struct.vertex* @graph_add_vertex(%struct.graph* %0, i32 %1)
br label %7
7: ; preds = %5, %2
%8 = phi %struct.vertex* [ %6, %5 ], [ %3, %2 ]
ret %struct.vertex* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ randval;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(unsigned int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(int argc, char **argv) {
  unsigned int randval;
  FILE *f;
  f = fopen("/dev/random", "r");
  fread(&randval, sizeof(randval), 1, f);
  fclose(f);
  printf("%u\n", randval);
  return 0;
}


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)
lea    0xea3(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x14(%rbp),%esi
lea    0xe77(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0xc(%rsp),%esi
lea    0xe89(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %7
%9 = load i32*, i32** %7
%10 = call i32 @fread(i32* %6, i32 4, i32 1, i32* %9)
%11 = load i32*, i32** %7
%12 = call i32 @fclose(i32* %11)
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %5)
%7 = tail call i32 @fclose(i32* %5)
%8 = load i32, i32* %3
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int stat(char const *, struct stat *);
bool path_isdir(const char *path) {
  struct stat sb;
  int ret;
  ret = stat(path, &sb);
  if (ret < 0)
    return (false);
  if (S_ISDIR(sb.st_mode))
    return (true);
  return (false);
}


x86 assembly (clang, -O0):
<path_isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1152 <path_isdir+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1177 <path_isdir+0x57>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1170 <path_isdir+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1177 <path_isdir+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_isdir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %eax,%eax
js     1142 <path_isdir+0x22>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @path_isdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %18
11: ; preds = %1
%12 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call i64 @S_ISDIR(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 1, i32* %2
br label %18
17: ; preds = %11
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @path_isdir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
void test_three(int x) {
#pragma omp for ordered(1)
  for (int i = 0; i < x; i++) {
#pragma omp ordered depend(source)
  }
}


x86 assembly (clang, -O0):
<test_three>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <test_three+0x2d>
jmp    111f <test_three+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <test_three+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_three(i32 %0) {
ret void
}
long long int power(int a, int b) {
  long long int x = 1;
  int i;
  for (i = 1; i <= b; i++)
    x = x * a;
  return x;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1143 <power+0x43>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <power+0x19>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %esi,%esi
jle    111b <power+0x1b>
movslq %edi,%rcx
lea    -0x1(%rsi),%eax
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x7,%eax
jae    1121 <power+0x21>
mov    $0x1,%eax
jmp    1155 <power+0x55>
mov    $0x1,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%esi
jne    1130 <power+0x30>
test   %edx,%edx
je     1169 <power+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <power+0x60>
ret

LLVM IR (-O0):
define i64 @power(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i64 1, i64* %5
store i32 1, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i64, i64* %5
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = mul nsw i64 %12, %14
store i64 %15, i64* %5
br label %16
16: ; preds = %11
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %7
19: ; preds = %7
%20 = load i64, i64* %5
ret i64 %20
}

LLVM IR (-O2):
define i64 @power(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %34, label %4
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = mul nsw i64 %12, %5
%15 = mul nsw i64 %14, %5
%16 = mul nsw i64 %15, %5
%17 = mul nsw i64 %16, %5
%18 = mul nsw i64 %17, %5
%19 = mul nsw i64 %18, %5
%20 = mul nsw i64 %19, %5
%21 = mul nsw i64 %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi i64 [ undef, %4 ], [ %21, %11 ]
%26 = phi i64 [ 1, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi i64 [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = mul nsw i64 %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi i64 [ 1, %2 ], [ %25, %24 ], [ %31, %28 ]
ret i64 %35
}