xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_copy_from_quaddobl_systems_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(474, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_copy_from_quaddobl_systems_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1da,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_copy_from_quaddobl_systems_container>:
mov    $0x1da,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_copy_from_quaddobl_systems_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 474, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_copy_from_quaddobl_systems_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 474, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int xbp_chdir(char const *);
int __wrap_chdir(const char *dirname) { return xbp_chdir(dirname); }


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

x86 assembly (clang, -O2):
<__wrap_chdir>:
jmp    1030 <xbp_chdir@plt>

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

LLVM IR (-O2):
define i32 @__wrap_chdir(i8* %0) {
%2 = tail call i32 @xbp_chdir(i8* %0)
ret i32 %2
}
OP(dd, a7) {
  illegal_1();
  op_a7();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_a7@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_a7()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_a7()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ErrorF(char *);
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *makestr(char *str) {
  char *ptr;
  ptr = (char *)malloc(strlen(str) + 1);
  if (!ptr) {
    ErrorF("winMultiWindowLex:makestr() out of memory\n");
    exit(-1);
  }
  strcpy(ptr, str);
  return ptr;
}


x86 assembly (clang, -O0):
<makestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1196 <makestr+0x46>
lea    0xe79(%rip),%rdi
call   1070 <ErrorF@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makestr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1183 <makestr+0x33>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe76(%rip),%rdi
call   1070 <ErrorF@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"winMultiWindowLex:makestr() out of memory\0A\00"
define i8* @makestr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %1
%12 = call i32 @ErrorF(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [43 x i8] c"winMultiWindowLex:makestr() out of memory\0A\00"
define i8* @makestr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = tail call i32 @ErrorF(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %1
%11 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  int j;
  int k;
  assume(i == 0 && j == 0);
  while (i <= k) {
    i++;
    j = j + 1;
  }
  assert(j == i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1148 <main+0x28>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1178 <main+0x58>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <main+0x35>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <assume@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ pushpul(int);
stacku() { pushpul(1); }


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

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

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

LLVM IR (-O2):
define i32 @stacku() {
%1 = tail call i32 @pushpul(i32 1)
ret i32 undef
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *path_last_sep(const char *path) {
  const char *sep;
  sep = strrchr(path, '/');
  return sep;
}


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

x86 assembly (clang, -O2):
<path_last_sep>:
mov    $0x2f,%esi
jmp    1030 <strrchr@plt>

LLVM IR (-O0):
define i8* @path_last_sep(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @path_last_sep(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
ret i8* %2
}
I0A1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if (22 <= (*((unsigned int *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x16,%eax
mov    $0xa98ac7,%ecx
cmp    (%rcx),%eax
ja     1136 <I0A1+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <I0A1+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0A1>:
xor    %eax,%eax
cmpl   $0x16,0xa98ac7
16
setae  %al
ret

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

LLVM IR (-O2):
define i32 @I0A1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 11111111 to i32*)
%8 = icmp ugt i32 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ wsh_stop();
int wsh_cmd_quit(int argc, char **argv) {
  wsh_stop();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @wsh_cmd_quit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @wsh_stop()
ret i32 0
}

LLVM IR (-O2):
define i32 @wsh_cmd_quit(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @wsh_stop()
ret i32 0
}
void doSomething(int x) {
  if (x) {
  };
  return;
  int *f;
}


x86 assembly (clang, -O0):
<doSomething>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1116 <doSomething+0x16>
jmp    1116 <doSomething+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @doSomething(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @doSomething(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_fpe(int sig) { printf("FPE\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"FPE\0A\00"
define void @catch_fpe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"FPE\00"
define void @catch_fpe(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
void iommu_dma_free_cpu_cached_iovas(unsigned int cpu,
                                     struct iommu_domain *domain) {}


x86 assembly (clang, -O0):
<iommu_dma_free_cpu_cached_iovas>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.iommu_domain = type opaque
define void @iommu_dma_free_cpu_cached_iovas(i32 %0, %struct.iommu_domain* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char const);
int my_puts(const char *str) {
  for (int i = 0; str[i]; i++) {
    my_putchar(str[i]);
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_puts>:
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     1154 <my_puts+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <my_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <my_puts+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @my_puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %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 %21
11: ; preds = %4
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @my_putchar(i8 signext %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @my_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret i32 0
5: ; preds = %1, %5
%6 = phi i64 [ %9, %5 ], [ 0, %1 ]
%7 = phi i8 [ %11, %5 ], [ %2, %1 ]
%8 = tail call i32 @my_putchar(i8 signext %7)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %4, label %5
}
__attribute((always_)) float glm_deg(float rad) {
  return rad * 180.0f / ((float)3.14159265358979323846264338327950288);
}


x86 assembly (clang, -O0):
<glm_deg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_deg>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @glm_deg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = fdiv float %4, 0x400921FB60000000
ret float %5
}

LLVM IR (-O2):
define float @glm_deg(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = fdiv float %2, 0x400921FB60000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void autocomplete_free(char **list, int len) {
  for (int i = 0; i < len; i++) {
    free(list[i]);
  }
}


x86 assembly (clang, -O0):
<autocomplete_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <autocomplete_free+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <autocomplete_free+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autocomplete_free>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1142 <autocomplete_free+0x32>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <autocomplete_free+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @autocomplete_free(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @free(i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void pt3_message(char *message) { fprintf(stderr, "%s", message); }


x86 assembly (clang, -O0):
<pt3_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt3_message>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @pt3_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @pt3_message(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int anetSetBlock(char *, int, int /*<<< orphan*/);
int catAnetBlock(char *err, int fd) { return anetSetBlock(err, fd, 0); }


x86 assembly (clang, -O0):
<catAnetBlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <anetSetBlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catAnetBlock>:
xor    %edx,%edx
jmp    1030 <anetSetBlock@plt>

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

LLVM IR (-O2):
define i32 @catAnetBlock(i8* %0, i32 %1) {
%3 = tail call i32 @anetSetBlock(i8* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int /*<<< orphan*/ vla(int);
void f(int n) {
  int b = 0;
  printf("new b @ %p\n", &b);
  vla(n);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <vla@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x0,0xc(%rsp)
lea    0xeca(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1030 <vla@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"new b @ %p\0A\00"
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @vla(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"new b @ %p\0A\00"
define void @f(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 @vla(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ number;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
unsigned int from_byte_array_to_numberVECCHIO(unsigned char *byte_array) {
  unsigned int number = 0;
  unsigned char *pointer = (unsigned char *)&number;
  pointer += sizeof(number) - 4;
  memcpy(pointer, byte_array, 4);
  return number;
}


x86 assembly (clang, -O0):
<from_byte_array_to_numberVECCHIO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @from_byte_array_to_numberVECCHIO(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @memcpy(i8* %3, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int atoi(char *);
char *get_field_string(char *, int, char *, char *);
int get_field_value(char *name, int no_of_fields, char *fieldname,
                    char *value) {
  char *v = get_field_string(name, no_of_fields, fieldname, value);
  if (v != 0)
    return atoi(v);
  return 0;
}


x86 assembly (clang, -O0):
<get_field_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <get_field_string@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     116b <get_field_value+0x4b>
mov    -0x30(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    1172 <get_field_value+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_field_value>:
push   %rax
call   1030 <get_field_string@plt>
test   %rax,%rax
je     1134 <get_field_value+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_field_value(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i8* @get_field_string(i8* %0, i32 %1, i8* %2, i8* %3)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @atoi(i8* %5)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ 0, %4 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ clamp(int, int /*<<< orphan*/, int);
int get_position(int x, int y) {
  int val = 0;
  y = (int)clamp(y, 0, 25 - 1);
  x = (int)clamp(x, 0, (80 * (25 - y)) - 1);
  val += x * 2;
  val += y * 160;
  return val;
}


x86 assembly (clang, -O0):
<get_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <clamp@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x19,%eax
sub    -0x8(%rbp),%eax
imul   $0x50,%eax,%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <clamp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0xa0,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_position>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %esi,%edi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <clamp@plt>
mov    %rax,%rbx
mov    $0x19,%eax
sub    %ebx,%eax
lea    (%rax,%rax,4),%edx
shl    $0x4,%edx
add    $0xffffffff,%edx
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <clamp@plt>
lea    (%rbx,%rbx,4),%ecx
shl    $0x5,%ecx
lea    (%rcx,%rax,2),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_position(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %4
%7 = call i64 @clamp(i32 %6, i32 0, i32 24)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 25, %10
%12 = mul nsw i32 80, %11
%13 = sub nsw i32 %12, 1
%14 = call i64 @clamp(i32 %9, i32 0, i32 %13)
%15 = trunc i64 %14 to i32
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = mul nsw i32 %16, 2
%18 = load i32, i32* %5
%19 = add nsw i32 %18, %17
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = mul nsw i32 %20, 160
%22 = load i32, i32* %5
%23 = add nsw i32 %22, %21
store i32 %23, i32* %5
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @get_position(i32 %0, i32 %1) {
%3 = tail call i64 @clamp(i32 %1, i32 0, i32 24)
%4 = trunc i64 %3 to i32
%5 = sub nsw i32 25, %4
%6 = mul nsw i32 %5, 80
%7 = add nsw i32 %6, -1
%8 = tail call i64 @clamp(i32 %0, i32 0, i32 %7)
%9 = trunc i64 %8 to i32
%10 = shl nsw i32 %9, 1
%11 = mul nsw i32 %4, 160
%12 = add nsw i32 %10, %11
ret i32 %12
}
void foo(int *w) {
  int i;
  int *ww = __builtin_assume_aligned(w, 8);
  for (i = 0; i < 8; i++)
    ww[i] = ww[i] / 2;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    114f <foo+0x4f>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <foo+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movdqu (%rdi),%xmm0
movdqu 0x10(%rdi),%xmm1
movdqa %xmm0,%xmm2
psrld  $0x1f,%xmm2
paddd  %xmm0,%xmm2
psrad  $0x1,%xmm2
movdqu %xmm2,(%rdi)
movdqa %xmm1,%xmm0
psrld  $0x1f,%xmm0
paddd  %xmm1,%xmm0
psrad  $0x1,%xmm0
movdqu %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @foo(i32* %0) {
%2 = bitcast i32* %0 to i8*
%3 = bitcast i32* %0 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = sdiv <4 x i32> %4, <i32 2, i32 2, i32 2, i32 2>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %0, i64 4
%8 = bitcast i32* %7 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = sdiv <4 x i32> %9, <i32 2, i32 2, i32 2, i32 2>
%11 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %11
ret void
}
/* Variables and functions */
int yaffs_sync_common(int /*<<< orphan*/, char const *, int);
int yaffs_sync(const char *path) { return yaffs_sync_common((0), path, 1); }


x86 assembly (clang, -O0):
<yaffs_sync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <yaffs_sync_common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_sync>:
mov    %rdi,%rsi
xor    %edi,%edi
mov    $0x1,%edx
jmp    1030 <yaffs_sync_common@plt>

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

LLVM IR (-O2):
define i32 @yaffs_sync(i8* %0) {
%2 = tail call i32 @yaffs_sync_common(i32 0, i8* %0, i32 1)
ret i32 %2
}
void *tfunc(void *arg) {
  void (*notifyp)(void) = arg;
  notifyp();
}


x86 assembly (clang, -O0):
<tfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
call   *-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tfunc>:
jmp    *%rdi

LLVM IR (-O0):
define i8* @tfunc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca void ()*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to void ()*
store void ()* %6, void ()** %4
%7 = load void ()*, void ()** %4
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @tfunc(i8* nocapture %0) {
%2 = bitcast i8* %0 to void ()*
tail call void %2()
ret i8* undef
}
void InternalHSOscillatorOn(void) {}


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

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

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

LLVM IR (-O2):
define void @InternalHSOscillatorOn() {
ret void
}
double f(double *x) { return *x; }


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

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

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

LLVM IR (-O2):
define double @f(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello C!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"Hello C!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ ft_islower(int);
scalar_t__ ft_isupper(int);
int ft_isalpha(int c) {
  if ((ft_isupper(c)) || (ft_islower(c)))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <ft_isupper@plt>
cmp    $0x0,%rax
jne    114f <ft_isalpha+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <ft_islower@plt>
cmp    $0x0,%rax
je     115b <ft_isalpha+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <ft_isalpha+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
push   %rbx
mov    %edi,%ebx
call   1040 <ft_isupper@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <ft_isalpha+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <ft_islower@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = tail call i64 @ft_isupper(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ft_islower(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("linux->[22;31mhttp://c.biancheng.net");
  printf("NUM right\n");
  printf("NUM has defined\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"linux->[22;31mhttp://c.biancheng.net\00"
@.str.1 = [11 x i8] c"NUM right\0A\00"
@.str.2 = [17 x i8] c"NUM has defined\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"linux->[22;31mhttp://c.biancheng.net\00"
@str = [10 x i8] c"NUM right\00"
@str.3 = [16 x i8] c"NUM has defined\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
int test_imm_88uint16_reg(unsigned short val) {
  return ((val) & (0x88 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_88uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x88,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_88uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 136
%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_88uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 136
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cgdefb(int);
int /*<<< orphan*/ gendata();
void gendefb(int v) {
  gendata();
  cgdefb(v);
}


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

x86 assembly (clang, -O2):
<gendefb>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <gendata@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <cgdefb@plt>

LLVM IR (-O0):
define void @gendefb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @gendata()
%4 = load i32, i32* %2
%5 = call i32 @cgdefb(i32 %4)
ret void
}

LLVM IR (-O2):
define void @gendefb(i32 %0) {
%2 = tail call i32 (...) @gendata()
%3 = tail call i32 @cgdefb(i32 %0)
ret void
}
__attribute__((always_)) unsigned char __readb(const volatile void *addr) {
  unsigned char ret;
  asm volatile("mov"
               "b"
               " %1,%0"
               : "=q"(ret)
               : "m"(*(volatile unsigned char *)addr));
  return ret;
}


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

x86 assembly (clang, -O2):
<__readb>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @__readb(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8 asm sideeffect "movb $1,$0", "=q,*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @__readb(i8* %0) {
%2 = tail call i8 asm sideeffect "movb $1,$0", "=q,*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0)
ret i8 %2
}
/* Type definitions */
struct nl_handle {
  int dummy;
};

/* Variables and functions */
int nl_set_buffer_size(struct nl_handle *, int, int);
int nl_socket_set_buffer_size(struct nl_handle *sk, int rxbuf, int txbuf) {
  return nl_set_buffer_size(sk, rxbuf, txbuf);
}


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

x86 assembly (clang, -O2):
<nl_socket_set_buffer_size>:
jmp    1030 <nl_set_buffer_size@plt>

LLVM IR (-O0):
%struct.nl_handle = type { i32 }
define i32 @nl_socket_set_buffer_size(%struct.nl_handle* %0, i32 %1, i32 %2) {
%4 = alloca %struct.nl_handle*
%5 = alloca i32
%6 = alloca i32
store %struct.nl_handle* %0, %struct.nl_handle** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.nl_handle*, %struct.nl_handle** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @nl_set_buffer_size(%struct.nl_handle* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.nl_handle = type { i32 }
define i32 @nl_socket_set_buffer_size(%struct.nl_handle* %0, i32 %1, i32 %2) {
%4 = tail call i32 @nl_set_buffer_size(%struct.nl_handle* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double dnow() {
  struct timeval tv;
  if (gettimeofday(&tv, NULL) < 0)
    return (0);
  else
    return (1000 * ((double)tv.tv_sec + 1.e-6 * (double)tv.tv_usec));
}


x86 assembly (clang, -O0):
<dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
jge    113c <dnow+0x2c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1169 <dnow+0x59>
cvtsi2sdq -0x10(%rbp),%xmm0
cvtsi2sdq -0x18(%rbp),%xmm1
movsd  0xeb8(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xea0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dnow>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
js     114c <dnow+0x3c>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xec5(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xec1(%rip),%xmm0
add    $0x18,%rsp
ret
xorps  %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @dnow() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store double 0.000000e+00, double* %1
br label %15
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %12, double %9)
%14 = fmul double 1.000000e+03, %13
store double %14, double* %1
br label %15
15: ; preds = %6, %5
%16 = load double, double* %1
ret double %16
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @dnow() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp slt i64 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %8)
%13 = fmul double %12, 1.000000e+03
br label %14
14: ; preds = %0, %5
%15 = phi double [ %13, %5 ], [ 0.000000e+00, %0 ]
ret double %15
}
unsigned int get_unsigned_int_min() {
  unsigned int min = 0;
  return (min);
}


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

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

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

LLVM IR (-O2):
define i32 @get_unsigned_int_min() {
ret i32 0
}
/* Type definitions */
struct timespec {
  long long tv_sec;
  long long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void millisleep(long long t) {
  struct timespec tt;
  struct timespec out;
  tt.tv_sec = t / 1000;
  tt.tv_nsec = (t % 1000) * 1000000;
  nanosleep(&tt, &out);
}


x86 assembly (clang, -O0):
<millisleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
imul   $0xf4240,%rdx,%rax
mov    %rax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<millisleep>:
sub    $0x28,%rsp
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rax,%rdx
mov    %rdx,0x8(%rsp)
imul   $0x3e8,%rdx,%rax
sub    %rax,%rdi
imul   $0xf4240,%rdi,%rax
mov    %rax,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @millisleep(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = sdiv i64 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i64 %6, i64* %7
%8 = load i64, i64* %2
%9 = srem i64 %8, 1000
%10 = mul nsw i64 %9, 1000000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 %10, i64* %11
%12 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @millisleep(i64 %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = sdiv i64 %0, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i64 %6, i64* %7
%8 = srem i64 %0, 1000
%9 = mul nsw i64 %8, 1000000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 %9, i64* %10
%11 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret void
}