xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ maintest();
int /*<<< orphan*/ report_subtest(int);
int /*<<< orphan*/ wsysreg(int /*<<< orphan*/, int);
void cachetest(void) {
  report_subtest(6);
  maintest();
  wsysreg(0, 0x0081000f);
}


x86 assembly (clang, -O0):
<cachetest>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <report_subtest@plt>
mov    $0x0,%al
call   1050 <maintest@plt>
xor    %edi,%edi
mov    $0x81000f,%esi
call   1040 <wsysreg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cachetest>:
push   %rax
mov    $0x6,%edi
call   1030 <report_subtest@plt>
xor    %eax,%eax
call   1050 <maintest@plt>
xor    %edi,%edi
mov    $0x81000f,%esi
pop    %rax
jmp    1040 <wsysreg@plt>

LLVM IR (-O0):
define void @cachetest() {
%1 = call i32 @report_subtest(i32 6)
%2 = call i32 (...) @maintest()
%3 = call i32 @wsysreg(i32 0, i32 8454159)
ret void
}

LLVM IR (-O2):
define void @cachetest() {
%1 = tail call i32 @report_subtest(i32 6)
%2 = tail call i32 (...) @maintest()
%3 = tail call i32 @wsysreg(i32 0, i32 8454159)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void check_parameters(int argc, char **argv) {
  if (argc != 2) {
    printf("usage: %s ENCRYPTED_FILE\n", argv[0]);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<check_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     1156 <check_parameters+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_parameters>:
cmp    $0x2,%edi
jne    1126 <check_parameters+0x6>
ret
push   %rax
mov    (%rsi),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"usage: %s ENCRYPTED_FILE\0A\00"
define void @check_parameters(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"usage: %s ENCRYPTED_FILE\0A\00"
define void @check_parameters(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret void
}
void gtk_menu_tool_button_get_menu() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_tool_button_get_menu() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void PrintEuclidean(double dist) { printf("%f\n", dist); }


x86 assembly (clang, -O0):
<PrintEuclidean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @PrintEuclidean(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
int file2_fct1(void) {
  printf("%s\n", __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<file2_fct1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__FUNCTION__.file2_fct1 = [11 x i8] c"file2_fct1\00"
define i32 @file2_fct1() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.file2_fct1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__FUNCTION__.file2_fct1 = [11 x i8] c"file2_fct1\00"
define i32 @file2_fct1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.file2_fct1, i64 0, i64 0))
ret i32 0
}
void swap(int *el1, int *el2) {
  int tmp = *el1;
  *el1 = *el2;
  *el2 = tmp;
}


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

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

LLVM IR (-O0):
define void @swap(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 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char num_toChar(uint8_t i) {
  switch (i) {
  case 0:
    return '0';
  case 1:
    return '1';
  case 2:
    return '2';
  case 3:
    return '3';
  case 4:
    return '4';
  case 5:
    return '5';
  case 6:
    return '6';
  case 7:
    return '7';
  case 8:
    return '8';
  case 9:
    return '9';
  }
}


x86 assembly (clang, -O0):
<num_toChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x9,%rax
ja     1181 <num_toChar+0x81>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x30,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x31,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x32,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x33,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x34,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x35,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x36,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x37,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x38,-0x1(%rbp)
jmp    1181 <num_toChar+0x81>
movb   $0x39,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_toChar>:
add    $0xffffffff,%edi
lea    0x31(%rdi),%eax
cmp    $0x9,%edi
movzbl %al,%ecx
mov    $0x30,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @num_toChar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
]
5: ; preds = %1
store i8 48, i8* %2
br label %15
6: ; preds = %1
store i8 49, i8* %2
br label %15
7: ; preds = %1
store i8 50, i8* %2
br label %15
8: ; preds = %1
store i8 51, i8* %2
br label %15
9: ; preds = %1
store i8 52, i8* %2
br label %15
10: ; preds = %1
store i8 53, i8* %2
br label %15
11: ; preds = %1
store i8 54, i8* %2
br label %15
12: ; preds = %1
store i8 55, i8* %2
br label %15
13: ; preds = %1
store i8 56, i8* %2
br label %15
14: ; preds = %1
store i8 57, i8* %2
br label %15
15: ; preds = %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %1
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @num_toChar(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 9
%4 = trunc i32 %2 to i8
%5 = add i8 %4, 49
%6 = select i1 %3, i8 %5, i8 48
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ nsleep(long);
int /*<<< orphan*/ update_buttons();
void advanced_sleep(long base_ms, int multiplicator) {
  int i = 0;
  for (i = 0; i < multiplicator; i++) {
    update_buttons();
    nsleep(base_ms);
  }
}


x86 assembly (clang, -O0):
<advanced_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <advanced_sleep+0x47>
mov    $0x0,%al
call   1040 <update_buttons@plt>
mov    -0x8(%rbp),%rdi
call   1030 <nsleep@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <advanced_sleep+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<advanced_sleep>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1144 <advanced_sleep+0x24>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
xor    %eax,%eax
call   1040 <update_buttons@plt>
mov    %r14,%rdi
call   1030 <nsleep@plt>
add    $0xffffffff,%ebx
jne    1130 <advanced_sleep+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @advanced_sleep(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %14, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = call i32 (...) @update_buttons()
%12 = load i64, i64* %3
%13 = call i32 @nsleep(i64 %12)
br label %14
14: ; preds = %10
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @advanced_sleep(i64 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ 0, %2 ]
%6 = tail call i32 (...) @update_buttons()
%7 = tail call i32 @nsleep(i64 %0)
%8 = add nuw nsw i32 %5, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
int emac1_etherstatspkts512to1023octets_set(
    unsigned int dev_id, union emac1_etherstatspkts512to1023octets_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac1_etherstatspkts512to1023octets_u = type opaque
define i32 @emac1_etherstatspkts512to1023octets_set(i32 %0, %union.emac1_etherstatspkts512to1023octets_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_etherstatspkts512to1023octets_u*
store i32 %0, i32* %3
store %union.emac1_etherstatspkts512to1023octets_u* %1, %union.emac1_etherstatspkts512to1023octets_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_etherstatspkts512to1023octets_u = type opaque
define i32 @emac1_etherstatspkts512to1023octets_set(i32 %0, %union.emac1_etherstatspkts512to1023octets_u* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int apc_all(void *cls, const struct sockaddr *addr, socklen_t addrlen) {
  return 1;
}


x86 assembly (clang, -O0):
<apc_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @apc_all(i8* nocapture readnone %0, %struct.sockaddr* nocapture readnone %1, i32 %2) {
ret i32 1
}
unsigned short unsignedshort_ignoring_signedchar(unsigned short x,
                                                 signed char y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshort_ignoring_signedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @unsignedshort_ignoring_signedchar(i16 zeroext %0, i8 signext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @unsignedshort_ignoring_signedchar(i16 returned zeroext %0, i8 signext %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  printf("합계 : %d\n평균 : %d", a + b + c, (a + b + c) / 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
add    0x14(%rsp),%eax
add    0xc(%rsp),%eax
movslq %eax,%rsi
imul   $0x55555556,%rsi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x20,%rdx
add    %eax,%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [24 x i8] c"\ED\95\A9\EA\B3\84 : %d\0A\ED\8F\89\EA\B7\A0 : %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
%16 = sdiv i32 %15, 3
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [24 x i8] c"\ED\95\A9\EA\B3\84 : %d\0A\ED\8F\89\EA\B7\A0 : %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, %8
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = sdiv i32 %12, 3
%14 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int main() {
  unsigned int long sum_of_sqrs = 0;
  unsigned int long sqr_of_sums = 0;
  for (int i = 1; i <= 100; i++) {
    sum_of_sqrs += i * i;
  }
  sqr_of_sums = 100 * (100 + 1) / 2;
  sqr_of_sums *= sqr_of_sums;
  printf("%lu\n", sqr_of_sums - sum_of_sqrs);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jg     115f <main+0x4f>
mov    -0x1c(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1136 <main+0x26>
movq   $0x13ba,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
sub    -0x10(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
store i64 0, i64* %2
store i64 0, i64* %3
store i32 1, i32* %4
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %4
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
%12 = sext i32 %11 to i64
%13 = load i64, i64* %2
%14 = add i64 %13, %12
store i64 %14, i64* %2
br label %15
15: ; preds = %8
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
store i64 5050, i64* %3
%19 = load i64, i64* %3
%20 = load i64, i64* %3
%21 = mul i64 %20, %19
store i64 %21, i64* %3
%22 = load i64, i64* %3
%23 = load i64, i64* %2
%24 = sub i64 %22, %23
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 25164150)
ret i32 0
}
unsigned long cached_unmapped_pages(struct sysinfo *i) { return 0UL; }


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

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

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

LLVM IR (-O2):
%struct.sysinfo = type opaque
define i64 @cached_unmapped_pages(%struct.sysinfo* nocapture readnone %0) {
ret i64 0
}
int c_add(int a, int b) { return (b + a); }


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

x86 assembly (clang, -O2):
<c_add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @c_add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @c_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char const *);
void appuyezEntree(const char *texte) {
  printf("%s", texte);
  getchar();
}


x86 assembly (clang, -O0):
<appuyezEntree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appuyezEntree>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @appuyezEntree(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @getchar()
ret void
}
double Lab_L_to_linear(double t) {
  const double stn = 6. / 29.;
  t = (t + 0.16) * (1. / 1.16);
  if (t > stn)
    return t * t * t;
  else
    return 3. * stn * stn * (t - 4. / 29.);
}


x86 assembly (clang, -O0):
<Lab_L_to_linear>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xef2(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1164 <Lab_L_to_linear+0x64>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1186 <Lab_L_to_linear+0x86>
movsd  -0x10(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe9b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lab_L_to_linear>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xeec(%rip),%xmm3
addsd  %xmm0,%xmm3
mulsd  0xee8(%rip),%xmm3
movsd  0xee8(%rip),%xmm1
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Lab_L_to_linear(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double 0x3FCA7B9611A7B961, double* %4
%5 = load double, double* %3
%6 = fadd double %5, 1.600000e-01
%7 = fmul double %6, 0x3FEB9611A7B9611B
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp ogt double %8, 0x3FCA7B9611A7B961
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load double, double* %3
%12 = load double, double* %3
%13 = fmul double %11, %12
%14 = load double, double* %3
%15 = fmul double %13, %14
store double %15, double* %2
br label %20
16: ; preds = %1
%17 = load double, double* %3
%18 = fsub double %17, 0x3FC1A7B9611A7B96
%19 = fmul double 0x3FC07004DED20922, %18
store double %19, double* %2
br label %20
20: ; preds = %16, %10
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @Lab_L_to_linear(double %0) {
%2 = fadd double %0, 1.600000e-01
%3 = fmul double %2, 0x3FEB9611A7B9611B
%4 = fcmp ogt double %3, 0x3FCA7B9611A7B961
%5 = fmul double %3, %3
%6 = fmul double %3, %5
%7 = fadd double %3, 0xBFC1A7B9611A7B96
%8 = fmul double %7, 0x3FC07004DED20922
%9 = select i1 %4, double %6, double %8
ret double %9
}
long hash(char *str0, int len) {
  unsigned char *str = (unsigned char *)str0;
  unsigned long hash = 5381;
  int c;
  while ((c = *str++) && len--)
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x1505,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movzbl (%rax),%ecx
mov    %ecx,-0x24(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x25(%rbp)
je     1152 <hash+0x52>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    1162 <hash+0x62>
jmp    117e <hash+0x7e>
mov    -0x20(%rbp),%rax
shl    $0x5,%rax
add    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    111b <hash+0x1b>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
mov    $0x1505,%eax
test   %cl,%cl
je     1144 <hash+0x44>
test   %esi,%esi
je     1144 <hash+0x44>
mov    %esi,%r8d
mov    $0x1505,%eax
mov    $0x1,%esi
nopl   0x0(%rax)
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi,%rsi,1),%ecx
test   %cl,%cl
je     1144 <hash+0x44>
lea    0x1(%rsi),%rdx
cmp    %esi,%r8d
mov    %rdx,%rsi
jne    1120 <hash+0x20>
ret

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

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
%5 = icmp eq i32 %1, 0
%6 = or i1 %4, %5
br i1 %6, label %21, label %7
7: ; preds = %2, %7
%8 = phi i8 [ %17, %7 ], [ %3, %2 ]
%9 = phi i32 [ %13, %7 ], [ %1, %2 ]
%10 = phi i64 [ %16, %7 ], [ 5381, %2 ]
%11 = phi i8* [ %12, %7 ], [ %0, %2 ]
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = add nsw i32 %9, -1
%14 = mul i64 %10, 33
%15 = zext i8 %8 to i64
%16 = add i64 %14, %15
%17 = load i8, i8* %12
%18 = icmp eq i8 %17, 0
%19 = icmp eq i32 %13, 0
%20 = select i1 %18, i1 true, i1 %19
br i1 %20, label %21, label %7
21: ; preds = %7, %2
%22 = phi i64 [ 5381, %2 ], [ %16, %7 ]
ret i64 %22
}
OP(dd, b7) {
  illegal_1();
  op_b7();
}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_b7()
ret i32 undef
}
int init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init() {
ret i32 0
}
void quat_to_eul(const float q[4], int order, float e[3]) {
  float m[3][3];
  quat_to_mat3(q, m);
  mat3_to_eul(m, order, e);
}


x86 assembly (clang, -O0):
<quat_to_eul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <quat_to_mat3@plt>
lea    -0x40(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <mat3_to_eul@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quat_to_eul>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <quat_to_mat3@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <mat3_to_eul@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @quat_to_eul(float* %0, i32 %1, float* %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca float*
%7 = alloca [3 x [3 x float]]
store float* %0, float** %4
store i32 %1, i32* %5
store float* %2, float** %6
%8 = load float*, float** %4
%9 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %7, i64 0, i64 0
%10 = call i32 (float*, [3 x float]*, ...) bitcast (i32 (...)* @quat_to_mat3 to i32 (float*, [3 x float]*, ...)*)(float* %8, [3 x float]* %9)
%11 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %7, i64 0, i64 0
%12 = load i32, i32* %5
%13 = load float*, float** %6
%14 = call i32 ([3 x float]*, i32, float*, ...) bitcast (i32 (...)* @mat3_to_eul to i32 ([3 x float]*, i32, float*, ...)*)([3 x float]* %11, i32 %12, float* %13)
ret void
}

LLVM IR (-O2):
define void @quat_to_eul(float* %0, i32 %1, float* %2) {
%4 = alloca [3 x [3 x float]]
%5 = bitcast [3 x [3 x float]]* %4 to i8*
%6 = getelementptr inbounds [3 x [3 x float]], [3 x [3 x float]]* %4, i64 0, i64 0
%7 = call i32 (float*, [3 x float]*, ...) bitcast (i32 (...)* @quat_to_mat3 to i32 (float*, [3 x float]*, ...)*)(float* %0, [3 x float]* %6)
%8 = call i32 ([3 x float]*, i32, float*, ...) bitcast (i32 (...)* @mat3_to_eul to i32 ([3 x float]*, i32, float*, ...)*)([3 x float]* %6, i32 %1, float* %2)
ret void
}
void ar_cnt_set_dbl_notify_cnt(int my_cid, int cnt, int val, int ntf_bid0,
                               int ntf_cid0, int ntf_cnt0, int ntf_bid1,
                               int ntf_cid1, int ntf_cnt1) {}


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

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

LLVM IR (-O0):
define void @ar_cnt_set_dbl_notify_cnt(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
ret void
}

LLVM IR (-O2):
define void @ar_cnt_set_dbl_notify_cnt(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
ret void
}
void XSyncCreateCounter() {}


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

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

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

LLVM IR (-O2):
define void @XSyncCreateCounter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Yabba Dabba Doo... ;)\n");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Yabba Dabba Doo... ;)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@str = [22 x i8] c"Yabba Dabba Doo... ;)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 -1
}
extern unsigned int PHashKey_isEqual_(void *key1, void *key2) {
  return key1 == key2;
}


x86 assembly (clang, -O0):
<PHashKey_isEqual_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PHashKey_isEqual_>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @PHashKey_isEqual_(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 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @PHashKey_isEqual_(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *SHA1(void const *, size_t, void *);
size_t SHA_DIGEST_LENGTH;
void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen) {
  if (*outlen < SHA_DIGEST_LENGTH)
    return NULL;
  *outlen = SHA_DIGEST_LENGTH;
  return SHA1(in, inlen, out);
}


x86 assembly (clang, -O0):
<KDF1_SHA1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%rax
jae    114c <KDF1_SHA1+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    1172 <KDF1_SHA1+0x62>
mov    0x2e95(%rip),%rax
mov    (%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <SHA1@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KDF1_SHA1>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%rax
cmp    %rax,(%rcx)
jae    1122 <KDF1_SHA1+0x12>
xor    %eax,%eax
ret
mov    %rax,(%rcx)
jmp    1030 <SHA1@plt>

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

LLVM IR (-O2):
@SHA_DIGEST_LENGTH = global i64 0
define i8* @KDF1_SHA1(i8* %0, i64 %1, i8* %2, i64* nocapture %3) {
%5 = load i64, i64* %3
%6 = load i64, i64* @SHA_DIGEST_LENGTH
%7 = icmp ult i64 %5, %6
br i1 %7, label %10, label %8
8: ; preds = %4
store i64 %6, i64* %3
%9 = tail call i8* @SHA1(i8* %0, i64 %1, i8* %2)
br label %10
10: ; preds = %4, %8
%11 = phi i8* [ %9, %8 ], [ null, %4 ]
ret i8* %11
}
int fun345() { return 345; }


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

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

LLVM IR (-O0):
define i32 @fun345() {
ret i32 345
}

LLVM IR (-O2):
define i32 @fun345() {
ret i32 345
}
/* Variables and functions */
int glutBitmapStringWidth(void *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int glutBitmapIntWidth(void *fontface, int i) {
  char buf[64];
  snprintf(buf, 64, "%d", i);
  return glutBitmapStringWidth(fontface, buf);
}


x86 assembly (clang, -O0):
<glutBitmapIntWidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x40,%esi
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <glutBitmapStringWidth@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glutBitmapIntWidth>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xecd(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <glutBitmapStringWidth@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @glutBitmapIntWidth(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [64 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%11 = call i32 @glutBitmapStringWidth(i8* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @glutBitmapIntWidth(i8* %0, i32 %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @glutBitmapStringWidth(i8* %0, i8* %4)
ret i32 %6
}
/* Type definitions */
struct flashctx {
  int dummy;
};

/* Variables and functions */
scalar_t__ printlock_w39_common(struct flashctx *, int);
scalar_t__ unlock_w39_fwh(struct flashctx *);
int unlock_w39v040fb(struct flashctx *flash) {
  if (unlock_w39_fwh(flash))
    return -1;
  if (printlock_w39_common(flash, 0x7fff2))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<unlock_w39v040fb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unlock_w39_fwh@plt>
cmp    $0x0,%rax
je     114b <unlock_w39v040fb+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <unlock_w39v040fb+0x56>
mov    -0x10(%rbp),%rdi
mov    $0x7fff2,%esi
call   1040 <printlock_w39_common@plt>
cmp    $0x0,%rax
je     116f <unlock_w39v040fb+0x4f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <unlock_w39v040fb+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlock_w39v040fb>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlock_w39_fwh@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1138 <unlock_w39v040fb+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x7fff2,%esi
call   1040 <printlock_w39_common@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.flashctx = type { i32 }
define i32 @unlock_w39v040fb(%struct.flashctx* %0) {
%2 = alloca i32
%3 = alloca %struct.flashctx*
store %struct.flashctx* %0, %struct.flashctx** %3
%4 = load %struct.flashctx*, %struct.flashctx** %3
%5 = call i64 @unlock_w39_fwh(%struct.flashctx* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %14
8: ; preds = %1
%9 = load %struct.flashctx*, %struct.flashctx** %3
%10 = call i64 @printlock_w39_common(%struct.flashctx* %9, i32 524274)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 -1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.flashctx = type { i32 }
define i32 @unlock_w39v040fb(%struct.flashctx* %0) {
%2 = tail call i64 @unlock_w39_fwh(%struct.flashctx* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @printlock_w39_common(%struct.flashctx* %0, i32 524274)
%6 = icmp ne i64 %5, 0
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
void av_stream_get_recommended_encoder_configuration() {}


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

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

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

LLVM IR (-O2):
define void @av_stream_get_recommended_encoder_configuration() {
ret void
}
/* Variables and functions */
int my_compare_double(double, double);
int compare_double_qsort(const void *a, const void *b) {
  double da = *(double *)a;
  double db = *(double *)b;
  return my_compare_double(da, db);
}


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

x86 assembly (clang, -O2):
<compare_double_qsort>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
jmp    1030 <my_compare_double@plt>

LLVM IR (-O0):
define i32 @compare_double_qsort(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
store double %9, double* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to double*
%12 = load double, double* %11
store double %12, double* %6
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call i32 @my_compare_double(double %13, double %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_double_qsort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = tail call i32 @my_compare_double(double %4, double %6)
ret i32 %7
}
void Msp430AlarmC__1__Msp430Timer__overflow(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430AlarmC__1__Msp430Timer__overflow() {
ret void
}
char get_escape(char c) {
  switch (c) {
  case 'n':
    return '\n';
  case 'r':
    return '\r';
  case 't':
    return '\t';
  default:
    return c;
  }
}


x86 assembly (clang, -O0):
<get_escape>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x6e,%eax
je     1141 <get_escape+0x41>
jmp    111f <get_escape+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x72,%eax
je     114a <get_escape+0x4a>
jmp    1130 <get_escape+0x30>
mov    -0x8(%rbp),%eax
sub    $0x74,%eax
je     1153 <get_escape+0x53>
jmp    115c <get_escape+0x5c>
movb   $0xa,-0x1(%rbp)
jmp    1162 <get_escape+0x62>
movb   $0xd,-0x1(%rbp)
jmp    1162 <get_escape+0x62>
movb   $0x9,-0x1(%rbp)
jmp    1162 <get_escape+0x62>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_escape>:
cmp    $0x6e,%edi
je     1114 <get_escape+0x14>
mov    %edi,%eax
cmp    $0x74,%edi
je     1117 <get_escape+0x17>
cmp    $0x72,%eax
jne    1119 <get_escape+0x19>
mov    $0xd,%al
ret
mov    $0xa,%al
ret
mov    $0x9,%al
ret

LLVM IR (-O0):
define signext i8 @get_escape(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 110, label %6
i32 114, label %7
i32 116, label %8
]
6: ; preds = %1
store i8 10, i8* %2
br label %11
7: ; preds = %1
store i8 13, i8* %2
br label %11
8: ; preds = %1
store i8 9, i8* %2
br label %11
9: ; preds = %1
%10 = load i8, i8* %3
store i8 %10, i8* %2
br label %11
11: ; preds = %9, %8, %7, %6
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @get_escape(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 110, label %6
i32 114, label %3
i32 116, label %4
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8 [ %0, %5 ], [ 9, %4 ], [ 13, %3 ], [ 10, %1 ]
ret i8 %7
}
void util_init_real_time(void) {}


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

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

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

LLVM IR (-O2):
define void @util_init_real_time() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putnbr_base(size_t, int);
int /*<<< orphan*/ ft_putstr(char *);
void ft_putmem(size_t n) {
  ft_putstr("0x");
  ft_putnbr_base(n, 16);
}


x86 assembly (clang, -O0):
<ft_putmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <ft_putstr@plt>
mov    -0x8(%rbp),%rdi
mov    $0x10,%esi
call   1030 <ft_putnbr_base@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putmem>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <ft_putstr@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
pop    %rbx
jmp    1030 <ft_putnbr_base@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"0x\00"
define void @ft_putmem(i64 %0) {
%2 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @ft_putnbr_base(i64 %0, i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msm_ois_i2c_write(unsigned short, unsigned int, int);
void RegWrite(unsigned char RegAddrH, unsigned char RegAddrL,
              unsigned char RegData) {
  unsigned short reg_addr;
  unsigned int reg_data;
  reg_addr = RegAddrH << 8 | RegAddrL;
  reg_data = RegData;
  msm_ois_i2c_write(reg_addr, reg_data, 1);
}


x86 assembly (clang, -O0):
<RegWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %ax,-0x6(%rbp)
movzbl -0x3(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x6(%rbp),%ax
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
movzwl %ax,%edi
call   1030 <msm_ois_i2c_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RegWrite>:
shl    $0x8,%edi
or     %esi,%edi
mov    %edx,%esi
mov    $0x1,%edx
jmp    1030 <msm_ois_i2c_write@plt>

LLVM IR (-O0):
define void @RegWrite(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i16
store i16 %15, i16* %7
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
store i32 %17, i32* %8
%18 = load i16, i16* %7
%19 = load i32, i32* %8
%20 = call i32 @msm_ois_i2c_write(i16 zeroext %18, i32 %19, i32 1)
ret void
}

LLVM IR (-O2):
define void @RegWrite(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %0 to i16
%5 = shl nuw i16 %4, 8
%6 = zext i8 %1 to i16
%7 = or i16 %5, %6
%8 = zext i8 %2 to i32
%9 = tail call i32 @msm_ois_i2c_write(i16 zeroext %7, i32 %8, i32 1)
ret void
}