xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: latrace-ctl [-d] config\n\n");
  printf("    -d <0/1>  - disable/enable auditing\n");
  printf("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xedc(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"usage: latrace-ctl [-d] config\0A\0A\00"
@.str.1 = [41 x i8] c" -d <0/1> - disable/enable auditing\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [32 x i8] c"usage: latrace-ctl [-d] config\0A\00"
@str.3 = [40 x i8] c" -d <0/1> - disable/enable auditing\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void XSelectInput() {}


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

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

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

LLVM IR (-O2):
define void @XSelectInput() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
double to_celsius(double temp_f) {
  if (temp_f < -459.67) {
    perror("Temperature under absolute zero");
    return 0;
  }
  return (5.0 / 9) * (temp_f - 32);
}


x86 assembly (clang, -O0):
<to_celsius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1149 <to_celsius+0x39>
lea    0xee1(%rip),%rdi
call   1030 <perror@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116b <to_celsius+0x5b>
movsd  -0x10(%rbp),%xmm1
movsd  0xeba(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xea6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_celsius>:
push   %rax
movsd  0xee7(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1131 <to_celsius+0x21>
addsd  0xee1(%rip),%xmm0
mulsd  0xee1(%rip),%xmm0
pop    %rax
ret
lea    0xee0(%rip),%rdi
call   1030 <perror@plt>
xorpd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Temperature under absolute zero\00"
define double @to_celsius(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, -4.596700e+02
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store double 0.000000e+00, double* %2
br label %12
8: ; preds = %1
%9 = load double, double* %3
%10 = fsub double %9, 3.200000e+01
%11 = fmul double 0x3FE1C71C71C71C72, %10
store double %11, double* %2
br label %12
12: ; preds = %8, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
@.str = [32 x i8] c"Temperature under absolute zero\00"
define double @to_celsius(double %0) {
%2 = fcmp olt double %0, -4.596700e+02
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %8
5: ; preds = %1
%6 = fadd double %0, -3.200000e+01
%7 = fmul double %6, 0x3FE1C71C71C71C72
br label %8
8: ; preds = %5, %3
%9 = phi double [ 0.000000e+00, %3 ], [ %7, %5 ]
ret double %9
}
int rcsrevtree_SCANCMP_ALL(struct rcsrev *rcsrev, void *data) { return (0); }


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

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

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

LLVM IR (-O2):
%struct.rcsrev = type opaque
define i32 @rcsrevtree_SCANCMP_ALL(%struct.rcsrev* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int SSL_String_Last_Index_Of(const char *str, const char *value) {
  int i = 0;
  int index = 0;
  char *tmp;
  for (tmp = str; *tmp != '\0'; tmp++) {
    if (*tmp == *value) {
      index = i;
      index++;
    }
    i++;
  }
  return index;
}


x86 assembly (clang, -O0):
<SSL_String_Last_Index_Of>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1171 <SSL_String_Last_Index_Of+0x71>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1157 <SSL_String_Last_Index_Of+0x57>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1122 <SSL_String_Last_Index_Of+0x22>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSL_String_Last_Index_Of>:
mov    (%rdi),%dl
test   %dl,%dl
je     1122 <SSL_String_Last_Index_Of+0x22>
mov    (%rsi),%cl
xor    %eax,%eax
mov    $0x1,%esi
nop
cmp    %cl,%dl
cmove  %esi,%eax
movzbl (%rdi,%rsi,1),%edx
add    $0x1,%rsi
test   %dl,%dl
jne    1110 <SSL_String_Last_Index_Of+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @SSL_String_Last_Index_Of(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2
%6 = load i8, i8* %1
br label %7
7: ; preds = %5, %7
%8 = phi i8 [ %3, %5 ], [ %16, %7 ]
%9 = phi i8* [ %0, %5 ], [ %15, %7 ]
%10 = phi i32 [ 0, %5 ], [ %14, %7 ]
%11 = phi i32 [ 0, %5 ], [ %13, %7 ]
%12 = icmp eq i8 %8, %6
%13 = add nuw nsw i32 %11, 1
%14 = select i1 %12, i32 %13, i32 %10
%15 = getelementptr inbounds i8, i8* %9, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %7
18: ; preds = %7, %2
%19 = phi i32 [ 0, %2 ], [ %14, %7 ]
ret i32 %19
}
long main() {
  char *x;
  long g;
  x = "dog";
  g = x + 5;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @main() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ warn(char *, char const *, char const *);
void warnpartial(char const *present, char const *absent) {
  warn("Dynamic section contains %s but no %s.", present, absent);
}


x86 assembly (clang, -O0):
<warnpartial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <warn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warnpartial>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <warn@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Dynamic section contains %s but no %s.\00"
define void @warnpartial(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 @warn(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Dynamic section contains %s but no %s.\00"
define void @warnpartial(i8* %0, i8* %1) {
%3 = tail call i32 @warn(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          size_t);
uint8_t *format_bytes(uint8_t *restrict buffer, const uint8_t *restrict bytes,
                      size_t size) {
  memcpy(buffer, bytes, size);
  return buffer + size;
}


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

x86 assembly (clang, -O2):
<format_bytes>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
lea    (%rbx,%r14,4),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32* @format_bytes(i32* noalias %0, i32* noalias %1, i64 %2) {
%4 = tail call i32 @memcpy(i32* %0, i32* %1, i64 %2)
%5 = getelementptr inbounds i32, i32* %0, i64 %2
ret i32* %5
}
void gdk_display_close() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_close() {
ret void
}
int is_taint_full(struct taint *src) { return 0; }


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

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

LLVM IR (-O0):
%struct.taint = type opaque
define i32 @is_taint_full(%struct.taint* %0) {
%2 = alloca %struct.taint*
store %struct.taint* %0, %struct.taint** %2
ret i32 0
}

LLVM IR (-O2):
%struct.taint = type opaque
define i32 @is_taint_full(%struct.taint* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ len(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
int errors(const char *errmsg, int exitval) {
  write(2, errmsg, len(errmsg));
  exit(exitval);
}


x86 assembly (clang, -O0):
<errors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <len@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1040 <write@plt>
mov    -0xc(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<errors>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <len@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    %ebp,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @errors(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 i8*, i8** %3
%7 = call i32 @len(i8* %6)
%8 = call i32 @write(i32 2, i8* %5, i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
define i32 @errors(i8* %0, i32 %1) {
%3 = tail call i32 @len(i8* %0)
%4 = tail call i32 @write(i32 2, i8* %0, i32 %3)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
long rclhdr(hdr)
register char *hdr;
{
  register long l;
  l = (hdr[3] & 0377);
  l = (l << 8) | (hdr[2] & 0377);
  l = (l << 8) | (hdr[1] & 0377);
  l = (l << 8) | (hdr[0] & 0377);
  return l;
}


x86 assembly (clang, -O0):
<rclhdr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%eax
and    $0xff,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @rclhdr(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = and i32 %7, 255
%9 = sext i32 %8 to i64
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = shl i64 %10, 8
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = and i32 %15, 255
%17 = sext i32 %16 to i64
%18 = or i64 %11, %17
store i64 %18, i64* %3
%19 = load i64, i64* %3
%20 = shl i64 %19, 8
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = and i32 %24, 255
%26 = sext i32 %25 to i64
%27 = or i64 %20, %26
store i64 %27, i64* %3
%28 = load i64, i64* %3
%29 = shl i64 %28, 8
%30 = load i8*, i8** %2
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = and i32 %33, 255
%35 = sext i32 %34 to i64
%36 = or i64 %29, %35
store i64 %36, i64* %3
%37 = load i64, i64* %3
ret i64 %37
}

LLVM IR (-O2):
define i64 @rclhdr(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %4, 16
%9 = shl nuw nsw i64 %7, 8
%10 = or i64 %9, %8
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = or i64 %10, %13
%15 = shl nuw nsw i64 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i64
%18 = or i64 %15, %17
ret i64 %18
}
/* Variables and functions */
scalar_t__ ft_isupper(unsigned char);
int ft_tolower(int c) {
  if (ft_isupper(((unsigned char)c)))
    return ('a' + (c - 'A'));
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%edi
call   1030 <ft_isupper@plt>
cmp    $0x0,%rax
je     1141 <ft_tolower+0x31>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <ft_tolower+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <ft_isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = call i64 @ft_isupper(i8 zeroext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 65
%11 = add nsw i32 97, %10
store i32 %11, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i64 @ft_isupper(i8 zeroext %2)
%4 = icmp eq i64 %3, 0
%5 = add nsw i32 %0, 32
%6 = select i1 %4, i32 %0, i32 %5
ret i32 %6
}
void delete_frame_type(char *frame) {
  frame[12] = 0x00;
  frame[13] = 0x00;
}


x86 assembly (clang, -O0):
<delete_frame_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,0xc(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0xd(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_frame_type>:
movw   $0x0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @delete_frame_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 12
store i8 0, i8* %4
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 13
store i8 0, i8* %6
ret void
}

LLVM IR (-O2):
define void @delete_frame_type(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 12
store i8 0, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 13
store i8 0, i8* %3
ret void
}
int is_bit_set(int *bitset, char n) {
  register int mask = 1;
  return ((mask << n) & (*bitset));
}


x86 assembly (clang, -O0):
<is_bit_set>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movsbl -0x9(%rbp),%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
and    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_bit_set>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @is_bit_set(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
%5 = alloca i32
store i32* %0, i32** %3
store i8 %1, i8* %4
store i32 1, i32* %5
%6 = load i32, i32* %5
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = shl i32 %6, %8
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
%12 = and i32 %9, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_bit_set(i32* nocapture %0, i8 signext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = load i32, i32* %0
%6 = and i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ llib_rnd_u32(int /*<<< orphan*/, unsigned int *);
__attribute__((unused)) int rand() {
  unsigned int ui;
  llib_rnd_u32(0, &ui);
  return (int)ui;
}


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

x86 assembly (clang, -O2):
<rand>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1030 <llib_rnd_u32@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @rand() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @llib_rnd_u32(i32 0, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
void mk20dx256_mcg_fei_24Mhz() {
  *((volatile unsigned char *)0x40064003) = (1 << 7) | (0 << 5);
}


x86 assembly (clang, -O0):
<mk20dx256_mcg_fei_24Mhz>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40064003,%eax
movb   $0x80,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mk20dx256_mcg_fei_24Mhz>:
movb   $0x80,0x40064003
80
ret

LLVM IR (-O0):
define void @mk20dx256_mcg_fei_24Mhz() {
store volatile i8 -128, i8* inttoptr (i64 1074151427 to i8*)
ret void
}

LLVM IR (-O2):
define void @mk20dx256_mcg_fei_24Mhz() {
store volatile i8 -128, i8* inttoptr (i64 1074151427 to i8*)
ret void
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_42(int Salt, int Parameter) {
  unsigned b = Salt ^ 0x583D4BCF;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_42>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x583d4bcf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_42>:
xor    $0x583d4bcf,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_42(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = xor i32 %6, 1480412111
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_42(i32 %0, i32 %1) {
%3 = xor i32 %0, 1480412111
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ insertion_sort(int *, unsigned int, int (*)(int, int));
int /*<<< orphan*/ quick_sort(int *, int /*<<< orphan*/, unsigned int,
                              int (*)(int, int));
void sort(int *collection, unsigned int size, int (*comp)(int, int)) {
  if (size < 20) {
    insertion_sort(collection, size, comp);
  } else {
    quick_sort(collection, 0, size - 1, comp);
  }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x14,-0xc(%rbp)
jae    1152 <sort+0x32>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <insertion_sort@plt>
jmp    1167 <sort+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x18(%rbp),%rcx
xor    %esi,%esi
call   1030 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
mov    %rdx,%rcx
mov    %esi,%edx
cmp    $0x13,%esi
ja     1134 <sort+0x14>
mov    %edx,%esi
mov    %rcx,%rdx
jmp    1040 <insertion_sort@plt>
add    $0xffffffff,%edx
xor    %esi,%esi
jmp    1030 <quick_sort@plt>

LLVM IR (-O0):
define void @sort(i32* %0, i32 %1, i32 (i32, i32)* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32 (i32, i32)*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 (i32, i32)* %2, i32 (i32, i32)** %6
%7 = load i32, i32* %5
%8 = icmp ult i32 %7, 20
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = load i32 (i32, i32)*, i32 (i32, i32)** %6
%13 = call i32 @insertion_sort(i32* %10, i32 %11, i32 (i32, i32)* %12)
br label %20
14: ; preds = %3
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = sub i32 %16, 1
%18 = load i32 (i32, i32)*, i32 (i32, i32)** %6
%19 = call i32 @quick_sort(i32* %15, i32 0, i32 %17, i32 (i32, i32)* %18)
br label %20
20: ; preds = %14, %9
ret void
}

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1, i32 (i32, i32)* %2) {
%4 = icmp ult i32 %1, 20
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @insertion_sort(i32* %0, i32 %1, i32 (i32, i32)* %2)
br label %10
7: ; preds = %3
%8 = add i32 %1, -1
%9 = tail call i32 @quick_sort(i32* %0, i32 0, i32 %8, i32 (i32, i32)* %2)
br label %10
10: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debugPrint(char *);
int /*<<< orphan*/ next_glTextureBarrier();
int /*<<< orphan*/ printGLError();
void glTextureBarrier() {
  next_glTextureBarrier();
  printGLError();
  debugPrint("glTextureBarrier()\n");
}


x86 assembly (clang, -O0):
<glTextureBarrier>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <next_glTextureBarrier@plt>
mov    $0x0,%al
call   1040 <printGLError@plt>
lea    0xeb7(%rip),%rdi
call   1050 <debugPrint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glTextureBarrier>:
push   %rax
xor    %eax,%eax
call   1030 <next_glTextureBarrier@plt>
xor    %eax,%eax
call   1040 <printGLError@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1050 <debugPrint@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"glTextureBarrier()\0A\00"
define void @glTextureBarrier() {
%1 = call i32 (...) @next_glTextureBarrier()
%2 = call i32 (...) @printGLError()
%3 = call i32 @debugPrint(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"glTextureBarrier()\0A\00"
define void @glTextureBarrier() {
%1 = tail call i32 (...) @next_glTextureBarrier()
%2 = tail call i32 (...) @printGLError()
%3 = tail call i32 @debugPrint(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
void gdk_window_set_icon_list() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_icon_list() {
ret void
}
int error_return(int __attribute((unit("m"))) x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @error_return(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef enum bpf_map_type { ____Placeholder_bpf_map_type } bpf_map_type;
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int bpf_create_map_node(int, char const *, int, int, int, int /*<<< orphan*/,
                        int);
int bpf_create_map_name(enum bpf_map_type map_type, const char *name,
                        int key_size, int value_size, int max_entries,
                        __u32 map_flags) {
  return bpf_create_map_node(map_type, name, key_size, value_size, max_entries,
                             map_flags, -1);
}


x86 assembly (clang, -O0):
<bpf_create_map_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
movl   $0xffffffff,(%rsp)
call   1030 <bpf_create_map_node@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_create_map_name>:
push   %rax
movl   $0xffffffff,(%rsp)
call   1030 <bpf_create_map_node@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @bpf_create_map_name(i32 %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @bpf_create_map_node(i32 %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 -1)
ret i32 %7
}
/* Type definitions */
struct dm_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dm_list_add(struct dm_list *, struct dm_list *);
int /*<<< orphan*/ dm_list_del(struct dm_list *);
void dm_list_move(struct dm_list *head, struct dm_list *elem) {
  dm_list_del(elem);
  dm_list_add(head, elem);
}


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

x86 assembly (clang, -O2):
<dm_list_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <dm_list_del@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <dm_list_add@plt>

LLVM IR (-O0):
%struct.dm_list = type { i32 }
define void @dm_list_move(%struct.dm_list* %0, %struct.dm_list* %1) {
%3 = alloca %struct.dm_list*
%4 = alloca %struct.dm_list*
store %struct.dm_list* %0, %struct.dm_list** %3
store %struct.dm_list* %1, %struct.dm_list** %4
%5 = load %struct.dm_list*, %struct.dm_list** %4
%6 = call i32 @dm_list_del(%struct.dm_list* %5)
%7 = load %struct.dm_list*, %struct.dm_list** %3
%8 = load %struct.dm_list*, %struct.dm_list** %4
%9 = call i32 @dm_list_add(%struct.dm_list* %7, %struct.dm_list* %8)
ret void
}

LLVM IR (-O2):
%struct.dm_list = type { i32 }
define void @dm_list_move(%struct.dm_list* %0, %struct.dm_list* %1) {
%3 = tail call i32 @dm_list_del(%struct.dm_list* %1)
%4 = tail call i32 @dm_list_add(%struct.dm_list* %0, %struct.dm_list* %1)
ret void
}
int jac_chain_nm4_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 26;
  return 0;
}


x86 assembly (clang, -O0):
<jac_chain_nm4_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <jac_chain_nm4_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <jac_chain_nm4_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <jac_chain_nm4_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <jac_chain_nm4_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x1a,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm4_work>:
test   %rdi,%rdi
je     110b <jac_chain_nm4_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <jac_chain_nm4_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <jac_chain_nm4_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <jac_chain_nm4_work+0x2c>
movl   $0x1a,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @jac_chain_nm4_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 26, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
int main() {
  struct foo {
    double BBBBBBBBBBBBBBBBBBB;
  } volatile bar;
  static struct foo baz;
  bar = baz;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    0x2f12(%rip),%rcx
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movsd  0x2f20(%rip),%xmm0
movsd  %xmm0,-0x8(%rsp)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.foo = type { double }
@main.baz = internal global %struct.foo zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.foo
store i32 0, i32* %1
%3 = bitcast %struct.foo* %2 to i8*
ret i32 0
}

LLVM IR (-O2):
%struct.foo = type { double }
@main.baz = internal global %struct.foo zeroinitializer
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = load volatile double, double* getelementptr inbounds (%struct.foo, %struct.foo* @main.baz, i64 0, i32 0)
store volatile double %3, double* %1
ret i32 0
}
/* Variables and functions */
int Cmd_Argc();
int /*<<< orphan*/ Cmd_Argv(int);
int /*<<< orphan*/ Com_Printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ SCR_PlayCinematic(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ atoi(int /*<<< orphan*/);
void CL_PlayCinematic_f(void) {
  if (Cmd_Argc() < 1) {
    Com_Printf("Usage: %s <name> [flags]\n", Cmd_Argv(0));
    return;
  }
  SCR_PlayCinematic(Cmd_Argv(1), atoi(Cmd_Argv(2)));
}


x86 assembly (clang, -O0):
<CL_PlayCinematic_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Cmd_Argc@plt>
cmp    $0x1,%eax
jge    1182 <CL_PlayCinematic_f+0x32>
xor    %edi,%edi
call   1050 <Cmd_Argv@plt>
mov    %eax,%esi
lea    0xe88(%rip),%rdi
call   1040 <Com_Printf@plt>
jmp    11aa <CL_PlayCinematic_f+0x5a>
mov    $0x1,%edi
call   1050 <Cmd_Argv@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1050 <Cmd_Argv@plt>
mov    %eax,%edi
call   1060 <atoi@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1070 <SCR_PlayCinematic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_PlayCinematic_f>:
push   %rbx
xor    %eax,%eax
call   1030 <Cmd_Argc@plt>
test   %eax,%eax
jle    1183 <CL_PlayCinematic_f+0x33>
mov    $0x1,%edi
call   1050 <Cmd_Argv@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1050 <Cmd_Argv@plt>
mov    %eax,%edi
call   1060 <atoi@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1070 <SCR_PlayCinematic@plt>
xor    %edi,%edi
call   1050 <Cmd_Argv@plt>
lea    0xe6f(%rip),%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: %s <name> [flags]\0A\00"
define void @CL_PlayCinematic_f() {
%1 = call i32 (...) @Cmd_Argc()
%2 = icmp slt i32 %1, 1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @Cmd_Argv(i32 0)
%5 = call i32 @Com_Printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %11
6: ; preds = %0
%7 = call i32 @Cmd_Argv(i32 1)
%8 = call i32 @Cmd_Argv(i32 2)
%9 = call i32 @atoi(i32 %8)
%10 = call i32 @SCR_PlayCinematic(i32 %7, i32 %9)
br label %11
11: ; preds = %6, %3
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Usage: %s <name> [flags]\0A\00"
define void @CL_PlayCinematic_f() {
%1 = tail call i32 (...) @Cmd_Argc()
%2 = icmp slt i32 %1, 1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @Cmd_Argv(i32 0)
%5 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %11
6: ; preds = %0
%7 = tail call i32 @Cmd_Argv(i32 1)
%8 = tail call i32 @Cmd_Argv(i32 2)
%9 = tail call i32 @atoi(i32 %8)
%10 = tail call i32 @SCR_PlayCinematic(i32 %7, i32 %9)
br label %11
11: ; preds = %6, %3
ret void
}
/* Variables and functions */
int imax(double, ...);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  printf("The maximum of %d and %d is %d.\n", 3, 5, imax(3));
  printf("The maximum of %d and %d is %d.\n", 3, 5, imax(3.0, 5.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
mov    $0x1,%al
call   1040 <imax@plt>
mov    %eax,%ecx
lea    0xec9(%rip),%rdi
mov    $0x3,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
movsd  0xea2(%rip),%xmm0
movsd  0xea2(%rip),%xmm1
mov    $0x2,%al
call   1040 <imax@plt>
mov    %eax,%ecx
lea    0xe9a(%rip),%rdi
mov    $0x3,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xed7(%rip),%xmm0
mov    $0x1,%al
call   1040 <imax@plt>
lea    0xed9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
movsd  0xeb5(%rip),%xmm1
movsd  0xea5(%rip),%xmm0
mov    $0x2,%al
call   1040 <imax@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"The maximum of %d and %d is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (double, ...) @imax(double 3.000000e+00)
%3 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3, i32 5, i32 %2)
%4 = call i32 (double, ...) @imax(double 3.000000e+00, double 5.000000e+00)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3, i32 5, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"The maximum of %d and %d is %d.\0A\00"
define i32 @main() {
%1 = tail call i32 (double, ...) @imax(double 3.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3, i32 5, i32 %1)
%3 = tail call i32 (double, ...) @imax(double 3.000000e+00, double 5.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3, i32 5, i32 %3)
ret i32 0
}
/* Variables and functions */
int strlen(const char *s) {
  int r = 0;
  while (s[r])
    r++;
  return r;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <strlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ string_append(int, char *, char *);
void handle_apm(int which, int part, char *model_string) {
  switch (part) {
  case 0x000:
    string_append(which, "X-Gene", model_string);
    break;
  default:
    string_append(which, "Unknown", model_string);
    break;
  }
}


x86 assembly (clang, -O0):
<handle_apm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    114a <handle_apm+0x3a>
jmp    1132 <handle_apm+0x22>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <string_append@plt>
jmp    115d <handle_apm+0x4d>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xeaf(%rip),%rsi
call   1030 <string_append@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_apm>:
test   %esi,%esi
lea    0xee7(%rip),%rax
lea    0xee7(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <string_append@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"X-Gene\00"
@.str.1 = [8 x i8] c"Unknown\00"
define void @handle_apm(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
switch i32 %7, label %12 [
i32 0, label %8
]
8: ; preds = %3
%9 = load i32, i32* %4
%10 = load i8*, i8** %6
%11 = call i32 @string_append(i32 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %16
12: ; preds = %3
%13 = load i32, i32* %4
%14 = load i8*, i8** %6
%15 = call i32 @string_append(i32 %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"X-Gene\00"
@.str.1 = [8 x i8] c"Unknown\00"
define void @handle_apm(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @string_append(i32 %0, i8* %5, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ halt_printf(char *);
void do_wai() { halt_printf("do_wai!\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"do_wai!\0A\00"
define void @do_wai() {
%1 = call i32 @halt_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"do_wai!\0A\00"
define void @do_wai() {
%1 = tail call i32 @halt_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzSlice_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int /*<<< orphan*/, int);
void BrzSlice_ackdown(struct comp *comp, int port) {
  struct BrzSlice_ *c = (struct BrzSlice_ *)comp;
  SEND_ACKDOWN_DELAYED(0, 0);
  SEND_DATAOFF_DELAYED(0, 1);
}


x86 assembly (clang, -O0):
<BrzSlice_ackdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SEND_DATAOFF_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzSlice_ackdown>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
xor    %edi,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <SEND_DATAOFF_DELAYED@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzSlice_ = type { i32 }
define void @BrzSlice_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzSlice_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzSlice_*
store %struct.BrzSlice_* %7, %struct.BrzSlice_** %5
%8 = call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
%9 = call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzSlice_ackdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
%4 = tail call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pnp_write_config(unsigned char, unsigned int, int);
void pnp_set_drq(unsigned char port, unsigned drq) {
  pnp_write_config(port, drq & 0xff, 0x74);
}


x86 assembly (clang, -O0):
<pnp_set_drq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x74,%edx
movzbl %al,%edi
call   1030 <pnp_write_config@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnp_set_drq>:
movzbl %sil,%esi
mov    $0x74,%edx
jmp    1030 <pnp_write_config@plt>

LLVM IR (-O0):
define void @pnp_set_drq(i8 zeroext %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 = and i32 %6, 255
%8 = call i32 @pnp_write_config(i8 zeroext %5, i32 %7, i32 116)
ret void
}

LLVM IR (-O2):
define void @pnp_set_drq(i8 zeroext %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @pnp_write_config(i8 zeroext %0, i32 %3, i32 116)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t mp_sizeof_double(double num) {
  (void)num;
  return 1 + sizeof(double);
}


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

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

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

LLVM IR (-O2):
define i32 @mp_sizeof_double(double %0) {
ret i32 9
}
/* Variables and functions */
int RetournerInformationConfig(char *, char *, char *);
int /*<<< orphan*/ printf(char *);
void testRetournerInformationConfig() {
  char *parametreALire;
  char *valeurDefaut;
  char *resultat;
  int result =
      RetournerInformationConfig(parametreALire, valeurDefaut, resultat);
  if (1) {
    printf("%%TEST_FAILED%% time=0 testname=testRetournerInformationConfig "
           "(Test_gestioncommandes) message=error message sample\n");
  }
}


x86 assembly (clang, -O0):
<testRetournerInformationConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <RetournerInformationConfig@plt>
mov    %eax,-0x1c(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [117 x i8] c"%%TEST_FAILED%% time=0 testname=testRetournerInformationConfig (Test_gestioncommandes) message=error message sample\0A\00"
define void @testRetournerInformationConfig() {
%1 = tail call i32 @RetournerInformationConfig(i8* undef, i8* undef, i8* undef)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0))
ret void
}