xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void MemoryZero(char *p, char *q) {
  if (q - p)
    memset(p, 0, q - p);
}


x86 assembly (clang, -O0):
<MemoryZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x0,%rax
je     114d <MemoryZero+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MemoryZero>:
mov    %rsi,%rdx
sub    %rdi,%rdx
je     111f <MemoryZero+0xf>
xor    %esi,%esi
jmp    1030 <memset@plt>
ret

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

LLVM IR (-O2):
define void @MemoryZero(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = trunc i64 %5 to i32
%9 = tail call i32 @memset(i8* %0, i32 0, i32 %8)
br label %10
10: ; preds = %7, %2
ret void
}
/* Variables and functions */
int strncmp(char *, char *, int);
int main(int argc, char **buffer) {
  char buf[10] = "hello";
  int cmp;
  if ((cmp = strncmp(buf, "hello", 5)))
    return (1);
  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)
mov    0xed3(%rip),%rax
mov    %rax,-0x1a(%rbp)
mov    0xed0(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x1a(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
je     1169 <main+0x59>
movl   $0x1,-0x4(%rbp)
jmp    1170 <main+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6f6c6c6568,%rax
mov    %rax,0x8(%rsp)
movw   $0x0,0x10(%rsp)
lea    0xed9(%rip),%rsi
lea    0x8(%rsp),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.buf = [10 x i8] c"hello\00\00\00\00\00"
@.str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [10 x i8]* %6 to i8*
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%10 = call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
store i32 %10, i32* %7
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@__const.main.buf = [10 x i8] c"hello\00\00\00\00\00"
@.str = [6 x i8] c"hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i32 @strncmp(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
int is_swapped(int *a, int *b) {
  int temp, va, vb;
  va = *a;
  vb = *b;
  if (*a == *b)
    return 0;
  if (*a > *b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_swapped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    113c <is_swapped+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1161 <is_swapped+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    115a <is_swapped+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <is_swapped+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_swapped>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

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

LLVM IR (-O2):
define i32 @is_swapped(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp sgt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void load_knowed_symbolic_versions(void) {}


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

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

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

LLVM IR (-O2):
define void @load_knowed_symbolic_versions() {
ret void
}
/* Variables and functions */
void test_hmap() {
  for (size_t i = 0; i < 100; ++i) {
  }
}


x86 assembly (clang, -O0):
<test_hmap>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
cmpq   $0x64,-0x8(%rbp)
jae    112d <test_hmap+0x2d>
jmp    111c <test_hmap+0x1c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <test_hmap+0xc>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_hmap() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %6, %0
%3 = load i64, i64* %1
%4 = icmp ult i64 %3, 100
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i64, i64* %1
%8 = add i64 %7, 1
store i64 %8, i64* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @test_hmap() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *safe_malloc(size_t len) {
  int i = 0;
  for (i = 0; i < 3; i++) {
    void *mem = malloc(len);
    if (mem != NULL) {
      return mem;
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    116c <safe_malloc+0x5c>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1159 <safe_malloc+0x49>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <safe_malloc+0x64>
jmp    115e <safe_malloc+0x4e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <safe_malloc+0x1a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <malloc@plt>
test   %rax,%rax
jne    112b <safe_malloc+0x1b>
mov    %rbx,%rdi
call   1030 <malloc@plt>
test   %rax,%rax
je     112d <safe_malloc+0x1d>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @safe_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i8* @malloc(i64 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i8* @malloc(i64 %0)
br label %9
9: ; preds = %7, %4, %1
%10 = phi i8* [ %2, %1 ], [ %5, %4 ], [ %8, %7 ]
ret i8* %10
}
/* Variables and functions */
int pow(float, int);
int calculateRoot(float a, float b, float c) { return pow(b, 2) - 4 * a * c; }


x86 assembly (clang, -O0):
<calculateRoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
cvtsi2ss %eax,%xmm1
movss  0xebe(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateRoot>:
push   %rax
movss  %xmm2,0x4(%rsp)
movss  %xmm0,(%rsp)
movaps %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  (%rsp),%xmm1
mulss  0xec3(%rip),%xmm1
mulss  0x4(%rsp),%xmm1
addss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @calculateRoot(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 = call i32 @pow(float %7, i32 2)
%9 = sitofp i32 %8 to float
%10 = load float, float* %4
%11 = fmul float 4.000000e+00, %10
%12 = load float, float* %6
%13 = fneg float %11
%14 = call float @llvm.fmuladd.f32(float %13, float %12, float %9)
%15 = fptosi float %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @calculateRoot(float %0, float %1, float %2) {
%4 = tail call i32 @pow(float %1, i32 2)
%5 = sitofp i32 %4 to float
%6 = fmul float %0, -4.000000e+00
%7 = tail call float @llvm.fmuladd.f32(float %6, float %2, float %5)
%8 = fptosi float %7 to i32
ret i32 %8
}
int omap_mux_disable_wakeup(char *muxname) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap_mux_disable_wakeup(i8* nocapture readnone %0) {
ret i32 0
}
int pir_get(void *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pir_get(i8* nocapture readnone %0) {
ret i32 0
}
int __attribute__((visibility("default"))) libfunc() { return 3; }


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

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

LLVM IR (-O0):
define i32 @libfunc() {
ret i32 3
}

LLVM IR (-O2):
define i32 @libfunc() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  while (*++argv)
    printf("%s\n", *argv);
}


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    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     1158 <main+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
test   %rsi,%rsi
je     1144 <main+0x34>
add    $0x10,%rbx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %11, %6 ], [ %4, %2 ]
%8 = phi i8** [ %10, %6 ], [ %3, %2 ]
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
void PendSV_Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @PendSV_Handler() {
ret void
}
/* Type definitions */
struct CRYPTO_CIPHER_CTX {
  int dummy;
};
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_CIPHER_CTX_free(int /*<<< orphan*/ *);
void crypto_aes_free(struct CRYPTO_CIPHER_CTX *cipher_ctx) {
  EVP_CIPHER_CTX *ctx = ((EVP_CIPHER_CTX *)(cipher_ctx));
  EVP_CIPHER_CTX_free(ctx);
}


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

x86 assembly (clang, -O2):
<crypto_aes_free>:
jmp    1030 <EVP_CIPHER_CTX_free@plt>

LLVM IR (-O0):
%struct.CRYPTO_CIPHER_CTX = type { i32 }
define void @crypto_aes_free(%struct.CRYPTO_CIPHER_CTX* %0) {
%2 = alloca %struct.CRYPTO_CIPHER_CTX*
%3 = alloca i32*
store %struct.CRYPTO_CIPHER_CTX* %0, %struct.CRYPTO_CIPHER_CTX** %2
%4 = load %struct.CRYPTO_CIPHER_CTX*, %struct.CRYPTO_CIPHER_CTX** %2
%5 = bitcast %struct.CRYPTO_CIPHER_CTX* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @EVP_CIPHER_CTX_free(i32* %6)
ret void
}

LLVM IR (-O2):
%struct.CRYPTO_CIPHER_CTX = type { i32 }
define void @crypto_aes_free(%struct.CRYPTO_CIPHER_CTX* %0) {
%2 = getelementptr %struct.CRYPTO_CIPHER_CTX, %struct.CRYPTO_CIPHER_CTX* %0, i64 0, i32 0
%3 = tail call i32 @EVP_CIPHER_CTX_free(i32* %2)
ret void
}
extern unsigned char get_bit_7(const unsigned char c) { return (c & 0x80) > 0; }


x86 assembly (clang, -O0):
<get_bit_7>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit_7>:
mov    %edi,%eax
shr    $0x7,%al
ret

LLVM IR (-O0):
define zeroext i8 @get_bit_7(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 128
%6 = icmp sgt i32 %5, 0
%7 = zext i1 %6 to i32
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define zeroext i8 @get_bit_7(i8 zeroext %0) {
%2 = lshr i8 %0, 7
ret i8 %2
}
unsigned xrop3_34_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~S;
  stk1 = D & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_34_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_34_1_1>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
mov    %edi,%ecx
not    %cl
movzbl %cl,%ecx
not    %eax
and    %ecx,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_34_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %0, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
void convertBackspace(char *aBuffer, size_t aSize) {}


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

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

LLVM IR (-O0):
define void @convertBackspace(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @convertBackspace(i8* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_target_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(251, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_target_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xfb,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_target_system_to_container>:
mov    $0xfb,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_dobldobl_target_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 251, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_target_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 251, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void i2d_ASN1_IA5STRING(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_IA5STRING() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ZSTD_defaultFreeFunction(void *opaque, void *address) {
  (void)opaque;
  free(address);
}


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

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

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

LLVM IR (-O2):
define void @ZSTD_defaultFreeFunction(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
uint32_t ui32Good(int abc) {
  uint32_t ui32good;
  int32_t i32good;
  uint32_t badui32;
  int32_t badi32;
  uint32_t a;
  return 5;
}


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

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

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

LLVM IR (-O2):
define i32 @ui32Good(i32 %0) {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__14__GeneralIO__clr();
void HplSensirionSht11P__PWR__clr(void) { Msp430GpioC__14__GeneralIO__clr(); }


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

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

LLVM IR (-O0):
define void @HplSensirionSht11P__PWR__clr() {
%1 = call i32 (...) @Msp430GpioC__14__GeneralIO__clr()
ret void
}

LLVM IR (-O2):
define void @HplSensirionSht11P__PWR__clr() {
%1 = tail call i32 (...) @Msp430GpioC__14__GeneralIO__clr()
ret void
}
/* Variables and functions */
int loadPhysicalMemory(int /*<<< orphan*/);
int /*<<< orphan*/ tlb(int *, int);
int loadVirtualMemory(int *table, int vaddr) {
  return loadPhysicalMemory(tlb(table, vaddr));
}


x86 assembly (clang, -O0):
<loadVirtualMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <tlb@plt>
mov    %eax,%edi
call   1040 <loadPhysicalMemory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadVirtualMemory>:
push   %rax
call   1030 <tlb@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <loadPhysicalMemory@plt>

LLVM IR (-O0):
define i32 @loadVirtualMemory(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* %4
%7 = call i32 @tlb(i32* %5, i32 %6)
%8 = call i32 @loadPhysicalMemory(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @loadVirtualMemory(i32* %0, i32 %1) {
%3 = tail call i32 @tlb(i32* %0, i32 %1)
%4 = tail call i32 @loadPhysicalMemory(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int ASN1_item_i2d_bio(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                      int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_it;
int i2d_X509_bio(BIO *bp, X509 *x509) {
  return ASN1_item_i2d_bio(&X509_it, bp, x509);
}


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

x86 assembly (clang, -O2):
<i2d_X509_bio>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ecb(%rip),%rdi
jmp    1030 <ASN1_item_i2d_bio@plt>

LLVM IR (-O0):
@X509_it = global i32 0
define i32 @i2d_X509_bio(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** %4
%7 = call i32 @ASN1_item_i2d_bio(i32* @X509_it, i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@X509_it = global i32 0
define i32 @i2d_X509_bio(i32* %0, i32* %1) {
%3 = tail call i32 @ASN1_item_i2d_bio(i32* @X509_it, i32* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int atoi(char *);
char *getenv(char *);
pid_t getpid(void) {
  pid_t fakepid;
  char *pidenv;
  pidenv = getenv("FAKEPID");
  if (pidenv)
    fakepid = atoi(pidenv);
  else
    fakepid = 1;
  return fakepid;
}


x86 assembly (clang, -O0):
<getpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1154 <getpid+0x34>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    115b <getpid+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpid>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     113b <getpid+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"FAKEPID\00"
define i32 @getpid() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i32 @atoi(i8* %7)
store i32 %8, i32* %1
br label %10
9: ; preds = %0
store i32 1, i32* %1
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"FAKEPID\00"
define i32 @getpid() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @atoi(i8* %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
ret i32 %6
}
/* Variables and functions */
int atoi(char *);
char *countAndSay(int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  int n = atoi(argv[1]);
  printf("%s\n", countAndSay(n));
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <countAndSay@plt>
mov    %rax,%rsi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <countAndSay@plt>
lea    0xeb8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i8* @countAndSay(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _clear_error_stack();
void *_ptr_chain_clone(void *);
void *ptr_chain_clone(void *buf) {
  { _clear_error_stack(); };
  return (_ptr_chain_clone(buf));
}


x86 assembly (clang, -O0):
<ptr_chain_clone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <_clear_error_stack@plt>
mov    -0x8(%rbp),%rdi
call   1040 <_ptr_chain_clone@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_chain_clone>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_clear_error_stack@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <_ptr_chain_clone@plt>

LLVM IR (-O0):
define i8* @ptr_chain_clone(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @_clear_error_stack()
%4 = load i8*, i8** %2
%5 = call i8* @_ptr_chain_clone(i8* %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @ptr_chain_clone(i8* %0) {
%2 = tail call i32 (...) @_clear_error_stack()
%3 = tail call i8* @_ptr_chain_clone(i8* %0)
ret i8* %3
}
/* Variables and functions */
float roundl(float);
float roundf(float x) { return roundl(x); }


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

x86 assembly (clang, -O2):
<roundf>:
jmp    1030 <roundl@plt>

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

LLVM IR (-O2):
define float @roundf(float %0) {
%2 = tail call float @roundl(float %0)
ret float %2
}
/* Variables and functions */
void GLimp_EndFrame(void) {}


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

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

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

LLVM IR (-O2):
define void @GLimp_EndFrame() {
ret void
}
/* Variables and functions */
scalar_t__ wr_strcasecmp(char const *, char const *);
int wr_hashcasecmp_str(const char *s1, const char *s2) {
  return wr_strcasecmp(s1, s2) == 0;
}


x86 assembly (clang, -O0):
<wr_hashcasecmp_str>:
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 <wr_strcasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @wr_hashcasecmp_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @wr_strcasecmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @wr_hashcasecmp_str(i8* %0, i8* %1) {
%3 = tail call i64 @wr_strcasecmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
void log(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @log(i8* nocapture %0, ...) {
ret void
}
char another(char x) {
  if (x == 'a')
    return 'b';
  if (x == 'b')
    return 'c';
  return 'a';
}


x86 assembly (clang, -O0):
<another>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jne    1120 <another+0x20>
movb   $0x62,-0x1(%rbp)
jmp    113a <another+0x3a>
movsbl -0x2(%rbp),%eax
cmp    $0x62,%eax
jne    1136 <another+0x36>
movb   $0x63,-0x1(%rbp)
jmp    113a <another+0x3a>
movb   $0x61,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<another>:
cmp    $0x62,%dil
sete   %al
add    %al,%al
or     $0x61,%al
cmp    $0x61,%dil
movzbl %al,%ecx
mov    $0x62,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @another(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 97
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 98, i8* %2
br label %14
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 98
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 99, i8* %2
br label %14
13: ; preds = %8
store i8 97, i8* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @another(i8 signext %0) {
%2 = icmp eq i8 %0, 98
%3 = select i1 %2, i8 99, i8 97
%4 = icmp eq i8 %0, 97
%5 = select i1 %4, i8 98, i8 %3
ret i8 %5
}
long nblock(long size) { return ((size + 511) >> 9); }


x86 assembly (clang, -O0):
<nblock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1ff,%rax
sar    $0x9,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nblock>:
lea    0x1ff(%rdi),%rax
sar    $0x9,%rax
ret

LLVM IR (-O0):
define i64 @nblock(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 511
%5 = ashr i64 %4, 9
ret i64 %5
}

LLVM IR (-O2):
define i64 @nblock(i64 %0) {
%2 = add nsw i64 %0, 511
%3 = ashr i64 %2, 9
ret i64 %3
}
void f() {
  int a;
  enum { test15 = ((_Bool)&a) };
  struct check_positive15 {
    int a[test15];
  };
  ;
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
unsigned retro_get_region(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @retro_get_region() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
extern uint32_t cel_djp_hash(const char *str) {
  register uint32_t h = 5381;
  while (*str != '\0') {
    h += (h << 5) + (*str++);
  }
  return (h & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<cel_djp_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1144 <cel_djp_hash+0x44>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <cel_djp_hash+0xf>
mov    -0xc(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cel_djp_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <cel_djp_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <cel_djp_hash+0x10>
and    $0x7fffffff,%eax
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @cel_djp_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 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %11, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 5381, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long window;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xresizerequest_window(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xresizerequest.window = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xresizerequest_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xresizerequest_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void load_acerts(void) {}


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

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

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

LLVM IR (-O2):
define void @load_acerts() {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int sendto(int, void const *, size_t, int, struct sockaddr const *,
           int /*<<< orphan*/);
int plat_sendto(int s, const void *msg, size_t len, int flags,
                const struct sockaddr *to, socklen_t tolen) {
  return (sendto(s, msg, len, flags, to, tolen));
}


x86 assembly (clang, -O0):
<plat_sendto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <sendto@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plat_sendto>:
jmp    1030 <sendto@plt>

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

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @plat_sendto(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32 %5) {
%7 = tail call i32 @sendto(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32 %5)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_opp(uintptr_t, uintptr_t);
void fiat_25519_opp(uint32_t out1[10], const uint32_t arg1[10]) {
  internal_fiat_25519_opp((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_25519_opp>:
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 <internal_fiat_25519_opp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_25519_opp>:
jmp    1030 <internal_fiat_25519_opp@plt>

LLVM IR (-O0):
define void @fiat_25519_opp(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_25519_opp(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_opp(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_25519_opp(i64 %3, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t multiply_32x32_rshift32_rounded(int32_t a, int32_t b) {}


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

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

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

LLVM IR (-O2):
define i32 @multiply_32x32_rshift32_rounded(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
float M_PI;
float deg2rad(float deg) { return M_PI * deg / 180.0f; }


x86 assembly (clang, -O0):
<deg2rad>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    0x2ed8(%rip),%rax
movss  (%rax),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xedf(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg2rad>:
mov    0x2ee1(%rip),%rax
mulss  (%rax),%xmm0
divss  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @deg2rad(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* @M_PI
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = fdiv float %5, 1.800000e+02
ret float %6
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @deg2rad(float %0) {
%2 = load float, float* @M_PI
%3 = fmul float %2, %0
%4 = fdiv float %3, 1.800000e+02
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR78_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR78_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR78_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int mtd_nand_has_bch(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mtd_nand_has_bch() {
ret i32 0
}
void ISR_UART_2_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ISR_UART_2_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ from_stdin();
int /*<<< orphan*/ to_stdout(char);
void main(void) {
  char c;
  do {
    c = (char)from_stdin();
    to_stdout(c);
  } while (c != '%');
  to_stdout('\n');
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <from_stdin@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <to_stdout@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x25,%eax
jne    1138 <main+0x8>
mov    $0xa,%edi
call   1030 <to_stdout@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <from_stdin@plt>
mov    %rax,%rbx
movsbl %bl,%edi
call   1030 <to_stdout@plt>
cmp    $0x25,%bl
jne    1140 <main+0x10>
mov    $0xa,%edi
call   1030 <to_stdout@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
br label %2
2: ; preds = %7, %0
%3 = call i64 (...) @from_stdin()
%4 = trunc i64 %3 to i8
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = call i32 @to_stdout(i8 signext %5)
br label %7
7: ; preds = %2
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 37
br i1 %10, label %2, label %11
11: ; preds = %7
%12 = call i32 @to_stdout(i8 signext 10)
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @from_stdin()
%3 = trunc i64 %2 to i8
%4 = tail call i32 @to_stdout(i8 signext %3)
%5 = icmp eq i8 %3, 37
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @to_stdout(i8 signext 10)
%8 = tail call i32 @exit(i32 0)
unreachable
}