xunge/DecIR huggingface dataset:
int LPeek(const void *a) {
  int r;
  unsigned char *c = (unsigned char *)a;
  r = c[0] + (c[1] << 8) + (c[2] << 16) + ((int)(signed char)c[3] << 24);
  return r;
}


x86 assembly (clang, -O0):
<LPeek>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @LPeek(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = add nsw i32 %9, %14
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 16
%21 = add nsw i32 %15, %20
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = shl i32 %25, 24
%27 = add nsw i32 %21, %26
store i32 %27, i32* %3
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @LPeek(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Type definitions */
struct set {
  int dummy;
};

/* Variables and functions */
size_t set_query(void *, size_t, struct set *, void *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
size_t set_query_string(void *out, size_t nmemb, struct set *t, char *s) {
  return set_query(out, nmemb, t, (void *)s, strlen(s));
}


x86 assembly (clang, -O0):
<set_query_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %eax,%r8d
call   1040 <set_query@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_query_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rcx,%rdi
call   1030 <strlen@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <set_query@plt>

LLVM IR (-O0):
%struct.set = type { i32 }
define i64 @set_query_string(i8* %0, i64 %1, %struct.set* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca %struct.set*
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store %struct.set* %2, %struct.set** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load %struct.set*, %struct.set** %7
%12 = load i8*, i8** %8
%13 = load i8*, i8** %8
%14 = call i32 @strlen(i8* %13)
%15 = call i64 @set_query(i8* %9, i64 %10, %struct.set* %11, i8* %12, i32 %14)
ret i64 %15
}

LLVM IR (-O2):
%struct.set = type { i32 }
define i64 @set_query_string(i8* %0, i64 %1, %struct.set* %2, i8* %3) {
%5 = tail call i32 @strlen(i8* %3)
%6 = tail call i64 @set_query(i8* %0, i64 %1, %struct.set* %2, i8* %3, i32 %5)
ret i64 %6
}
int main() {
  int i = 0;
  int result = 10;
  switch (i) {
  case 0:
    result = 5;
    break;
  case 1:
    result = 8;
    break;
  case 2:
    result = 9;
    break;
  case 3:
    result = 2;
    break;
  default:
    result = 13;
  }
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     116e <main+0x6e>
mov    -0x18(%rbp),%rax
lea    0xecb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x5,-0xc(%rbp)
jmp    1175 <main+0x75>
movl   $0x8,-0xc(%rbp)
jmp    1175 <main+0x75>
movl   $0x9,-0xc(%rbp)
jmp    1175 <main+0x75>
movl   $0x2,-0xc(%rbp)
jmp    1175 <main+0x75>
movl   $0xd,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
void writeBit(int8_t *buf, int x, int8_t val) {
  int byteNum = x / 8;
  int offset = x % 8;
  if (val) {
    buf[byteNum] |= 1 << (7 - offset);
  }
}


x86 assembly (clang, -O0):
<writeBit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1151 <writeBit+0x51>
mov    $0x7,%ecx
sub    -0x18(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeBit>:
test   %edx,%edx
je     1128 <writeBit+0x28>
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
mov    %eax,%edx
sar    $0x3,%edx
and    $0xfffffff8,%eax
sub    %eax,%esi
mov    $0x7,%cl
sub    %sil,%cl
mov    $0x1,%eax
shl    %cl,%eax
movslq %edx,%rcx
or     %eax,(%rdi,%rcx,4)
ret

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

LLVM IR (-O2):
define void @writeBit(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = srem i32 %1, 8
%7 = sdiv i32 %1, 8
%8 = sub nsw i32 7, %6
%9 = shl nuw nsw i32 1, %8
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = or i32 %12, %9
store i32 %13, i32* %11
br label %14
14: ; preds = %5, %3
ret void
}
/* Variables and functions */
int match(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    printf("Usage: %s <pat> <str>\n", argv[0]);
    return 1;
  }
  return match(argv[1], argv[2]);
}


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)
cmpl   $0x3,-0x8(%rbp)
jge    115f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1177 <main+0x57>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <match@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jg     113c <main+0x1c>
mov    (%rsi),%rsi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
pop    %rax
jmp    1040 <match@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: %s <pat> <str>\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 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11)
store i32 1, i32* %3
br label %21
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @match(i8* %16, i8* %19)
store i32 %20, i32* %3
br label %21
21: ; preds = %13, %8
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: %s <pat> <str>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %13
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @match(i8* %9, i8* %11)
br label %13
13: ; preds = %7, %4
%14 = phi i32 [ 1, %4 ], [ %12, %7 ]
ret i32 %14
}
void GLUE_MOVE_PX_STACKPTR_GEN(void *b, int wv) {
  static const unsigned int tab[3] = {
      0x7c230b78,
      0x7c2e0b78,
      0x7c2f0b78,
  };
  *(unsigned int *)b = tab[wv];
}


x86 assembly (clang, -O0):
<GLUE_MOVE_PX_STACKPTR_GEN>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
lea    0xeea(%rip),%rax
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_MOVE_PX_STACKPTR_GEN>:
movslq %esi,%rax
lea    0xef6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
@GLUE_MOVE_PX_STACKPTR_GEN.tab = internal constant [3 x i32] [i32 2082671480, i32 2083392376, i32 2083457912]
define void @GLUE_MOVE_PX_STACKPTR_GEN(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [3 x i32], [3 x i32]* @GLUE_MOVE_PX_STACKPTR_GEN.tab, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
ret void
}

LLVM IR (-O2):
@GLUE_MOVE_PX_STACKPTR_GEN.tab = internal unnamed_addr constant [3 x i32] [i32 2082671480, i32 2083392376, i32 2083457912]
define void @GLUE_MOVE_PX_STACKPTR_GEN(i8* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [3 x i32], [3 x i32]* @GLUE_MOVE_PX_STACKPTR_GEN.tab, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = bitcast i8* %0 to i32*
store i32 %5, i32* %6
ret void
}
const char *plugin_api_info_charset_internal_cb(void *data,
                                                const char *info_name,
                                                const char *arguments) {
  (void)data;
  (void)info_name;
  (void)arguments;
  return "UTF-8";
}


x86 assembly (clang, -O0):
<plugin_api_info_charset_internal_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xee9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_info_charset_internal_cb>:
lea    0xef9(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"UTF-8\00"
define i8* @plugin_api_info_charset_internal_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void strcat_symbolic_dst_length_taint(char *dst) {
  scanf("%s", dst);
  strcat(dst, "1234");
  clang_analyzer_eval(strlen(dst) >= 4);
}


x86 assembly (clang, -O0):
<strcat_symbolic_dst_length_taint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x4,%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat_symbolic_dst_length_taint>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xea9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %edi,%edi
cmp    $0x4,%eax
setge  %dil
pop    %rbx
jmp    1060 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"1234\00"
define void @strcat_symbolic_dst_length_taint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
%9 = icmp sge i32 %8, 4
%10 = zext i1 %9 to i32
%11 = call i32 @clang_analyzer_eval(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"1234\00"
define void @strcat_symbolic_dst_length_taint(i8* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp sgt i32 %4, 3
%6 = zext i1 %5 to i32
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
int f(void) {
  int x, y, z;
#pragma omp task shared(x) firstprivate(y) private(z)
  {
    x = 1;
    y = 2;
    z = 3;
  }
#pragma omp taskwait
  return x + y + z;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 6
}
/* Variables and functions */
char *UTIL_mallocStr(scalar_t__);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *OC_mkCompare(char *name) {
  char *text = UTIL_mallocStr(strlen(name) + 15);
  strcpy(text, "(const == ");
  strcat(text, name);
  strcat(text, ")");
  return text;
}


x86 assembly (clang, -O0):
<OC_mkCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0xf,%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x10(%rbp),%rdi
lea    0xe7e(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OC_mkCompare>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0xf(%rax),%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,%rbx
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"(const == \00"
@.str.1 = [2 x i8] c")\00"
define i8* @OC_mkCompare(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 15
%7 = call i8* @UTIL_mallocStr(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @strcat(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = call i32 @strcat(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [11 x i8] c"(const == \00"
@.str.1 = [2 x i8] c")\00"
define i8* @OC_mkCompare(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 15
%4 = tail call i8* @UTIL_mallocStr(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @strcat(i8* %4, i8* %0)
%7 = tail call i32 @strcat(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i8* %4
}
/* Variables and functions */
scalar_t__ malloc(int);
int *allocVector2(int n) { return (int *)malloc(n * sizeof(int)); }


x86 assembly (clang, -O0):
<allocVector2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocVector2>:
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @allocVector2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul i64 %4, 4
%6 = trunc i64 %5 to i32
%7 = call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i32*
ret i32* %8
}

LLVM IR (-O2):
define i32* @allocVector2(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
/* Type definitions */
struct dpx_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dpx_load(struct dpx_t *, char const *);
int /*<<< orphan*/ dpx_write(struct dpx_t *);
void dpx_send(struct dpx_t *dpx, const char *msg) {
  dpx_load(dpx, msg);
  dpx_write(dpx);
}


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

x86 assembly (clang, -O2):
<dpx_send>:
push   %rbx
mov    %rdi,%rbx
call   1030 <dpx_load@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <dpx_write@plt>

LLVM IR (-O0):
%struct.dpx_t = type { i32 }
define void @dpx_send(%struct.dpx_t* %0, i8* %1) {
%3 = alloca %struct.dpx_t*
%4 = alloca i8*
store %struct.dpx_t* %0, %struct.dpx_t** %3
store i8* %1, i8** %4
%5 = load %struct.dpx_t*, %struct.dpx_t** %3
%6 = load i8*, i8** %4
%7 = call i32 @dpx_load(%struct.dpx_t* %5, i8* %6)
%8 = load %struct.dpx_t*, %struct.dpx_t** %3
%9 = call i32 @dpx_write(%struct.dpx_t* %8)
ret void
}

LLVM IR (-O2):
%struct.dpx_t = type { i32 }
define void @dpx_send(%struct.dpx_t* %0, i8* %1) {
%3 = tail call i32 @dpx_load(%struct.dpx_t* %0, i8* %1)
%4 = tail call i32 @dpx_write(%struct.dpx_t* %0)
ret void
}
int is_space(int ch) {
  return ch == ' ' || ch == '\t' || ch == '\v' || ch == '\f' || ch == '\r';
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_space+0x4d>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_space+0x4d>
mov    $0x1,%al
cmpl   $0xb,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_space+0x4d>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114d <is_space+0x4d>
cmpl   $0xd,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%edi
ja     111d <is_space+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100001a00,%rdx
bt     %rcx,%rdx
jae    111d <is_space+0x1d>
ret
xor    %eax,%eax
cmp    $0xd,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_space(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %17, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %17, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 11
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 12
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 13
br label %17
17: ; preds = %14, %11, %8, %5, %1
%18 = phi i1 [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_space(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 12, label %5
i32 11, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int test_imm_83int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x83 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_83int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x83,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_83int64_midword_mem>:
testb  $0x83,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_83int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 131
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_83int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 8585216
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void rtos_disable_rt_warning() {}


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

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

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

LLVM IR (-O2):
define void @rtos_disable_rt_warning() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
int main() {
  mkdir("tmp/subdirnew", 0777);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"tmp/subdirnew\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 511)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"tmp/subdirnew\00"
define i32 @main() {
%1 = tail call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 511)
ret i32 0
}
/* Variables and functions */
int ft_strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void show_error(char *str) {
  write(2, "Error: ", 8);
  write(2, str, ft_strlen(str));
  write(2, "\n", 1);
}


x86 assembly (clang, -O0):
<show_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2,%edi
lea    0xec8(%rip),%rsi
mov    $0x8,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xe99(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_error>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
mov    $0x2,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1040 <ft_strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xeb0(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @show_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @write(i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8)
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @ft_strlen(i8* %5)
%7 = call i32 @write(i32 2, i8* %4, i32 %6)
%8 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @show_error(i8* %0) {
%2 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 @ft_strlen(i8* %0)
%4 = tail call i32 @write(i32 2, i8* %0, i32 %3)
%5 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
int main() {
  if (5 != 5)
    return 5;
  else
    return 4;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int getReadLock(void *);
int getWriteLock(void *);
int /*<<< orphan*/ semaphoreDestroy(int);
void dsDestroy(void *mem) {
  int rsemid, wsemid;
  rsemid = getReadLock(mem);
  wsemid = getWriteLock(mem);
  semaphoreDestroy(rsemid);
  semaphoreDestroy(wsemid);
}


x86 assembly (clang, -O0):
<dsDestroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getReadLock@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getWriteLock@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <semaphoreDestroy@plt>
mov    -0x10(%rbp),%edi
call   1050 <semaphoreDestroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsDestroy>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <getReadLock@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <getWriteLock@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1050 <semaphoreDestroy@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <semaphoreDestroy@plt>

LLVM IR (-O0):
define void @dsDestroy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @getReadLock(i8* %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = call i32 @getWriteLock(i8* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @semaphoreDestroy(i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @semaphoreDestroy(i32 %11)
ret void
}

LLVM IR (-O2):
define void @dsDestroy(i8* %0) {
%2 = tail call i32 @getReadLock(i8* %0)
%3 = tail call i32 @getWriteLock(i8* %0)
%4 = tail call i32 @semaphoreDestroy(i32 %2)
%5 = tail call i32 @semaphoreDestroy(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(char *, int, int, int /*<<< orphan*/ *);
int WRITESTR(FILE *fp, char *str, int count) {
  return fwrite(str, 1, count, fp) == count;
}


x86 assembly (clang, -O0):
<WRITESTR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WRITESTR>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @WRITESTR(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @fwrite(i8* %7, i32 1, i32 %8, i32* %9)
%11 = load i32, i32* %6
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @WRITESTR(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @fwrite(i8* %1, i32 1, i32 %2, i32* %0)
%5 = icmp eq i32 %4, %2
%6 = zext i1 %5 to i32
ret i32 %6
}
void rmv2i_(dx, dy) int *dx, *dy;
{ rmv2((float)*dx, (float)*dy); }


x86 assembly (clang, -O0):
<rmv2i_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
call   1030 <rmv2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmv2i_>:
cvtsi2ssl (%rdi),%xmm0
cvtsi2ssl (%rsi),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
jmp    1030 <rmv2@plt>

LLVM IR (-O0):
define void @rmv2i_(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to float
%8 = fpext float %7 to double
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to float
%12 = fpext float %11 to double
%13 = call i32 (double, double, ...) bitcast (i32 (...)* @rmv2 to i32 (double, double, ...)*)(double %8, double %12)
ret void
}

LLVM IR (-O2):
define void @rmv2i_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = sitofp i32 %3 to float
%5 = fpext float %4 to double
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to float
%8 = fpext float %7 to double
%9 = tail call i32 (double, double, ...) bitcast (i32 (...)* @rmv2 to i32 (double, double, ...)*)(double %5, double %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float x;
  scanf("%f", &x);
  printf("%f", x);
  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
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
void INT_Excep_DMAC_DMAC74I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_DMAC_DMAC74I() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/);
void block_term_signals() {
  sigset_t set;
  sigemptyset(&set);
  sigaddset(&set, SIGINT);
  sigprocmask(SIG_BLOCK, &set, 0);
}


x86 assembly (clang, -O0):
<block_term_signals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_term_signals>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_BLOCK = global i32 0
define void @block_term_signals() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGINT
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_BLOCK
%6 = call i32 @sigprocmask(i32 %5, i32* %1, i32 0)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_BLOCK = global i32 0
define void @block_term_signals() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGINT
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_BLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vmi_cpuid(int, int *, int *, int *, int *);
void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx) {
  vmi_cpuid(op, eax, ebx, ecx, edx);
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <vmi_cpuid@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
jmp    1030 <vmi_cpuid@plt>

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

LLVM IR (-O2):
define void @cpuid(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i32 @vmi_cpuid(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4)
ret void
}
void hlt() { asm volatile("hlt"); }


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

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

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

LLVM IR (-O2):
define void @hlt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helloer();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Calling helloer\n");
  helloer();
  printf("Helloer called\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <helloer@plt>
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Calling helloer\0A\00"
@.str.1 = [16 x i8] c"Helloer called\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @helloer()
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Calling helloer\00"
@str.2 = [15 x i8] c"Helloer called\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @helloer()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
float vector_length(vector)
float vector[3];
{
  float x, y;
  int i;
  x = 0.0;
  for (i = 0; i < 3; i++) {
    y = vector[i];
    x = x + y * y;
  }
  return ((float)sqrt((double)x));
}


x86 assembly (clang, -O0):
<vector_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1171 <vector_length+0x61>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <vector_length+0x1b>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_length>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm0
xorps  %xmm2,%xmm2
addss  %xmm2,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jb     1143 <vector_length+0x33>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @vector_length(float* %0) {
%2 = alloca float*
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float* %0, float** %2
store float 0.000000e+00, float* %3
store i32 0, i32* %5
br label %6
6: ; preds = %19, %1
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %22
9: ; preds = %6
%10 = load float*, float** %2
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds float, float* %10, i64 %12
%14 = load float, float* %13
store float %14, float* %4
%15 = load float, float* %3
%16 = load float, float* %4
%17 = load float, float* %4
%18 = call float @llvm.fmuladd.f32(float %16, float %17, float %15)
store float %18, float* %3
br label %19
19: ; preds = %9
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = call double @sqrt(double %24)
%26 = fptrunc double %25 to float
ret float %26
}

LLVM IR (-O2):
define float @vector_length(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @llvm.fmuladd.f32(float %2, float %2, float 0.000000e+00)
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %3)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call float @sqrtf(float %9)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ imul32_to_64();
int main() {
  imul32_to_64();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <imul32_to_64@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @imul32_to_64()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ in_range(int /*<<< orphan*/ const, char, char);
bool is_alpha(const uint8_t c) {
  return in_range(c, 'A', 'Z') || in_range(c, 'a', 'z');
}


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x41,%esi
mov    $0x5a,%edx
call   1030 <in_range@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    115b <is_alpha+0x4b>
mov    -0x4(%rbp),%edi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <in_range@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
push   %rbx
mov    %edi,%ebx
mov    $0x41,%esi
mov    $0x5a,%edx
call   1030 <in_range@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1131 <is_alpha+0x21>
pop    %rbx
ret
mov    %ebx,%edi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <in_range@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_alpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @in_range(i32 %3, i8 signext 65, i8 signext 90)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @in_range(i32 %7, i8 signext 97, i8 signext 122)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_alpha(i32 %0) {
%2 = tail call i64 @in_range(i32 %0, i8 signext 65, i8 signext 90)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @in_range(i32 %0, i8 signext 97, i8 signext 122)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void ls_costN_nm4_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_costN_nm4_incref() {
ret void
}
__attribute__((always_)) void hlt(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<hlt>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <hlt+0x9>
jmp    1109 <hlt+0x9>

x86 assembly (clang, -O2):
<hlt>:
jmp    1100 <hlt>

LLVM IR (-O0):
define void @hlt() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @hlt() {
br label %1
1: ; preds = %0, %1
br label %1
}
void g_arith_pow_f_u64(void *s, void *d, void *o) {}


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

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

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

LLVM IR (-O2):
define void @g_arith_pow_f_u64(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PolicyTick();
int /*<<< orphan*/ TypeCTick();
void core_tick(void) {
  TypeCTick();
  PolicyTick();
}


x86 assembly (clang, -O0):
<core_tick>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <TypeCTick@plt>
mov    $0x0,%al
call   1040 <PolicyTick@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @core_tick() {
%1 = call i32 (...) @TypeCTick()
%2 = call i32 (...) @PolicyTick()
ret void
}

LLVM IR (-O2):
define void @core_tick() {
%1 = tail call i32 (...) @TypeCTick()
%2 = tail call i32 (...) @PolicyTick()
ret void
}
void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret void
}
int test_imm_4Aint8_mem(signed char *val) {
  return ((*val) & (-0x4A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Aint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffb6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Aint8_mem>:
testb  $0xb6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_4Aint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -74
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_4Aint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -74
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}