xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ MOA_Random_64();
void MOA_Random_128(uint64_t *x) {
  x[0] = MOA_Random_64();
  x[1] = MOA_Random_64();
  return;
}


x86 assembly (clang, -O0):
<MOA_Random_128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <MOA_Random_64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <MOA_Random_64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MOA_Random_128>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <MOA_Random_64@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
call   1030 <MOA_Random_64@plt>
mov    %eax,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @MOA_Random_128(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @MOA_Random_64()
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
store i32 %3, i32* %5
%6 = call i32 (...) @MOA_Random_64()
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @MOA_Random_128(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @MOA_Random_64()
store i32 %2, i32* %0
%3 = tail call i32 (...) @MOA_Random_64()
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ gripe(char *, char *);
int /*<<< orphan*/ perror(char *);
void clsfile(FILE *outfile, char *text) {
  if (ferror(outfile)) {
    perror("Fatal!");
    gripe(text, "Unable to complete file.");
  }
  fclose(outfile);
  return;
}


x86 assembly (clang, -O0):
<clsfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     117f <clsfile+0x3f>
lea    0xe96(%rip),%rdi
call   1060 <perror@plt>
mov    -0x10(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1050 <gripe@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clsfile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <ferror@plt>
test   %rax,%rax
jne    1163 <clsfile+0x23>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fclose@plt>
lea    0xe96(%rip),%rdi
call   1060 <perror@plt>
lea    0xe91(%rip),%rsi
mov    %r14,%rdi
call   1050 <gripe@plt>
jmp    1154 <clsfile+0x14>

LLVM IR (-O0):
@.str = [7 x i8] c"Fatal!\00"
@.str.1 = [25 x i8] c"Unable to complete file.\00"
define void @clsfile(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i64 @ferror(i32* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %4
%11 = call i32 @gripe(i8* %10, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %8, %2
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Fatal!\00"
@.str.1 = [25 x i8] c"Unable to complete file.\00"
define void @clsfile(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @ferror(i32* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @gripe(i8* %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
%9 = tail call i32 @fclose(i32* %0)
ret void
}
int test_imm_98uint8_mem(unsigned char *val) {
  return ((*val) & (0x98 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_98uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 152
%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_98uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -104
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void ff_hevc_put_hevc_pel_pixels4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_pel_pixels4_12_sse4() {
ret void
}
void vgDrawImage(VGImage) {}


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

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

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

LLVM IR (-O2):
define void @vgDrawImage(i32 %0) {
ret void
}
int getmem(int address) {
  int *address_as_pointer = (int *)address;
  return *address_as_pointer;
}


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

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

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

LLVM IR (-O2):
define i32 @getmem(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char buf[10] = "";
  fread(buf, 9, 1, stdin);
  write(1, buf, strlen(buf));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <memset@plt>
lea    -0x1a(%rbp),%rdi
mov    0x2e77(%rip),%rax
mov    (%rax),%ecx
mov    $0x9,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
lea    -0x1a(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x1a(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [10 x i8]* %6 to i8*
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fread(i8* %8, i32 9, i32 1, i32 %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @write(i32 1, i8* %11, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
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 = load i32, i32* @stdin
%6 = call i32 @fread(i8* %4, i32 9, i32 1, i32 %5)
%7 = call i32 @strlen(i8* %4)
%8 = call i32 @write(i32 1, i8* %4, i32 %7)
ret i32 0
}
int fun_coverage_if_gt(int x) {
  if (x > 5) {
    return 8;
  } else {
    return 18;
  }
}


x86 assembly (clang, -O0):
<fun_coverage_if_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jle    111d <fun_coverage_if_gt+0x1d>
movl   $0x8,-0x4(%rbp)
jmp    1124 <fun_coverage_if_gt+0x24>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_coverage_if_gt>:
cmp    $0x6,%edi
mov    $0x8,%ecx
mov    $0x12,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fun_coverage_if_gt(i32 %0) {
%2 = icmp sgt i32 %0, 5
%3 = select i1 %2, i32 8, i32 18
ret i32 %3
}
/* Variables and functions */
int inp(int);
void retrace(void) {
  while (!(inp(0x03da) & 8))
    ;
  while ((inp(0x03da) & 8))
    ;
}


x86 assembly (clang, -O0):
<retrace>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <retrace+0x9>
mov    $0x3da,%edi
call   1030 <inp@plt>
and    $0x8,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113b <retrace+0x2b>
jmp    1140 <retrace+0x30>
jmp    1119 <retrace+0x9>
jmp    1145 <retrace+0x35>
mov    $0x3da,%edi
call   1030 <inp@plt>
and    $0x8,%eax
cmp    $0x0,%eax
je     1160 <retrace+0x50>
jmp    1145 <retrace+0x35>
pop    %rbp
ret

x86 assembly (clang, -O2):
<retrace>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3da,%edi
call   1030 <inp@plt>
test   $0x8,%al
je     1120 <retrace+0x10>
xchg   %ax,%ax
mov    $0x3da,%edi
call   1030 <inp@plt>
test   $0x8,%al
jne    1130 <retrace+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @retrace() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @inp(i32 986)
%3 = and i32 %2, 8
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
br label %8
8: ; preds = %12, %7
%9 = call i32 @inp(i32 986)
%10 = and i32 %9, 8
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
br label %8
13: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @retrace() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @inp(i32 986)
%3 = and i32 %2, 8
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1, %5
%6 = tail call i32 @inp(i32 986)
%7 = and i32 %6, 8
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsLevel(int *);
void errLevel(int *level) { emsLevel(level); }


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

x86 assembly (clang, -O2):
<errLevel>:
jmp    1030 <emsLevel@plt>

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

LLVM IR (-O2):
define void @errLevel(i32* %0) {
%2 = tail call i32 @emsLevel(i32* %0)
ret void
}
float Prod(const float a, const char b) {
  if (b > 0)
    return a;
  if (b < 0)
    return -a;
  return 0;
}


x86 assembly (clang, -O0):
<Prod>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
movss  %xmm0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jle    112b <Prod+0x2b>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115c <Prod+0x5c>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jge    1154 <Prod+0x54>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115c <Prod+0x5c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Prod>:
test   %dil,%dil
js     110c <Prod+0xc>
xorps  %xmm1,%xmm1
jle    1118 <Prod+0x18>
jmp    111b <Prod+0x1b>
movaps 0xeed(%rip),%xmm1
xorps  %xmm0,%xmm1
jg     111b <Prod+0x1b>
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Prod(float %0, i8 signext %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i8
store float %0, float* %4
store i8 %1, i8* %5
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %19
11: ; preds = %2
%12 = load i8, i8* %5
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load float, float* %4
%17 = fneg float %16
store float %17, float* %3
br label %19
18: ; preds = %11
store float 0.000000e+00, float* %3
br label %19
19: ; preds = %18, %15, %9
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @Prod(float %0, i8 signext %1) {
%3 = icmp sgt i8 %1, 0
%4 = icmp slt i8 %1, 0
%5 = fneg float %0
%6 = select i1 %4, float %5, float 0.000000e+00
%7 = select i1 %3, float %0, float %6
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
#define EBUSY 128
int pthread_mutex_trylock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
int quit(pthread_mutex_t *mtx) {
  switch (pthread_mutex_trylock(mtx)) {
  case 0:
    pthread_mutex_unlock(mtx);
    return 1;
  case EBUSY:
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_mutex_trylock@plt>
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
test   %eax,%eax
je     115a <quit+0x3a>
jmp    1147 <quit+0x27>
mov    -0x14(%rbp),%eax
sub    $0x80,%eax
je     116f <quit+0x4f>
jmp    117b <quit+0x5b>
mov    -0x10(%rbp),%rdi
call   1040 <pthread_mutex_unlock@plt>
movl   $0x1,-0x4(%rbp)
jmp    1182 <quit+0x62>
movl   $0x0,-0x4(%rbp)
jmp    1182 <quit+0x62>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <pthread_mutex_trylock@plt>
cmp    $0x80,%eax
je     1143 <quit+0x23>
test   %eax,%eax
jne    113c <quit+0x1c>
mov    %rbx,%rdi
call   1040 <pthread_mutex_unlock@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @quit(i32* %0) {
%2 = tail call i32 @pthread_mutex_trylock(i32* %0)
switch i32 %2, label %5 [
i32 0, label %3
i32 128, label %6
]
3: ; preds = %1
%4 = tail call i32 @pthread_mutex_unlock(i32* %0)
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %3
%7 = phi i32 [ 1, %5 ], [ 1, %3 ], [ 0, %1 ]
ret i32 %7
}
char len(int n) {
  char i = 0;
  while (n) {
    n /= 10;
    ++i;
  }
  return i;
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1130 <len+0x30>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    110b <len+0xb>
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
xor    %eax,%eax
test   %edi,%edi
je     1131 <len+0x31>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%al
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <len+0x10>
ret

LLVM IR (-O0):
define signext i8 @len(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
store i8 0, i8* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 10
store i32 %9, i32* %2
%10 = load i8, i8* %3
%11 = add i8 %10, 1
store i8 %11, i8* %3
br label %4
12: ; preds = %4
%13 = load i8, i8* %3
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @len(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add i8 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i8 [ 0, %1 ], [ %7, %3 ]
ret i8 %11
}
unsigned httplib_check_feature(unsigned feature) {
  static const unsigned feature_set = 0 | 0x0001u | 0x0002u | 0x0004u | 0x0800u;
  return (feature & feature_set);
}


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

x86 assembly (clang, -O2):
<httplib_check_feature>:
mov    %edi,%eax
and    $0x807,%eax
ret

LLVM IR (-O0):
@httplib_check_feature.feature_set = internal constant i32 2055
define i32 @httplib_check_feature(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 2055
ret i32 %4
}

LLVM IR (-O2):
define i32 @httplib_check_feature(i32 %0) {
%2 = and i32 %0, 2055
ret i32 %2
}
void *test_anti_range_51(unsigned char n) {
  extern void *alloc_anti_range_51(unsigned char)
      __attribute__((alloc_size(1)));
  if ((0x7f * 2 + 1) - 1 <= n && n <= (0x7f * 2 + 1) - 1)
    n = (0x7f * 2 + 1) - 1 - 1;
  return alloc_anti_range_51(n);
}


x86 assembly (clang, -O0):
<test_anti_range_51>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
mov    $0xfe,%eax
cmp    %ecx,%eax
jg     1142 <test_anti_range_51+0x32>
movzbl -0x1(%rbp),%eax
cmp    $0xfe,%eax
jg     1142 <test_anti_range_51+0x32>
movb   $0xfd,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_51@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_51>:
cmp    $0xfe,%dil
mov    $0xfd,%eax
cmove  %eax,%edi
jmp    1030 <alloc_anti_range_51@plt>

LLVM IR (-O0):
define i8* @test_anti_range_51(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sle i32 254, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 254
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 -3, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_51(i8 zeroext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_51(i8 zeroext %0) {
%2 = icmp eq i8 %0, -2
%3 = select i1 %2, i8 -3, i8 %0
%4 = tail call i8* @alloc_anti_range_51(i8 zeroext %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
int clear_entire_queue() {
  unlink("PV"
         "/"
         "queue.txt");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"PV/queue.txt\00"
define i32 @clear_entire_queue() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"PV/queue.txt\00"
define i32 @clear_entire_queue() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
scalar_t__ strstr(char *, char *);
int main() {
  char first[] = "dysfunctional";
  char second[] = "fun";
  if (strstr(first, second))
    puts("I found fun in dysfunctional!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xeba(%rip),%eax
mov    %eax,-0x16(%rbp)
lea    -0x12(%rbp),%rdi
lea    -0x16(%rbp),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     117a <main+0x5a>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6c616e6f697463,%rax
mov    %rax,0xe(%rsp)
movabs $0x74636e7566737964,%rax
6e 63 74
mov    %rax,0x8(%rsp)
movl   $0x6e7566,0x4(%rsp)
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     116a <main+0x4a>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.first = [14 x i8] c"dysfunctional\00"
@__const.main.second = [4 x i8] c"fun\00"
@.str = [30 x i8] c"I found fun in dysfunctional!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca [4 x i8]
store i32 0, i32* %1
%4 = bitcast [14 x i8]* %2 to i8*
%5 = bitcast [4 x i8]* %3 to i8*
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%8 = call i64 @strstr(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.first = [14 x i8] c"dysfunctional\00"
@.str = [30 x i8] c"I found fun in dysfunctional!\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
store i32 7239014, i32* %2
%5 = call i64 @strstr(i8* %3, i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret i32 0
}
void nm_backend_update_dns(void) {}


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

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

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

LLVM IR (-O2):
define void @nm_backend_update_dns() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glPopMatrix();
extern void zlPop(void) { glPopMatrix(); }


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

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

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

LLVM IR (-O2):
define void @zlPop() {
%1 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ orgfx_wait(int);
void orgfx_set_color(unsigned int color) {
  orgfx_wait(1);
  *((volatile unsigned int *)((0xB8000000 + 0x84))) = color;
}


x86 assembly (clang, -O0):
<orgfx_set_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <orgfx_wait@plt>
mov    -0x4(%rbp),%ecx
mov    $0xb8000084,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orgfx_set_color>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <orgfx_wait@plt>
mov    $0xb8000084,%eax
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @orgfx_set_color(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @orgfx_wait(i32 1)
%4 = load i32, i32* %2
store volatile i32 %4, i32* inttoptr (i64 3087007876 to i32*)
ret void
}

LLVM IR (-O2):
define void @orgfx_set_color(i32 %0) {
%2 = tail call i32 @orgfx_wait(i32 1)
store volatile i32 %0, i32* inttoptr (i64 3087007876 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
main() {
  printf("Some actions happen in the main() function..\n");
  printf("and then when main() exits, the destructor is called..\n");
  exit(0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Some actions happen in the main() function..\0A\00"
@.str.1 = [56 x i8] c"and then when main() exits, the destructor is called..\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [45 x i8] c"Some actions happen in the main() function..\00"
@str.2 = [55 x i8] c"and then when main() exits, the destructor is called..\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_60uint8_reg(unsigned char val) {
  return ((val) & (-0x60 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_60uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffa0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_60uint8_reg>:
test   $0xa0,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_60uint8_reg(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, -96
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_60uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -96
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned xrop3_31_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 = D | S;
  stk1 = T & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_31_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    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%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_31_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_31_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* %5
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_31_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Sound_Play(int, int);
void Tone3() { Sound_Play(784, 250); }


x86 assembly (clang, -O0):
<Tone3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x310,%edi
mov    $0xfa,%esi
call   1030 <Sound_Play@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tone3>:
mov    $0x310,%edi
mov    $0xfa,%esi
jmp    1030 <Sound_Play@plt>

LLVM IR (-O0):
define void @Tone3() {
%1 = call i32 @Sound_Play(i32 784, i32 250)
ret void
}

LLVM IR (-O2):
define void @Tone3() {
%1 = tail call i32 @Sound_Play(i32 784, i32 250)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(double);
int main() {
  int a;
  f(0.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = call i32 @f(double 0.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(double 0.000000e+00)
ret i32 0
}
int __main(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__main() {
ret i32 0
}
void foo426() {}


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

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

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

LLVM IR (-O2):
define void @foo426() {
ret void
}
/* Variables and functions */
double CalculateBlockSize(unsigned short const *, unsigned short const *,
                          size_t, size_t, int);
double EstimateCost(const unsigned short *litlens, const unsigned short *dists,
                    size_t lstart, size_t lend) {
  return CalculateBlockSize(litlens, dists, lstart, lend, 2);
}


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

x86 assembly (clang, -O2):
<EstimateCost>:
mov    $0x2,%r8d
jmp    1030 <CalculateBlockSize@plt>

LLVM IR (-O0):
define double @EstimateCost(i16* %0, i16* %1, i64 %2, i64 %3) {
%5 = alloca i16*
%6 = alloca i16*
%7 = alloca i64
%8 = alloca i64
store i16* %0, i16** %5
store i16* %1, i16** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i16*, i16** %5
%10 = load i16*, i16** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call double @CalculateBlockSize(i16* %9, i16* %10, i64 %11, i64 %12, i32 2)
ret double %13
}

LLVM IR (-O2):
define double @EstimateCost(i16* %0, i16* %1, i64 %2, i64 %3) {
%5 = tail call double @CalculateBlockSize(i16* %0, i16* %1, i64 %2, i64 %3, i32 2)
ret double %5
}
char *langRomTypeExtRam2mb() { return "2MB External RAM"; }


x86 assembly (clang, -O0):
<langRomTypeExtRam2mb>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"2MB External RAM\00"
define i8* @langRomTypeExtRam2mb() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"2MB External RAM\00"
define i8* @langRomTypeExtRam2mb() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
void syslog(int prio, const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @syslog(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
scalar_t__ pow(int, int);
int dkHibbard(int t, int k) { return (int)pow(2, t - k + 1) - 1; }


x86 assembly (clang, -O0):
<dkHibbard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
sub    -0x8(%rbp),%esi
add    $0x1,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dkHibbard>:
push   %rax
sub    %esi,%edi
lea    0x1(%rdi),%esi
mov    $0x2,%edi
call   1030 <pow@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dkHibbard(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 = sub nsw i32 %5, %6
%8 = add nsw i32 %7, 1
%9 = call i64 @pow(i32 2, i32 %8)
%10 = trunc i64 %9 to i32
%11 = sub nsw i32 %10, 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @dkHibbard(i32 %0, i32 %1) {
%3 = add i32 %0, 1
%4 = sub i32 %3, %1
%5 = tail call i64 @pow(i32 2, i32 %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, -1
ret i32 %7
}
/* Variables and functions */
int recursive_palindrome(char *, int /*<<< orphan*/, int);
int strlen(char *);
bool palindrome(char *str) {
  int len = strlen(str) - 2;
  return recursive_palindrome(str, 0, len);
}


x86 assembly (clang, -O0):
<palindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <recursive_palindrome@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrome>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    -0x2(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <recursive_palindrome@plt>

LLVM IR (-O0):
define i32 @palindrome(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sub nsw i32 %5, 2
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = load i32, i32* %3
%9 = call i32 @recursive_palindrome(i8* %7, i32 0, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @palindrome(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -2
%4 = tail call i32 @recursive_palindrome(i8* %0, i32 0, i32 %3)
ret i32 %4
}
void deallocate_RequestHeader(struct RequestHeader *v) {}


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

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

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

LLVM IR (-O2):
%struct.RequestHeader = type opaque
define void @deallocate_RequestHeader(%struct.RequestHeader* nocapture %0) {
ret void
}
void twl4030_mmc_init(struct twl4030_hsmmc_info *info) {}


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

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

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

LLVM IR (-O2):
%struct.twl4030_hsmmc_info = type opaque
define void @twl4030_mmc_init(%struct.twl4030_hsmmc_info* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ hash_djb2(unsigned char *);
int hash_string(void *str) { return (int)hash_djb2((unsigned char *)str); }


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

x86 assembly (clang, -O2):
<hash_string>:
jmp    1030 <hash_djb2@plt>

LLVM IR (-O0):
define i32 @hash_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @hash_djb2(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @hash_string(i8* %0) {
%2 = tail call i64 @hash_djb2(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void log_kevent_timer(void) {
  report(LOG_ERR, "Unable to queue timer for watchtab: %s", strerror(errno));
}


x86 assembly (clang, -O0):
<log_kevent_timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    0xeb2(%rip),%rsi
call   1030 <report@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_kevent_timer>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xec1(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <report@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [39 x i8] c"Unable to queue timer for watchtab: %s\00"
@errno = global i32 0
define void @log_kevent_timer() {
%1 = load i32, i32* @LOG_ERR
%2 = load i32, i32* @errno
%3 = call i32 @strerror(i32 %2)
%4 = call i32 @report(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [39 x i8] c"Unable to queue timer for watchtab: %s\00"
@errno = global i32 0
define void @log_kevent_timer() {
%1 = load i32, i32* @LOG_ERR
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @report(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void transfer_to_public_keys(struct gw_info *gateways_from_dns,
                             struct pubkey_list **keys) {}


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

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

LLVM IR (-O0):
%struct.gw_info = type opaque
%struct.pubkey_list = type opaque
define void @transfer_to_public_keys(%struct.gw_info* %0, %struct.pubkey_list** %1) {
%3 = alloca %struct.gw_info*
%4 = alloca %struct.pubkey_list**
store %struct.gw_info* %0, %struct.gw_info** %3
store %struct.pubkey_list** %1, %struct.pubkey_list*** %4
ret void
}

LLVM IR (-O2):
%struct.gw_info = type opaque
%struct.pubkey_list = type opaque
define void @transfer_to_public_keys(%struct.gw_info* nocapture %0, %struct.pubkey_list** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mdc(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  printf("Digite o valor de x e y : ");
  scanf("%d %d", &x, &y);
  mdc(x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <mdc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <mdc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Digite o valor de x e y : \00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @mdc(i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Digite o valor de x e y : \00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @mdc(i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ genExtra3(char *);
void _FOO_FOO() { genExtra3("#define FSUB1(name) PREFIX(UPCASE(name))"); }


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"#define FSUB1(name) PREFIX(UPCASE(name))\00"
define void @_FOO_FOO() {
%1 = call i32 @genExtra3(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"#define FSUB1(name) PREFIX(UPCASE(name))\00"
define void @_FOO_FOO() {
%1 = tail call i32 @genExtra3(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
int f5(unsigned char c) {
  if (c == 0x22 || c <= 0x20)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x22,%eax
je     1124 <f5+0x24>
movzbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jg     1130 <f5+0x30>
movl   $0x2,-0x4(%rbp)
jmp    1137 <f5+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
cmp    $0x22,%dil
sete   %al
cmp    $0x21,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @f5(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 34
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 32
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 2, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @f5(i8 zeroext %0) {
%2 = icmp eq i8 %0, 34
%3 = icmp ult i8 %0, 33
%4 = or i1 %2, %3
%5 = select i1 %4, i32 2, i32 0
ret i32 %5
}
void check_location(__attribute__((unused)) const void *buf,
                    __attribute__((unused)) const char *func,
                    __attribute__((unused)) const char *name) {}


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

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

LLVM IR (-O0):
define void @check_location(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 @check_location(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void show_version_and_exit() {
  printf("svndumpsanitizer %s\n", "2.0.7");
  exit(0);
}


x86 assembly (clang, -O0):
<show_version_and_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_version_and_exit>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"svndumpsanitizer %s\0A\00"
@.str.1 = [6 x i8] c"2.0.7\00"
define void @show_version_and_exit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"svndumpsanitizer %s\0A\00"
@.str.1 = [6 x i8] c"2.0.7\00"
define void @show_version_and_exit() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ test_get();
int /*<<< orphan*/ test_map();
int /*<<< orphan*/ test_new();
int /*<<< orphan*/ test_pop();
int main(void) {
  test_new();
  test_pop();
  test_get();
  test_map();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test_new@plt>
xor    %eax,%eax
call   1040 <test_pop@plt>
xor    %eax,%eax
call   1030 <test_get@plt>
xor    %eax,%eax
call   1050 <test_map@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_new()
%3 = call i32 (...) @test_pop()
%4 = call i32 (...) @test_get()
%5 = call i32 (...) @test_map()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_new()
%2 = tail call i32 (...) @test_pop()
%3 = tail call i32 (...) @test_get()
%4 = tail call i32 (...) @test_map()
ret i32 0
}
void foo004(int p) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @foo004(i32 %0) {
ret void
}
float isshadowray() { return 0; }


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

x86 assembly (clang, -O2):
<isshadowray>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @isshadowray() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @isshadowray() {
ret float 0.000000e+00
}