xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
char *stb_strncpy(char *s, char *t, int n) {
  strncpy(s, t, n);
  s[n - 1] = 0;
  return s;
}


x86 assembly (clang, -O0):
<stb_strncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_strncpy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @stb_strncpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @stb_strncpy(i8* returned %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = add nsw i32 %2, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret i8* %0
}
int bindresvport(sd, sin)
int sd;
struct sockaddr_in *sin;
{
  return bindresvport_sa(sd, (struct sockaddr *)sin);
}


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

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

LLVM IR (-O0):
%struct.sockaddr_in = type opaque
%struct.sockaddr = type opaque
define i32 @bindresvport(i32 %0, %struct.sockaddr_in* %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in*
store i32 %0, i32* %3
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %4
%5 = load i32, i32* %3
%6 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%7 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%8 = call i32 (i32, %struct.sockaddr*, ...) bitcast (i32 (...)* @bindresvport_sa to i32 (i32, %struct.sockaddr*, ...)*)(i32 %5, %struct.sockaddr* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.sockaddr_in = type opaque
%struct.sockaddr = type opaque
define i32 @bindresvport(i32 %0, %struct.sockaddr_in* %1) {
%3 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%4 = tail call i32 (i32, %struct.sockaddr*, ...) bitcast (i32 (...)* @bindresvport_sa to i32 (i32, %struct.sockaddr*, ...)*)(i32 %0, %struct.sockaddr* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double volatile);
double sqrt(double volatile);
int main() {
  volatile double x, y;
  x = 1e16;
  y = sqrt(x + 1) - sqrt(x);
  printf("%e\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x4341c37937e08000,%rax
c3 41 43
mov    %rax,(%rsp)
movsd  (%rsp),%xmm0
addsd  0xec1(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     114f <main+0x2f>
sqrtsd %xmm0,%xmm1
jmp    115c <main+0x3c>
call   1040 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
ucomisd %xmm2,%xmm0
jb     116d <main+0x4d>
sqrtsd %xmm0,%xmm0
jmp    117e <main+0x5e>
movsd  %xmm1,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store volatile double 1.000000e+16, double* %2
%4 = load volatile double, double* %2
%5 = fadd double %4, 1.000000e+00
%6 = call double @sqrt(double %5)
%7 = load volatile double, double* %2
%8 = call double @sqrt(double %7)
%9 = fsub double %6, %8
store volatile double %9, double* %3
%10 = load volatile double, double* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
store volatile double 1.000000e+16, double* %1
%5 = load volatile double, double* %1
%6 = fadd double %5, 1.000000e+00
%7 = tail call double @sqrt(double %6)
%8 = load volatile double, double* %1
%9 = tail call double @sqrt(double %8)
%10 = fsub double %7, %9
store volatile double %10, double* %2
%11 = load volatile double, double* %2
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ doDelete(int);
void hypster_delete(int ID) { doDelete(ID); }


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

x86 assembly (clang, -O2):
<hypster_delete>:
jmp    1030 <doDelete@plt>

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

LLVM IR (-O2):
define void @hypster_delete(i32 %0) {
%2 = tail call i32 @doDelete(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ deinitvideo();
int /*<<< orphan*/ initvideo();
int main(int argc, char *argv[], char *env[]) {
  initvideo();
  deinitvideo();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <initvideo@plt>
mov    $0x0,%al
call   1040 <deinitvideo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = call i32 (...) @initvideo()
%8 = call i32 (...) @deinitvideo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @initvideo()
%5 = tail call i32 (...) @deinitvideo()
ret i32 0
}
/* Variables and functions */
char *format_str(char *, char const *const);
char *get_last_path_component(char const *);
scalar_t__ is_dir(char const *);
char *strdup(char const *const);
char *get_typed_fname(const char path[]) {
  const char *const last_part = get_last_path_component(path);
  return is_dir(path) ? format_str("%s/", last_part) : strdup(last_part);
}


x86 assembly (clang, -O0):
<get_typed_fname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_last_path_component@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <is_dir@plt>
cmp    $0x0,%rax
je     1185 <get_typed_fname+0x45>
mov    -0x10(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1050 <format_str@plt>
mov    %rax,-0x18(%rbp)
jmp    1192 <get_typed_fname+0x52>
mov    -0x10(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_typed_fname>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <get_last_path_component@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <is_dir@plt>
test   %rax,%rax
je     1172 <get_typed_fname+0x32>
lea    0xe9d(%rip),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <format_str@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <strdup@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s/\00"
define i8* @get_typed_fname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @get_last_path_component(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = call i64 @is_dir(i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i8* @format_str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %15
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i8* @strdup(i8* %13)
br label %15
15: ; preds = %12, %9
%16 = phi i8* [ %11, %9 ], [ %14, %12 ]
ret i8* %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s/\00"
define i8* @get_typed_fname(i8* %0) {
%2 = tail call i8* @get_last_path_component(i8* %0)
%3 = tail call i64 @is_dir(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i8* @format_str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %9
7: ; preds = %1
%8 = tail call i8* @strdup(i8* %2)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
void marquee() {
  int z = 30;
  z--;
  if (z == 30)
    z = 600;
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<marquee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1e,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x1e,-0x4(%rbp)
jne    1139 <marquee+0x29>
movl   $0x258,-0x4(%rbp)
mov    $0x0,%al
call   1030 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @marquee() {
%1 = alloca i32
store i32 30, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, -1
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 30
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 600, i32* %1
br label %7
7: ; preds = %6, %0
%8 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
define void @marquee() {
%1 = tail call i32 (...) @glutPostRedisplay()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xc9() {
  Assert_real((isprint(201) == 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_isprint.c",
              1010, ("isprint should be 0 for 0xc9"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xc9>:
push   %rax
mov    $0xc9,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f2,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc9\00"
define void @t_isprint_0xc9() {
%1 = call i64 @isprint(i32 201)
%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 1010, i8* getelementptr inbounds ([29 x i8], [29 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc9\00"
define void @t_isprint_0xc9() {
%1 = tail call i64 @isprint(i32 201)
%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 1010, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *element_text_item_get_heading(char *element_name, char *heading) {
  if (heading && *heading)
    return heading;
  else
    return element_name;
}


x86 assembly (clang, -O0):
<element_text_item_get_heading>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1134 <element_text_item_get_heading+0x34>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1134 <element_text_item_get_heading+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    113c <element_text_item_get_heading+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_text_item_get_heading>:
test   %rsi,%rsi
je     110e <element_text_item_get_heading+0xe>
mov    %rsi,%rax
cmpb   $0x0,(%rsi)
je     110e <element_text_item_get_heading+0xe>
ret
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @element_text_item_get_heading(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4, %2
br label %8
8: ; preds = %4, %7
%9 = phi i8* [ %0, %7 ], [ %1, %4 ]
ret i8* %9
}
/* Variables and functions */
scalar_t__ floor(double);
int ifloor(double a) { return (int)floor(a); }


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

x86 assembly (clang, -O2):
<ifloor>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @ifloor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @floor(double %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ifloor(double %0) {
%2 = tail call i64 @floor(double %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void foo122() {}


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

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

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

LLVM IR (-O2):
define void @foo122() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void jep_thread_sleep(int ms) { sleep(ms / 1000); }


x86 assembly (clang, -O0):
<jep_thread_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jep_thread_sleep>:
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @jep_thread_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 1000
%5 = call i32 @sleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @jep_thread_sleep(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = tail call i32 @sleep(i32 %2)
ret void
}
/* Variables and functions */
unsigned short htons(unsigned short);
short unsigned int network_htons(short unsigned int s) { return htons(s); }


x86 assembly (clang, -O0):
<network_htons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <htons@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<network_htons>:
jmp    1030 <htons@plt>

LLVM IR (-O0):
define zeroext i16 @network_htons(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call zeroext i16 @htons(i16 zeroext %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @network_htons(i16 zeroext %0) {
%2 = tail call zeroext i16 @htons(i16 zeroext %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void index_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<index_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @index_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned int bit(unsigned int toBit) { return toBit; }


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

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

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

LLVM IR (-O2):
define i32 @bit(i32 returned %0) {
ret i32 %0
}
int main() {
  char a;
  struct {
    int a;
  } test;
  char *ptr = &a;
  if ((long)&test % __alignof__(test) != 0) {
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
and    $0x3,%rax
cmp    $0x0,%rax
je     113e <main+0x2e>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca %struct.anon
%4 = alloca i8*
store i32 0, i32* %1
store i8* %2, i8** %4
%5 = ptrtoint %struct.anon* %3 to i64
%6 = urem i64 %5, 4
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int delay(int ms) {
  unsigned char j;
  for (; ms != 0; ms--)
    for (j = 98; j > 0; j--)
      ;
  return 0;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1147 <delay+0x47>
movb   $0x62,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jle    1134 <delay+0x34>
jmp    1127 <delay+0x27>
mov    -0x5(%rbp),%al
add    $0xff,%al
mov    %al,-0x5(%rbp)
jmp    1115 <delay+0x15>
jmp    1139 <delay+0x39>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay+0x7>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @delay(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void SUB_HOST_REG_B(int dst_reg, int src_reg) {
  addbyte(0x28);
  addbyte(0xc0 | dst_reg | (src_reg << 3));
}


x86 assembly (clang, -O0):
<SUB_HOST_REG_B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x28,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SUB_HOST_REG_B>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x28,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @SUB_HOST_REG_B(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 40)
%6 = load i32, i32* %3
%7 = or i32 192, %6
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
%10 = or i32 %7, %9
%11 = call i32 @addbyte(i32 %10)
ret void
}

LLVM IR (-O2):
define void @SUB_HOST_REG_B(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 40)
%4 = shl i32 %1, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @addbyte(i32 %6)
ret void
}
void usdF(int *x) { unsigned int *y = x; }


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

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

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

LLVM IR (-O2):
define void @usdF(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int compute_length(char const *);
int /*<<< orphan*/ do_expand(char const *, char *);
scalar_t__ safe_malloc(char *, int, int);
char *expand_string(const char *p) {
  int len;
  char *result;
  len = compute_length(p);
  result = (char *)safe_malloc(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/rc0/mairix/refs/heads/master/expandstr.c",
      192, sizeof(char) * (len + 1));
  do_expand(p, result);
  return result;
}


x86 assembly (clang, -O0):
<expand_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <compute_length@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edx
lea    0xea3(%rip),%rdi
mov    $0xc0,%esi
call   1030 <safe_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <do_expand@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <compute_length@plt>
lea    0x1(%rax),%edx
lea    0xeba(%rip),%rdi
mov    $0xc0,%esi
call   1030 <safe_malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <do_expand@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rc0/mairix/refs/heads/master/expandstr.c\00"
define i8* @expand_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @compute_length(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i64 @safe_malloc(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i32 192, i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %2
%15 = load i8*, i8** %4
%16 = call i32 @do_expand(i8* %14, i8* %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
@.str = [131 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rc0/mairix/refs/heads/master/expandstr.c\00"
define i8* @expand_string(i8* %0) {
%2 = tail call i32 @compute_length(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @safe_malloc(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0), i32 192, i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @do_expand(i8* %0, i8* %5)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
void makeCall() {
  char number[4];
  gets(number);
}


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

x86 assembly (clang, -O2):
<makeCall>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <gets@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @makeCall() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
ret void
}

LLVM IR (-O2):
define void @makeCall() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
ret void
}
/* Variables and functions */
int __CCAPRICE_MATH_HI_L(double);
int __CCAPRICE_MATH_LO_L(double);
int isnan(double x) {
  int data[] = {__CCAPRICE_MATH_HI_L(x) & 0x7FFFFFF, __CCAPRICE_MATH_LO_L(x)};
  data[0] |= (unsigned)(data[1] | -data[1]) >> 31;
  data[0] = 0x7FFFFFF - data[0];
  return ((unsigned)data[0]) >> 31;
}


x86 assembly (clang, -O0):
<isnan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <__CCAPRICE_MATH_HI_L@plt>
and    $0x7ffffff,%eax
mov    %eax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <__CCAPRICE_MATH_LO_L@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    %ecx,%ecx
sub    -0xc(%rbp),%ecx
or     %ecx,%eax
shr    $0x1f,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x7ffffff,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x1f,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnan>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <__CCAPRICE_MATH_HI_L@plt>
movsd  (%rsp),%xmm0
call   1030 <__CCAPRICE_MATH_LO_L@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isnan(double %0) {
%2 = alloca double
%3 = alloca [2 x i32]
store double %0, double* %2
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%5 = load double, double* %2
%6 = call i32 @__CCAPRICE_MATH_HI_L(double %5)
%7 = and i32 %6, 134217727
store i32 %7, i32* %4
%8 = getelementptr inbounds i32, i32* %4, i64 1
%9 = load double, double* %2
%10 = call i32 @__CCAPRICE_MATH_LO_L(double %9)
store i32 %10, i32* %8
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%12 = load i32, i32* %11
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%14 = load i32, i32* %13
%15 = sub nsw i32 0, %14
%16 = or i32 %12, %15
%17 = lshr i32 %16, 31
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%19 = load i32, i32* %18
%20 = or i32 %19, %17
store i32 %20, i32* %18
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%22 = load i32, i32* %21
%23 = sub nsw i32 134217727, %22
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %23, i32* %24
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%26 = load i32, i32* %25
%27 = lshr i32 %26, 31
ret i32 %27
}

LLVM IR (-O2):
define i32 @isnan(double %0) {
%2 = tail call i32 @__CCAPRICE_MATH_HI_L(double %0)
%3 = tail call i32 @__CCAPRICE_MATH_LO_L(double %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double num;
  scanf("%lf", &num);
  printf("The input is %f or %e.\n", num, num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xeb4(%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
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
movaps %xmm0,%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [24 x i8] c"The input is %f or %e.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %4, double %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [24 x i8] c"The input is %f or %e.\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %4, double %4)
ret i32 0
}
int do_726() { return 726; }


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

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

LLVM IR (-O0):
define i32 @do_726() {
ret i32 726
}

LLVM IR (-O2):
define i32 @do_726() {
ret i32 726
}
/* Variables and functions */
int /*<<< orphan*/ clfunct(char *, int);
int /*<<< orphan*/ inpline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
main() {
  int c, d, q;
  char in[1000], inp[1000], out[1000];
loop:;
  inpline(in, 1000);
  clfunct(in, 1000);
  printf("%s", in);
  goto loop;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xbe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <inpline@plt>
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <clfunct@plt>
lea    -0x400(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rbx
lea    0xebc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <inpline@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <clfunct@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    1150 <main+0x20>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = call i32 @inpline(i8* %2, i32 1000)
%5 = call i32 @clfunct(i8* %2, i32 1000)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void *do_work(void *arg) {
  int thread_id = *((int *)arg);
  for (int i = 0; i < 100000; i++) {
    printf("Thread %d: %d\n", thread_id, i);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<do_work>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x186a0,-0x10(%rbp)
jge    1159 <do_work+0x49>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112c <do_work+0x1c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_work>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%ebx
xor    %ebp,%ebp
lea    0xee1(%rip),%r14
nop
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x186a0,%ebp
jne    1120 <do_work+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Thread %d: %d\0A\00"
define i8* @do_work(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %3
store i32 0, i32* %4
br label %8
8: ; preds = %15, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 100000
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13)
br label %15
15: ; preds = %11
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %8
18: ; preds = %8
ret i8* null
}

LLVM IR (-O2):
@.str = [15 x i8] c"Thread %d: %d\0A\00"
define noalias i8* @do_work(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
br label %5
4: ; preds = %5
ret i8* null
5: ; preds = %1, %5
%6 = phi i32 [ 0, %1 ], [ %8, %5 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, 100000
br i1 %9, label %4, label %5
}
/* Variables and functions */
int /*<<< orphan*/ _jpeg_putc(int);
void _jpeg_putw(int w) {
  _jpeg_putc((w >> 8) & 0xff);
  _jpeg_putc(w & 0xff);
}


x86 assembly (clang, -O0):
<_jpeg_putw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <_jpeg_putc@plt>
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <_jpeg_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_jpeg_putw>:
push   %rbx
mov    %edi,%ebx
movzbl %bh,%edi
call   1030 <_jpeg_putc@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <_jpeg_putc@plt>

LLVM IR (-O0):
define void @_jpeg_putw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 255
%6 = call i32 @_jpeg_putc(i32 %5)
%7 = load i32, i32* %2
%8 = and i32 %7, 255
%9 = call i32 @_jpeg_putc(i32 %8)
ret void
}

LLVM IR (-O2):
define void @_jpeg_putw(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
%4 = tail call i32 @_jpeg_putc(i32 %3)
%5 = and i32 %0, 255
%6 = tail call i32 @_jpeg_putc(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int32_t string_comparator(const void *l, const void *r) {
  return strcmp((const char *)l, (const char *)r);
}


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

x86 assembly (clang, -O2):
<string_comparator>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @string_comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void gtk_widget_class_install_style_property() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_class_install_style_property() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ del_name(int);
void unix_ipc_unbind(int fd) {
  close(fd);
  del_name(fd);
}


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

x86 assembly (clang, -O2):
<unix_ipc_unbind>:
push   %rbx
mov    %edi,%ebx
call   1040 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <del_name@plt>

LLVM IR (-O0):
define void @unix_ipc_unbind(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @del_name(i32 %5)
ret void
}

LLVM IR (-O2):
define void @unix_ipc_unbind(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = tail call i32 @del_name(i32 %0)
ret void
}
void destroyInt(void *e) {}


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

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

LLVM IR (-O0):
define void @destroyInt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @destroyInt(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int u32_hash(const void *p, size_t n) {
  (void)p;
  return n;
}


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

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

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

LLVM IR (-O2):
define i32 @u32_hash(i8* nocapture readnone %0, i64 %1) {
%3 = trunc i64 %1 to i32
ret i32 %3
}
int mman_get_page_exist() {}


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

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

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

LLVM IR (-O2):
define i32 @mman_get_page_exist() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ const _mm_mul_ps(int /*<<< orphan*/ const,
                                    int /*<<< orphan*/);
int /*<<< orphan*/ _mm_rcp_ps(int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_sub_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) __m128 mm_rcp_hq_ps(const __m128 xmm0) {
  __m128 rcp = _mm_rcp_ps(xmm0);
  __m128 xmm1 = _mm_mul_ps(_mm_mul_ps(xmm0, rcp), rcp);
  rcp = _mm_add_ps(rcp, rcp);
  return _mm_sub_ps(rcp, xmm1);
}


x86 assembly (clang, -O0):
<mm_rcp_hq_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_mm_rcp_ps@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm_mul_ps@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm_mul_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <_mm_add_ps@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <_mm_sub_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_rcp_hq_ps>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <_mm_rcp_ps@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_mul_ps@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1040 <_mm_mul_ps@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %ebp,%esi
call   1060 <_mm_add_ps@plt>
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <_mm_sub_ps@plt>

LLVM IR (-O0):
define i32 @mm_rcp_hq_ps(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @_mm_rcp_ps(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @_mm_mul_ps(i32 %7, i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @_mm_mul_ps(i32 %9, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = call i32 @_mm_add_ps(i32 %12, i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @_mm_sub_ps(i32 %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @mm_rcp_hq_ps(i32 %0) {
%2 = tail call i32 @_mm_rcp_ps(i32 %0)
%3 = tail call i32 @_mm_mul_ps(i32 %0, i32 %2)
%4 = tail call i32 @_mm_mul_ps(i32 %3, i32 %2)
%5 = tail call i32 @_mm_add_ps(i32 %2, i32 %2)
%6 = tail call i32 @_mm_sub_ps(i32 %5, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __predictor_printBasicStatistics(int, int /*<<< orphan*/);
void predictor_printScore() { __predictor_printBasicStatistics(1, 0); }


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

x86 assembly (clang, -O2):
<predictor_printScore>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <__predictor_printBasicStatistics@plt>

LLVM IR (-O0):
define void @predictor_printScore() {
%1 = call i32 @__predictor_printBasicStatistics(i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @predictor_printScore() {
%1 = tail call i32 @__predictor_printBasicStatistics(i32 1, i32 0)
ret void
}
void XScreenOfDisplay() {}


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

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

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

LLVM IR (-O2):
define void @XScreenOfDisplay() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void keyCB(unsigned char key, int x, int y) {
  if (key == 'q')
    exit(0);
}


x86 assembly (clang, -O0):
<keyCB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x71,%eax
jne    1138 <keyCB+0x28>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyCB>:
cmp    $0x71,%dil
je     1117 <keyCB+0x7>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @keyCB(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 113
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @keyCB(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 113
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
ret void
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *createlist(int);
struct node *createlistinverse(int);
int /*<<< orphan*/ print(struct node *);
int main() {
  struct node *node1 = createlist(8);
  struct node *node2 = createlistinverse(7);
  print(node2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1040 <createlist@plt>
mov    %rax,-0x10(%rbp)
mov    $0x7,%edi
call   1050 <createlistinverse@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1040 <createlist@plt>
mov    $0x7,%edi
call   1050 <createlistinverse@plt>
mov    %rax,%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
%3 = alloca %struct.node*
store i32 0, i32* %1
%4 = call %struct.node* @createlist(i32 8)
store %struct.node* %4, %struct.node** %2
%5 = call %struct.node* @createlistinverse(i32 7)
store %struct.node* %5, %struct.node** %3
%6 = load %struct.node*, %struct.node** %3
%7 = call i32 @print(%struct.node* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* @createlist(i32 8)
%2 = tail call %struct.node* @createlistinverse(i32 7)
%3 = tail call i32 @print(%struct.node* %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  double nc;
  for (nc = 0; getchar() != EOF; ++nc)
    ;
  printf("%.0f\n", nc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     116a <main+0x4a>
jmp    1153 <main+0x33>
movsd  0xea5(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1137 <main+0x17>
movsd  -0x10(%rbp),%xmm0
lea    0xe92(%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
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb5(%rip),%rbx
xorpd  %xmm0,%xmm0
cmp    (%rbx),%rax
je     1160 <main+0x40>
xorpd  %xmm0,%xmm0
addsd  0xeb8(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1040 <getchar@plt>
movsd  0x8(%rsp),%xmm0
cmp    (%rbx),%rax
jne    1140 <main+0x20>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [6 x i8] c"%.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
br label %3
3: ; preds = %8, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
br label %8
8: ; preds = %7
%9 = load double, double* %2
%10 = fadd double %9, 1.000000e+00
store double %10, double* %2
br label %3
11: ; preds = %3
%12 = load double, double* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %12)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [6 x i8] c"%.0f\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi double [ %6, %4 ], [ 0.000000e+00, %0 ]
%6 = fadd double %5, 1.000000e+00
%7 = tail call i64 (...) @getchar()
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %4
10: ; preds = %4, %0
%11 = phi double [ 0.000000e+00, %0 ], [ %6, %4 ]
%12 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %11)
ret i32 0
}
signed int signedint_ignoring_signedlonglongint(signed int x,
                                                signed long long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i32 @signedint_ignoring_signedlonglongint(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @signedint_ignoring_signedlonglongint(i32 returned %0, i64 %1) {
ret i32 %0
}