xunge/DecIR huggingface dataset:
/* Variables and functions */
int abs(int);
int __dic_hash(const char *key) {
  int h = 5381;
  unsigned char c;
  for (c = *key; c != '\0'; c = *++key)
    h = h * 33 + c;
  return abs(h % 256);
}


x86 assembly (clang, -O0):
<__dic_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
cmp    $0x0,%eax
je     1160 <__dic_hash+0x50>
imul   $0x21,-0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    0x1(%rax),%al
mov    %al,-0xd(%rbp)
jmp    112c <__dic_hash+0x1c>
mov    -0xc(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <abs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dic_hash>:
mov    (%rdi),%al
test   %al,%al
je     113b <__dic_hash+0x3b>
add    $0x1,%rdi
mov    $0x1505,%ecx
nop
movzbl %al,%eax
mov    %ecx,%edx
shl    $0x5,%edx
add    %edx,%ecx
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <__dic_hash+0x10>
lea    0xff(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xffffff00,%eax
sub    %eax,%ecx
jmp    1140 <__dic_hash+0x40>
mov    $0x5,%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @__dic_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = zext i8 %5 to i32
%9 = mul nsw i32 %6, 33
%10 = add nsw i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %10, 256
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 5, %1 ], [ %15, %14 ]
%18 = tail call i32 @llvm.abs.i32(i32 %17, i1 true)
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void TranspositionKeyCleanUp(int *seq_key) { free(seq_key); }


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

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

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

LLVM IR (-O2):
define void @TranspositionKeyCleanUp(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
unsigned getegid(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getegid() {
ret i32 0
}
/* Variables and functions */
unsigned int readu4(unsigned char *);
int /*<<< orphan*/ zipdie(char *);
unsigned long long zip_entry_fhpos(unsigned char *entry) {
  unsigned int pos = readu4(entry + 42);
  if (pos == 0xffffffff)
    zipdie("zip64 not supported yet");
  return pos;
}


x86 assembly (clang, -O0):
<zip_entry_fhpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x2a,%rdi
call   1030 <readu4@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1152 <zip_entry_fhpos+0x32>
lea    0xeb3(%rip),%rdi
call   1040 <zipdie@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zip_entry_fhpos>:
push   %rbx
add    $0x2a,%rdi
call   1030 <readu4@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    113d <zip_entry_fhpos+0x1d>
lea    0xec8(%rip),%rdi
call   1040 <zipdie@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"zip64 not supported yet\00"
define i64 @zip_entry_fhpos(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 42
%6 = call i32 @readu4(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @zipdie(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i32, i32* %3
%13 = zext i32 %12 to i64
ret i64 %13
}

LLVM IR (-O2):
@.str = [24 x i8] c"zip64 not supported yet\00"
define i64 @zip_entry_fhpos(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 42
%3 = tail call i32 @readu4(i8* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @zipdie(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = zext i32 %3 to i64
ret i64 %8
}
unsigned int g(unsigned int X, unsigned int Y, unsigned int Z) {
  return ((X & Y) | (X & Z) | (Y & Z));
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
mov    %edx,%eax
or     %esi,%eax
and    %edi,%eax
and    %esi,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @g(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = or i32 %9, %12
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @g(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %2, %1
%5 = and i32 %4, %0
%6 = and i32 %2, %1
%7 = or i32 %5, %6
ret i32 %7
}
void gtk_rc_style_ref() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_style_ref() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ getArr(int, int *);
int getInt();
int /*<<< orphan*/ prnRank(int, int *);
int main() {
  int num, scores[1000];
  num = getInt();
  getArr(num, scores);
  prnRank(num, scores);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getInt@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xfb0(%rbp),%rsi
call   1030 <getArr@plt>
mov    -0x8(%rbp),%edi
lea    -0xfb0(%rbp),%rsi
call   1050 <prnRank@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%eax
add    $0xfb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xfa8,%rsp
xor    %eax,%eax
call   1040 <getInt@plt>
mov    %eax,%ebx
mov    %rsp,%r14
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <getArr@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <prnRank@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
add    $0xfa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i32]
store i32 0, i32* %1
%4 = call i32 (...) @getInt()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 0
%7 = call i32 @getArr(i32 %5, i32* %6)
%8 = load i32, i32* %2
%9 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 0
%10 = call i32 @prnRank(i32 %8, i32* %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [1000 x i32]
%2 = bitcast [1000 x i32]* %1 to i8*
%3 = tail call i32 (...) @getInt()
%4 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 0
%5 = call i32 @getArr(i32 %3, i32* %4)
%6 = call i32 @prnRank(i32 %3, i32* %4)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int fast_pow(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(int argc, const char *argv[]) {
  int a, b, m;
  scanf("%i %i %i", &a, &b, &m);
  printf("%i", fast_pow(a, b, m));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1050 <fast_pow@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1050 <fast_pow@plt>
lea    0xe9f(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%i %i %i\00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @fast_pow(i32 %10, i32 %11, i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%i %i %i\00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @fast_pow(i32 %10, i32 %11, i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
void *btp_malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *btp_mallocz(size_t size) {
  void *ptr = btp_malloc(size);
  memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<btp_mallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <btp_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btp_mallocz>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <btp_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @btp_mallocz(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @btp_malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @btp_mallocz(i64 %0) {
%2 = tail call i8* @btp_malloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
void rtc_dev_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @rtc_dev_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ invite(char *);
int /*<<< orphan*/ scanf(char *, char *);
char *quel_nom(void) {
  static char nom_fichier[50 + 1];
  invite("Nom de fichier:");
  scanf("%"
        "50"
        "[^\n]",
        nom_fichier);
  (void)getchar();
  return nom_fichier;
}


x86 assembly (clang, -O0):
<quel_nom>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <invite@plt>
lea    0xec9(%rip),%rdi
lea    0x2f02(%rip),%rsi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
lea    0x2eef(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quel_nom>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <invite@plt>
lea    0xecc(%rip),%rdi
lea    0x2f05(%rip),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@quel_nom.nom_fichier = internal global [51 x i8] zeroinitializer
@.str = [16 x i8] c"Nom de fichier:\00"
@.str.1 = [8 x i8] c"%50[^\0A]\00"
define i8* @quel_nom() {
%1 = call i32 @invite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @quel_nom.nom_fichier, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret i8* getelementptr inbounds ([51 x i8], [51 x i8]* @quel_nom.nom_fichier, i64 0, i64 0)
}

LLVM IR (-O2):
@quel_nom.nom_fichier = internal global [51 x i8] zeroinitializer
@.str = [16 x i8] c"Nom de fichier:\00"
@.str.1 = [8 x i8] c"%50[^\0A]\00"
define i8* @quel_nom() {
%1 = tail call i32 @invite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @quel_nom.nom_fichier, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret i8* getelementptr inbounds ([51 x i8], [51 x i8]* @quel_nom.nom_fichier, i64 0, i64 0)
}
int invariant_strcmp(const char *s, const char *t) {
  int v = 0;
  while (0 == (v = (unsigned)(*s) - (unsigned)(*t)) && *t)
    ++s, ++t;
  return v;
}


x86 assembly (clang, -O0):
<invariant_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    %eax,%edx
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %edx,%ecx
mov    %al,-0x15(%rbp)
jne    1145 <invariant_strcmp+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1155 <invariant_strcmp+0x55>
jmp    1172 <invariant_strcmp+0x72>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <invariant_strcmp+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invariant_strcmp>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
jne    1134 <invariant_strcmp+0x34>
test   %cl,%cl
je     1134 <invariant_strcmp+0x34>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
sub    %edx,%eax
jne    1134 <invariant_strcmp+0x34>
add    $0x1,%rcx
test   %dl,%dl
jne    1120 <invariant_strcmp+0x20>
ret

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

LLVM IR (-O2):
define i32 @invariant_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
%8 = icmp ne i32 %7, 0
%9 = icmp eq i8 %5, 0
%10 = select i1 %8, i1 true, i1 %9
br i1 %10, label %24, label %11
11: ; preds = %2, %11
%12 = phi i8* [ %15, %11 ], [ %1, %2 ]
%13 = phi i8* [ %14, %11 ], [ %0, %2 ]
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = getelementptr inbounds i8, i8* %12, i64 1
%16 = load i8, i8* %14
%17 = sext i8 %16 to i32
%18 = load i8, i8* %15
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %17, %19
%21 = icmp ne i32 %20, 0
%22 = icmp eq i8 %18, 0
%23 = select i1 %21, i1 true, i1 %22
br i1 %23, label %24, label %11
24: ; preds = %11, %2
%25 = phi i32 [ %7, %2 ], [ %20, %11 ]
ret i32 %25
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int,
                           unsigned int);
int /*<<< orphan*/ stdout;
bool got_geometry(unsigned int width, unsigned int height, void *data) {
  fprintf(stdout, "%d %d\n", width, height);
  return true;
}


x86 assembly (clang, -O0):
<got_geometry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<got_geometry>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @got_geometry(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* @stdout
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 1
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @got_geometry(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 1
}
unsigned int get_seed(void) {
  unsigned int val;
  __asm__ volatile("rdtsc" : "=A"(val));
  return val;
}


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

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

LLVM IR (-O0):
define i32 @get_seed() {
%1 = alloca i32
%2 = call i32 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @get_seed() {
%1 = tail call i32 asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int /*<<< orphan*/ test_thread_init(int, char **);
int /*<<< orphan*/ test_thread_policy(int, char **);
int main(int argc, char *argv[]) {
  test_thread_init(argc, argv);
  test_thread_policy(argc, argv);
  pause();
  return 0;
}


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <test_thread_init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <test_thread_policy@plt>
mov    $0x0,%al
call   1040 <pause@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <test_thread_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <test_thread_policy@plt>
xor    %eax,%eax
call   1040 <pause@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @test_thread_init(i32 %6, i8** %7)
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @test_thread_policy(i32 %9, i8** %10)
%12 = call i32 (...) @pause()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_thread_init(i32 %0, i8** %1)
%4 = tail call i32 @test_thread_policy(i32 %0, i8** %1)
%5 = tail call i32 (...) @pause()
ret i32 0
}
float *vec2_subtract(float *result, float *a, float *b) {
  result[0] = a[0] - b[0];
  result[1] = a[1] - b[1];
  return result;
}


x86 assembly (clang, -O0):
<vec2_subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_subtract>:
mov    %rdi,%rax
movss  (%rsi),%xmm0
subss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
subss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
ret

LLVM IR (-O0):
define float* @vec2_subtract(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %4
ret float* %25
}

LLVM IR (-O2):
define float* @vec2_subtract(float* returned writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fsub float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
ret float* %0
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ IntEnable(unsigned long);
int /*<<< orphan*/ IntRegister(unsigned long, void (*)());
int /*<<< orphan*/ UARTBaseValid(unsigned long);
unsigned long UARTIntNumberGet(unsigned long);
void UARTIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  unsigned long ulInt;
  DEBUG_ASSERT(UARTBaseValid(ulBase));
  ulInt = UARTIntNumberGet(ulBase);
  IntRegister(ulInt, pfnHandler);
  IntEnable(ulInt);
}


x86 assembly (clang, -O0):
<UARTIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <UARTBaseValid@plt>
mov    %eax,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UARTIntNumberGet@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <IntRegister@plt>
mov    -0x18(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntRegister>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1070 <UARTBaseValid@plt>
mov    %eax,%edi
call   1060 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1040 <UARTIntNumberGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <IntRegister@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @UARTIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load i64, i64* %3
%7 = call i32 @UARTBaseValid(i64 %6)
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %3
%10 = call i64 @UARTIntNumberGet(i64 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load void ()*, void ()** %4
%13 = bitcast void ()* %12 to void (...)*
%14 = call i32 @IntRegister(i64 %11, void (...)* %13)
%15 = load i64, i64* %5
%16 = call i32 @IntEnable(i64 %15)
ret void
}

LLVM IR (-O2):
define void @UARTIntRegister(i64 %0, void ()* %1) {
%3 = tail call i32 @UARTBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = tail call i64 @UARTIntNumberGet(i64 %0)
%6 = bitcast void ()* %1 to void (...)*
%7 = tail call i32 @IntRegister(i64 %5, void (...)* %6)
%8 = tail call i32 @IntEnable(i64 %5)
ret void
}
unsigned int intel_dp_unused_lane_mask(int lane_count) {
  return ~((1 << lane_count) - 1) & 0xf;
}


x86 assembly (clang, -O0):
<intel_dp_unused_lane_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
xor    $0xffffffff,%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_dp_unused_lane_mask>:
mov    %edi,%ecx
mov    $0xf,%eax
shr    %cl,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @intel_dp_unused_lane_mask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
%5 = sub nsw i32 %4, 1
%6 = xor i32 %5, -1
%7 = and i32 %6, 15
ret i32 %7
}

LLVM IR (-O2):
define i32 @intel_dp_unused_lane_mask(i32 %0) {
%2 = shl nsw i32 -1, %0
%3 = and i32 %2, 15
ret i32 %3
}
int extern_func(int x) { return x + 3; }


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

x86 assembly (clang, -O2):
<extern_func>:
lea    0x3(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @extern_func(i32 %0) {
%2 = add nsw i32 %0, 3
ret i32 %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int count_1s(uint64_t b) {
  int r;
  for (r = 0; b; r++, b &= b - 1)
    ;
  return r;
}


x86 assembly (clang, -O0):
<count_1s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1137 <count_1s+0x37>
jmp    111d <count_1s+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110e <count_1s+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_1s>:
xor    %eax,%eax
test   %edi,%edi
je     111c <count_1s+0x1c>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <count_1s+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_1s(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = add nsw i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
float nx_min_s(float x, float y) { return (x < y) ? x : y; }


x86 assembly (clang, -O0):
<nx_min_s>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <nx_min_s+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <nx_min_s+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nx_min_s>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @nx_min_s(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @nx_min_s(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void ff_hevc_put_hevc_uni_qpel_h48_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_h48_8_avx2() {
ret void
}
int getpgid(int pid) {}


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

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

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

LLVM IR (-O2):
define i32 @getpgid(i32 %0) {
ret i32 undef
}
/* Type definitions */
struct ac_buffer {
  int dummy;
};

/* Variables and functions */
int _buffer_write(struct ac_buffer *, float *, int);
int buffer_write_float(struct ac_buffer *buffer, float value) {
  return _buffer_write(buffer, &value, sizeof(float));
}


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

x86 assembly (clang, -O2):
<buffer_write_float>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <_buffer_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.ac_buffer = type { i32 }
define i32 @buffer_write_float(%struct.ac_buffer* %0, float %1) {
%3 = alloca %struct.ac_buffer*
%4 = alloca float
store %struct.ac_buffer* %0, %struct.ac_buffer** %3
store float %1, float* %4
%5 = load %struct.ac_buffer*, %struct.ac_buffer** %3
%6 = call i32 @_buffer_write(%struct.ac_buffer* %5, float* %4, i32 4)
ret i32 %6
}

LLVM IR (-O2):
%struct.ac_buffer = type { i32 }
define i32 @buffer_write_float(%struct.ac_buffer* %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = call i32 @_buffer_write(%struct.ac_buffer* %0, float* %3, i32 4)
ret i32 %4
}
int my_isspace(char ch) {
  return (ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' || ch == '\v' ||
          ch == '\f');
}


x86 assembly (clang, -O0):
<my_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1171 <my_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1171 <my_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1171 <my_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1171 <my_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     1171 <my_isspace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0xc,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isspace>:
cmp    $0x20,%dil
ja     1120 <my_isspace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002e00,%rdx
bt     %rcx,%rdx
jae    1120 <my_isspace+0x20>
ret
xor    %eax,%eax
cmp    $0xc,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @my_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 11, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 12
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
struct socket {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ panic(char *);
int sock_getname(struct socket *so, struct sockaddr *addr, int *sockaddr_len,
                 int peer) {
  panic("sock_getname() not implemented\n");
  return (0);
}


x86 assembly (clang, -O0):
<sock_getname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <panic@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.socket = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [32 x i8] c"sock_getname() not implemented\0A\00"
define i32 @sock_getname(%struct.socket* %0, %struct.sockaddr* %1, i32* %2, i32 %3) {
%5 = alloca %struct.socket*
%6 = alloca %struct.sockaddr*
%7 = alloca i32*
%8 = alloca i32
store %struct.socket* %0, %struct.socket** %5
store %struct.sockaddr* %1, %struct.sockaddr** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.socket = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [32 x i8] c"sock_getname() not implemented\0A\00"
define i32 @sock_getname(%struct.socket* nocapture readnone %0, %struct.sockaddr* nocapture readnone %1, i32* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int argOneNotNull(int *, int *);
void f(int *p1, int *p2) {
  int x;
  for (;;) {
    if (argOneNotNull(p1, &x) > 10)
      return;
    p1 = p2;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <argOneNotNull@plt>
cmp    $0xa,%eax
jle    113c <f+0x2c>
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <f+0x10>

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0x4(%rsp),%rsi
call   1030 <argOneNotNull@plt>
cmp    $0xa,%eax
jg     1140 <f+0x30>
lea    0x4(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <argOneNotNull@plt>
cmp    $0xb,%eax
jl     1130 <f+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @f(i32* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @argOneNotNull(i32* %0, i32* %3)
%6 = icmp sgt i32 %5, 10
br i1 %6, label %10, label %7
7: ; preds = %2, %7
%8 = call i32 @argOneNotNull(i32* %1, i32* %3)
%9 = icmp sgt i32 %8, 10
br i1 %9, label %10, label %7
10: ; preds = %7, %2
ret void
}
int do_093() { return 93; }


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

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

LLVM IR (-O0):
define i32 @do_093() {
ret i32 93
}

LLVM IR (-O2):
define i32 @do_093() {
ret i32 93
}
/* Variables and functions */
int /*<<< orphan*/ mhook_print_unfree();
int /*<<< orphan*/ test_string_encode();
int main() {
  test_string_encode();
  mhook_print_unfree();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_string_encode@plt>
mov    $0x0,%al
call   1040 <mhook_print_unfree@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_string_encode()
%3 = call i32 (...) @mhook_print_unfree()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_string_encode()
%2 = tail call i32 (...) @mhook_print_unfree()
ret i32 0
}
/* Variables and functions */
int mat3d_invert_new(double *, double *);
int mat3d_invert(double matrix[9]) { return mat3d_invert_new(matrix, matrix); }


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

x86 assembly (clang, -O2):
<mat3d_invert>:
mov    %rdi,%rsi
jmp    1030 <mat3d_invert_new@plt>

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

LLVM IR (-O2):
define i32 @mat3d_invert(double* %0) {
%2 = tail call i32 @mat3d_invert_new(double* %0, double* %0)
ret i32 %2
}
/* Variables and functions */
int f78(int *);
int f79(int *p) { return f78(p); }


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

x86 assembly (clang, -O2):
<f79>:
jmp    1030 <f78@plt>

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

LLVM IR (-O2):
define i32 @f79(i32* %0) {
%2 = tail call i32 @f78(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
scalar_t__ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int mc_process_exist(pid_t pid) { return (0 == kill(pid, 0)) ? 1 : 0; }


x86 assembly (clang, -O0):
<mc_process_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <kill@plt>
mov    %rax,%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_process_exist>:
push   %rax
xor    %esi,%esi
call   1030 <kill@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mc_process_exist(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @kill(i32 %3, i32 0)
%5 = icmp eq i64 0, %4
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @mc_process_exist(i32 %0) {
%2 = tail call i64 @kill(i32 %0, i32 0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int ioprio_set(int which __attribute__((unused)),
               int who __attribute__((unused)),
               int ioprio __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @ioprio_set(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @ioprio_set(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
int g_DUMMY_menu_append_separator(int menu_id) {
  menu_id = menu_id;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @g_DUMMY_menu_append_separator(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int _strToUtf8(char *, char const *, int, int, int *, int);
int strToEscapedUri(char *dest, const char *src, int destSize, int isWide,
                    int *charactersConverted) {
  return _strToUtf8(dest, src, destSize, isWide, charactersConverted, 1);
}


x86 assembly (clang, -O0):
<strToEscapedUri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    $0x1,%r9d
call   1030 <_strToUtf8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strToEscapedUri>:
mov    $0x1,%r9d
jmp    1030 <_strToUtf8@plt>

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

LLVM IR (-O2):
define i32 @strToEscapedUri(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = tail call i32 @_strToUtf8(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4, i32 1)
ret i32 %6
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double getCurrentTime() {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return (tv.tv_sec + (double)tv.tv_usec / 1e6);
}


x86 assembly (clang, -O0):
<getCurrentTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xeca(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCurrentTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @getCurrentTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %4, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @getCurrentTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ io_program_out(int, int);
void pic12_increment_address(void) { io_program_out(0x06, 6); }


x86 assembly (clang, -O0):
<pic12_increment_address>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%esi
mov    %esi,%edi
call   1030 <io_program_out@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic12_increment_address>:
mov    $0x6,%edi
mov    $0x6,%esi
jmp    1030 <io_program_out@plt>

LLVM IR (-O0):
define void @pic12_increment_address() {
%1 = call i32 @io_program_out(i32 6, i32 6)
ret void
}

LLVM IR (-O2):
define void @pic12_increment_address() {
%1 = tail call i32 @io_program_out(i32 6, i32 6)
ret void
}