xunge/DecIR huggingface dataset:
/* Variables and functions */
char getchar();
int clear_scanf(void) {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<clear_scanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1130 <clear_scanf+0x20>
jmp    1118 <clear_scanf+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_scanf>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <clear_scanf+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clear_scanf() {
%1 = alloca i32
br label %2
2: ; preds = %6, %0
%3 = call signext i8 (...) @getchar()
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @clear_scanf() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_ps(int /*<<< orphan*/ const,
                              int /*<<< orphan*/ const);
__m128 add2Vector(const __m128 v1, const __m128 v2) {
  return _mm_add_ps(v1, v2);
}


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

x86 assembly (clang, -O2):
<add2Vector>:
jmp    1030 <_mm_add_ps@plt>

LLVM IR (-O0):
define i32 @add2Vector(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 @_mm_add_ps(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @add2Vector(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_ps(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ is_prime(long);
int /*<<< orphan*/ printf(char *, long);
int main() {
  long i = 2, num = 0;
  while (num < 10001) {
    if (is_prime(i))
      num++;
    i++;
  }
  i--;
  printf("%ld\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x2,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x2711,-0x18(%rbp)
jge    117d <main+0x5d>
mov    -0x10(%rbp),%rdi
call   1040 <is_prime@plt>
cmp    $0x0,%rax
je     116c <main+0x4c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113f <main+0x1f>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
xor    %ebx,%ebx
nopl   0x0(%rax)
add    $0x1,%r14
mov    %r14,%rdi
call   1040 <is_prime@plt>
cmp    $0x1,%rax
sbb    $0xffffffffffffffff,%rbx
cmp    $0x2711,%rbx
jb     1130 <main+0x10>
lea    0xeac(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %8, %1 ]
%3 = phi i64 [ 2, %0 ], [ %6, %1 ]
%4 = tail call i64 @is_prime(i64 %3)
%5 = icmp ne i64 %4, 0
%6 = add nuw nsw i64 %3, 1
%7 = zext i1 %5 to i64
%8 = add nuw nsw i64 %2, %7
%9 = icmp ult i64 %8, 10001
br i1 %9, label %1, label %10
10: ; preds = %1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i32 0
}
int cube(x)
float x;
{
  float y;
  y = x * x * x;
  return y;
}


x86 assembly (clang, -O0):
<cube>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
cvttss2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cube>:
cvtsd2ss %xmm0,%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @cube(double %0) {
%2 = alloca float
%3 = alloca float
%4 = fptrunc double %0 to float
store float %4, float* %2
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
store float %9, float* %3
%10 = load float, float* %3
%11 = fptosi float %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @cube(double %0) {
%2 = fptrunc double %0 to float
%3 = fmul float %2, %2
%4 = fmul float %3, %2
%5 = fptosi float %4 to i32
ret i32 %5
}
int test_imm_E5int16_mem(short *val) {
  return ((*val) & (-0xE5 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E5int16_mem>:
movzwl (%rdi),%eax
test   $0xff1b,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E5int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -229
%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_E5int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -229
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int parse(FILE *_file) {}


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

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

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

LLVM IR (-O2):
define i32 @parse(i32* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int str_cmp_int(char *, char *);
int tw1_compare_str_int(void *p1, void *p2) {
  return str_cmp_int((char *)p1, (char *)p2);
}


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

x86 assembly (clang, -O2):
<tw1_compare_str_int>:
jmp    1030 <str_cmp_int@plt>

LLVM IR (-O0):
define i32 @tw1_compare_str_int(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 @str_cmp_int(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @tw1_compare_str_int(i8* %0, i8* %1) {
%3 = tail call i32 @str_cmp_int(i8* %0, i8* %1)
ret i32 %3
}
long SPUtest(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @SPUtest() {
ret i64 0
}

LLVM IR (-O2):
define i64 @SPUtest() {
ret i64 0
}
void compute_add_sources_ac_s3_cuda_(long *Mesh_pointer, int *iphasef,
                                     int *itf) {}


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

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

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

LLVM IR (-O2):
define void @compute_add_sources_ac_s3_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
int test_imm_0Aint16_reg(short val) {
  return ((val) & (0x0A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Aint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xa,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_0Aint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 10
%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_0Aint16_reg(i16 signext %0) {
%2 = and i16 %0, 10
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ flush();
int read(int, unsigned char *, int);
int serialRead(int fd, unsigned char *_byte) {
  int size;
  flush();
  size = read(fd, _byte, 1);
  return size;
}


x86 assembly (clang, -O0):
<serialRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <flush@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialRead>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <flush@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <read@plt>

LLVM IR (-O0):
define i32 @serialRead(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 (...) @flush()
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @read(i32 %7, i8* %8, i32 1)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @serialRead(i32 %0, i8* nocapture %1) {
%3 = tail call i32 (...) @flush()
%4 = tail call i32 @read(i32 %0, i8* %1, i32 1)
ret i32 %4
}
void ff_hevc_put_hevc_uni_pel_pixels48_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels48_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ filenopath(char *);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
char *strrchr(char *, char);
char *dbcore(char *s) {
  static char dbc[256];
  char *dot;
  strcpy(dbc, filenopath(s));
  if ((dot = strrchr(dbc, '.')))
    *dot = '\0';
  return dbc;
}


x86 assembly (clang, -O0):
<dbcore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <filenopath@plt>
mov    %eax,%esi
lea    0x2f02(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2ef6(%rip),%rdi
mov    $0x2e,%esi
call   1050 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1179 <dbcore+0x49>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2ed0(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbcore>:
push   %rbx
call   1040 <filenopath@plt>
lea    0x2f13(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1050 <strrchr@plt>
test   %rax,%rax
je     115c <dbcore+0x2c>
movb   $0x0,(%rax)
lea    0x2eed(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@dbcore.dbc = internal global [256 x i8] zeroinitializer
define i8* @dbcore(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @filenopath(i8* %4)
%6 = call i32 @strcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @dbcore.dbc, i64 0, i64 0), i32 %5)
%7 = call i8* @strrchr(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @dbcore.dbc, i64 0, i64 0), i8 signext 46)
store i8* %7, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8*, i8** %3
store i8 0, i8* %10
br label %11
11: ; preds = %9, %1
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @dbcore.dbc, i64 0, i64 0)
}

LLVM IR (-O2):
@dbcore.dbc = internal global [256 x i8] zeroinitializer
define i8* @dbcore(i8* %0) {
%2 = tail call i32 @filenopath(i8* %0)
%3 = tail call i32 @strcpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @dbcore.dbc, i64 0, i64 0), i32 %2)
%4 = tail call i8* @strrchr(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @dbcore.dbc, i64 0, i64 0), i8 signext 46)
%5 = icmp eq i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8 0, i8* %4
br label %7
7: ; preds = %6, %1
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @dbcore.dbc, i64 0, i64 0)
}
/* Variables and functions */
int bar();
int old_foo1() { return 100 + bar(); }


x86 assembly (clang, -O0):
<old_foo1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x64,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<old_foo1>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
add    $0x64,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @old_foo1() {
%1 = call i32 (...) @bar()
%2 = add nsw i32 100, %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @old_foo1() {
%1 = tail call i32 (...) @bar()
%2 = add nsw i32 %1, 100
ret i32 %2
}
int search(unsigned char *app, unsigned char *username) {
  if (1)
    return 1;
  else
    return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @search(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ memory_Free(char *, int);
char *string_StringCopy(char *);
int strlen(char *);
char *tptp_StripQuotes(char *str) {
  char *newstr;
  int len;
  len = strlen(str);
  str[len - 1] = '\0';
  newstr = string_StringCopy(str + 1);
  memory_Free(str, len + 1);
  return newstr;
}


x86 assembly (clang, -O0):
<tptp_StripQuotes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1050 <string_StringCopy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
call   1030 <memory_Free@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tptp_StripQuotes>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
movslq %eax,%rbx
movb   $0x0,-0x1(%rbx,%r14,1)
lea    0x1(%r14),%rdi
call   1050 <string_StringCopy@plt>
mov    %rax,%r15
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <memory_Free@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @tptp_StripQuotes(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %4
%7 = load i8*, i8** %2
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
store i8 0, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = call i8* @string_StringCopy(i8* %13)
store i8* %14, i8** %3
%15 = load i8*, i8** %2
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
%18 = call i32 @memory_Free(i8* %15, i32 %17)
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @tptp_StripQuotes(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i8* @string_StringCopy(i8* %6)
%8 = add nsw i32 %2, 1
%9 = tail call i32 @memory_Free(i8* %0, i32 %8)
ret i8* %7
}
/* Type definitions */
struct memorycontainer {
  int dummy;
};

/* Variables and functions */
struct memorycontainer *createExpression(int, struct memorycontainer *,
                                         struct memorycontainer *);
struct memorycontainer *
createGeqExpression(struct memorycontainer *expression1,
                    struct memorycontainer *expression2) {
  return createExpression(0x000A, expression1, expression2);
}


x86 assembly (clang, -O0):
<createGeqExpression>:
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    $0xa,%edi
call   1030 <createExpression@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createGeqExpression>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xa,%edi
jmp    1030 <createExpression@plt>

LLVM IR (-O0):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createGeqExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = alloca %struct.memorycontainer*
%4 = alloca %struct.memorycontainer*
store %struct.memorycontainer* %0, %struct.memorycontainer** %3
store %struct.memorycontainer* %1, %struct.memorycontainer** %4
%5 = load %struct.memorycontainer*, %struct.memorycontainer** %3
%6 = load %struct.memorycontainer*, %struct.memorycontainer** %4
%7 = call %struct.memorycontainer* @createExpression(i32 10, %struct.memorycontainer* %5, %struct.memorycontainer* %6)
ret %struct.memorycontainer* %7
}

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createGeqExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = tail call %struct.memorycontainer* @createExpression(i32 10, %struct.memorycontainer* %0, %struct.memorycontainer* %1)
ret %struct.memorycontainer* %3
}
/* Variables and functions */
int /*<<< orphan*/ PathStatusHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void PathStatusLogging() { UAVObjLogging(PathStatusHandle()); }


x86 assembly (clang, -O0):
<PathStatusLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PathStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathStatusLogging>:
push   %rax
xor    %eax,%eax
call   1030 <PathStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @PathStatusLogging() {
%1 = call i32 (...) @PathStatusHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PathStatusLogging() {
%1 = tail call i32 (...) @PathStatusHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FatalErrnoError(int, int, char *);
int bind(int, struct sockaddr const *, int);
void Ebind(int s, struct sockaddr_in const *address) {
  FatalErrnoError(
      bind(s, ((struct sockaddr const *)(address)), sizeof(*address)) == -1, 1,
      "bind()");
}


x86 assembly (clang, -O0):
<Ebind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1040 <bind@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x1,%esi
lea    0xea9(%rip),%rdx
call   1030 <FatalErrnoError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ebind>:
push   %rax
mov    $0x4,%edx
call   1040 <bind@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
lea    0xec5(%rip),%rdx
mov    $0x1,%esi
pop    %rax
jmp    1030 <FatalErrnoError@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [7 x i8] c"bind()\00"
define void @Ebind(i32 %0, %struct.sockaddr_in* %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in*
store i32 %0, i32* %3
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %4
%5 = load i32, i32* %3
%6 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%7 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%8 = call i32 @bind(i32 %5, %struct.sockaddr* %7, i32 4)
%9 = icmp eq i32 %8, -1
%10 = zext i1 %9 to i32
%11 = call i32 @FatalErrnoError(i32 %10, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [7 x i8] c"bind()\00"
define void @Ebind(i32 %0, %struct.sockaddr_in* %1) {
%3 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%4 = tail call i32 @bind(i32 %0, %struct.sockaddr* %3, i32 4)
%5 = icmp eq i32 %4, -1
%6 = zext i1 %5 to i32
%7 = tail call i32 @FatalErrnoError(i32 %6, i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double pow(double, double);
double dBToGain(double dB) { return pow(10.0, (dB / 20.0)); }


x86 assembly (clang, -O0):
<dBToGain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xede(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dBToGain>:
movapd %xmm0,%xmm1
divsd  0xee4(%rip),%xmm1
movsd  0xee4(%rip),%xmm0
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @dBToGain(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.000000e+01
%5 = call double @pow(double 1.000000e+01, double %4)
ret double %5
}

LLVM IR (-O2):
define double @dBToGain(double %0) {
%2 = fdiv double %0, 2.000000e+01
%3 = tail call double @pow(double 1.000000e+01, double %2)
ret double %3
}
/* Variables and functions */
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ log2(int);
int pow(int, int);
int maxXor(int l, int r) {
  int p = (int)(floor(log2(l ^ r))) + 1;
  return pow(2, p) - 1;
}


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

x86 assembly (clang, -O2):
<maxXor>:
push   %rax
xor    %esi,%edi
call   1030 <log2@plt>
mov    %eax,%edi
call   1050 <floor@plt>
lea    0x1(%rax),%esi
mov    $0x2,%edi
call   1040 <pow@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @maxXor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
%9 = call i32 @log2(i32 %8)
%10 = call i64 @floor(i32 %9)
%11 = trunc i64 %10 to i32
%12 = add nsw i32 %11, 1
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i32 @pow(i32 2, i32 %13)
%15 = sub nsw i32 %14, 1
ret i32 %15
}

LLVM IR (-O2):
define i32 @maxXor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = tail call i32 @log2(i32 %3)
%5 = tail call i64 @floor(i32 %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 1
%8 = tail call i32 @pow(i32 2, i32 %7)
%9 = add nsw i32 %8, -1
ret i32 %9
}
int ft_isdigit(int c) { return ((c >= '0') && (c <= '9')); }


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <ft_isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t USBFIFOAddrGet(uint32_t ui32Base, uint32_t ui32Endpoint) {
  return (ui32Base + 0x00000020 + (ui32Endpoint >> 2));
}


x86 assembly (clang, -O0):
<USBFIFOAddrGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    -0x8(%rbp),%ecx
sar    $0x2,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBFIFOAddrGet>:
sar    $0x2,%esi
lea    (%rdi,%rsi,1),%eax
add    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @USBFIFOAddrGet(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 = add nsw i32 %5, 32
%7 = load i32, i32* %4
%8 = ashr i32 %7, 2
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @USBFIFOAddrGet(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 32
%4 = ashr i32 %1, 2
%5 = add nsw i32 %3, %4
ret i32 %5
}
int emacs_spell_accept_func(const struct cmd_info *ci) { return 1; }


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

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

LLVM IR (-O0):
%struct.cmd_info = type opaque
define i32 @emacs_spell_accept_func(%struct.cmd_info* %0) {
%2 = alloca %struct.cmd_info*
store %struct.cmd_info* %0, %struct.cmd_info** %2
ret i32 1
}

LLVM IR (-O2):
%struct.cmd_info = type opaque
define i32 @emacs_spell_accept_func(%struct.cmd_info* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
char *concatenate(char *, char *, int, char const *, char const *, char const *,
                  char const *);
char *get_task_dir_path(const char *tt_root, const char *user,
                        const char *jobid, const char *dir_to_be_deleted) {
  return concatenate("%s/taskTracker/%s/jobcache/%s/%s", "task_dir_full_path",
                     4, tt_root, user, jobid, dir_to_be_deleted);
}


x86 assembly (clang, -O0):
<get_task_dir_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%rax
lea    0xec1(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x4,%edx
mov    %rax,(%rsp)
call   1030 <concatenate@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_task_dir_path>:
push   %rax
mov    %rdx,%r9
mov    %rsi,%r8
mov    %rdi,%rax
mov    %rcx,(%rsp)
lea    0xedb(%rip),%rdi
lea    0xef5(%rip),%rsi
mov    $0x4,%edx
mov    %rax,%rcx
call   1030 <concatenate@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"%s/taskTracker/%s/jobcache/%s/%s\00"
@.str.1 = [19 x i8] c"task_dir_full_path\00"
define i8* @get_task_dir_path(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i8* @concatenate(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* %9, i8* %10, i8* %11, i8* %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [33 x i8] c"%s/taskTracker/%s/jobcache/%s/%s\00"
@.str.1 = [19 x i8] c"task_dir_full_path\00"
define i8* @get_task_dir_path(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* @concatenate(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* %0, i8* %1, i8* %2, i8* %3)
ret i8* %5
}
int egsy_gcm_mult_data_cnt_csr_debug_set(
    unsigned int dev_id, union egsy_gcm_mult_data_cnt_csr_debug_u *value) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%union.egsy_gcm_mult_data_cnt_csr_debug_u = type opaque
define i32 @egsy_gcm_mult_data_cnt_csr_debug_set(i32 %0, %union.egsy_gcm_mult_data_cnt_csr_debug_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ is_attacker();
int /*<<< orphan*/ is_hidden_file(char *);
int /*<<< orphan*/ is_procnet(char *);
int main() {
  is_attacker();
  is_hidden_file("");
  is_procnet("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <is_attacker@plt>
lea    0xeb3(%rip),%rdi
call   1040 <is_hidden_file@plt>
lea    0xea7(%rip),%rdi
call   1050 <is_procnet@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <is_attacker@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
call   1040 <is_hidden_file@plt>
mov    %rbx,%rdi
call   1050 <is_procnet@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @is_attacker()
%3 = call i32 @is_hidden_file(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @is_procnet(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 (...) @is_attacker()
%2 = tail call i32 @is_hidden_file(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @is_procnet(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int divide(long *n, int base) {
  int res;
  if (base == 10) {
    res = (int)(((unsigned long)*n) % 10U);
    *n = (long)(((unsigned long)*n) / 10U);
  } else {
    res = (int)(((unsigned long)*n) % 16U);
    *n = (long)(((unsigned long)*n) / 16U);
  }
  return res;
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jne    114b <divide+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    116b <divide+0x6b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
and    $0xf,%rax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
shr    $0x4,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
mov    (%rdi),%rcx
cmp    $0xa,%esi
jne    1126 <divide+0x26>
movabs $0xcccccccccccccccd,%rdx
cc cc cc
mov    %rcx,%rax
mul    %rdx
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ecx
jmp    1134 <divide+0x34>
mov    %ecx,%eax
and    $0xf,%eax
shr    $0x4,%rcx
mov    %rcx,%rdx
mov    %eax,%ecx
mov    %rdx,(%rdi)
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @divide(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i64*, i64** %3
%10 = load i64, i64* %9
%11 = urem i64 %10, 10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %5
%13 = load i64*, i64** %3
%14 = load i64, i64* %13
%15 = udiv i64 %14, 10
%16 = load i64*, i64** %3
store i64 %15, i64* %16
br label %26
17: ; preds = %2
%18 = load i64*, i64** %3
%19 = load i64, i64* %18
%20 = urem i64 %19, 16
%21 = trunc i64 %20 to i32
store i32 %21, i32* %5
%22 = load i64*, i64** %3
%23 = load i64, i64* %22
%24 = udiv i64 %23, 16
%25 = load i64*, i64** %3
store i64 %24, i64* %25
br label %26
26: ; preds = %17, %8
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @divide(i64* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 10
%4 = load i64, i64* %0
br i1 %3, label %5, label %9
5: ; preds = %2
%6 = urem i64 %4, 10
%7 = trunc i64 %6 to i32
%8 = udiv i64 %4, 10
br label %13
9: ; preds = %2
%10 = trunc i64 %4 to i32
%11 = and i32 %10, 15
%12 = lshr i64 %4, 4
br label %13
13: ; preds = %9, %5
%14 = phi i64 [ %12, %9 ], [ %8, %5 ]
%15 = phi i32 [ %11, %9 ], [ %7, %5 ]
store i64 %14, i64* %0
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int socket(int, int, int);
int Socket(int domain, int type, int protocol) {
  int ret;
  ret = socket(domain, type, protocol);
  if (ret == -1)
    perror("socket()");
  return ret;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1158 <Socket+0x38>
lea    0xead(%rip),%rdi
call   1030 <perror@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rbx
call   1040 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1131 <Socket+0x11>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec8(%rip),%rdi
call   1030 <perror@plt>
jmp    112d <Socket+0xd>

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

LLVM IR (-O2):
@.str = [9 x i8] c"socket()\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ stb_nptr_didset(void *);
void stb_nptr_set(void *address_of_pointer, void *value_to_write) {
  if (*(void **)address_of_pointer != value_to_write) {
    *(void **)address_of_pointer = value_to_write;
    stb_nptr_didset(address_of_pointer);
  }
}


x86 assembly (clang, -O0):
<stb_nptr_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
je     1145 <stb_nptr_set+0x35>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <stb_nptr_didset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_nptr_set>:
cmp    %rsi,(%rdi)
je     111d <stb_nptr_set+0xd>
mov    %rsi,(%rdi)
jmp    1030 <stb_nptr_didset@plt>
ret

LLVM IR (-O0):
define void @stb_nptr_set(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = icmp ne i8* %7, %8
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = bitcast i8* %12 to i8**
store i8* %11, i8** %13
%14 = load i8*, i8** %3
%15 = call i32 @stb_nptr_didset(i8* %14)
br label %16
16: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @stb_nptr_set(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, %1
br i1 %5, label %8, label %6
6: ; preds = %2
store i8* %1, i8** %3
%7 = tail call i32 @stb_nptr_didset(i8* %0)
br label %8
8: ; preds = %6, %2
ret void
}
int f(_Bool x) {
  int y;
  if (x)
    y = 1;
  else
    y = 0;
  return y;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
testb  $0x1,-0x1(%rbp)
je     1122 <f+0x22>
movl   $0x1,-0x8(%rbp)
jmp    1129 <f+0x29>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i1 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = zext i1 %0 to i8
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = trunc i8 %5 to i1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %9
8: ; preds = %1
store i32 0, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i1 zeroext %0) {
%2 = zext i1 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ LCD_write_data(char const);
int print_escape(const char **fmt) {
  switch (**fmt) {
  case '\'':
  case '\\':
    LCD_write_data(**fmt);
    break;
  }
  *fmt++;
  return 1;
}


x86 assembly (clang, -O0):
<print_escape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
sub    $0x27,%eax
je     1148 <print_escape+0x38>
jmp    1137 <print_escape+0x27>
mov    -0xc(%rbp),%eax
sub    $0x5c,%eax
jne    1157 <print_escape+0x47>
jmp    1148 <print_escape+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <LCD_write_data@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_escape>:
push   %rax
mov    (%rdi),%rax
movsbl (%rax),%edi
cmp    $0x5c,%edi
je     1121 <print_escape+0x11>
cmp    $0x27,%edi
jne    1126 <print_escape+0x16>
call   1030 <LCD_write_data@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @print_escape(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %12 [
i32 39, label %7
i32 92, label %7
]
7: ; preds = %1, %1
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = call i32 @LCD_write_data(i8 signext %10)
br label %12
12: ; preds = %1, %7
%13 = load i8**, i8*** %2
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %2
%15 = load i8*, i8** %13
ret i32 1
}

LLVM IR (-O2):
define i32 @print_escape(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %7 [
i32 39, label %5
i32 92, label %5
]
5: ; preds = %1, %1
%6 = tail call i32 @LCD_write_data(i8 signext %3)
br label %7
7: ; preds = %1, %5
ret i32 1
}
/* Variables and functions */
float fat(int);
float calc_num(int n) {
  int cont = 1;
  float s, aux;
  s = 1.0;
  while (cont <= n) {
    aux = fat(cont);
    s += 1 / (float)aux;
    cont++;
  }
  return (s);
}


x86 assembly (clang, -O0):
<calc_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     116d <calc_num+0x5d>
mov    -0x8(%rbp),%edi
call   1030 <fat@plt>
movss  %xmm0,-0x10(%rbp)
movss  0xeb0(%rip),%xmm0
divss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <calc_num+0x1f>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_num>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1168 <calc_num+0x58>
mov    %edi,%r14d
neg    %r14d
movss  0xeda(%rip),%xmm0
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
movss  %xmm0,0x4(%rsp)
mov    %ebx,%edi
call   1030 <fat@plt>
movss  0xebb(%rip),%xmm1
divss  %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
addss  %xmm1,%xmm0
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <calc_num+0x20>
jmp    1170 <calc_num+0x60>
movss  0xe90(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float @calc_num(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 %0, i32* %2
store i32 1, i32* %3
store float 1.000000e+00, float* %4
br label %6
6: ; preds = %10, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32, i32* %3
%12 = call float @fat(i32 %11)
store float %12, float* %5
%13 = load float, float* %5
%14 = fdiv float 1.000000e+00, %13
%15 = load float, float* %4
%16 = fadd float %15, %14
store float %16, float* %4
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = load float, float* %4
ret float %20
}

LLVM IR (-O2):
define float @calc_num(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 1, %1 ]
%5 = phi float [ %8, %3 ], [ 1.000000e+00, %1 ]
%6 = tail call float @fat(i32 %4)
%7 = fdiv float 1.000000e+00, %6
%8 = fadd float %5, %7
%9 = add nuw i32 %4, 1
%10 = icmp eq i32 %4, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi float [ 1.000000e+00, %1 ], [ %8, %3 ]
ret float %12
}
void radio_df_mode_set_aod(void) {}


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

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

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

LLVM IR (-O2):
define void @radio_df_mode_set_aod() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int age;
  printf("Age: ");
  scanf("%d", &age);
  if (age > 18) {
    printf("Welcome.\n");
  }
  return 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    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x12,-0x8(%rbp)
jle    1161 <main+0x41>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x13,0x4(%rsp)
jl     1161 <main+0x31>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Age: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"Welcome.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 18
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Age: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [9 x i8] c"Welcome.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 18
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
scalar_t__ x54x_in(int /*<<< orphan*/, void *);
uint32_t x54x_inl(uint16_t port, void *priv) {
  return ((uint32_t)x54x_in(port, priv));
}


x86 assembly (clang, -O0):
<x54x_inl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <x54x_in@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x54x_inl>:
jmp    1030 <x54x_in@plt>

LLVM IR (-O0):
define i32 @x54x_inl(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 = load i8*, i8** %4
%7 = call i64 @x54x_in(i32 %5, i8* %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @x54x_inl(i32 %0, i8* %1) {
%3 = tail call i64 @x54x_in(i32 %0, i8* %1)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ raise(int);
void os__signal_raise(int signal_number) { raise(signal_number); }


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

x86 assembly (clang, -O2):
<os__signal_raise>:
jmp    1030 <raise@plt>

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

LLVM IR (-O2):
define void @os__signal_raise(i32 %0) {
%2 = tail call i32 @raise(i32 %0)
ret void
}
/* Variables and functions */
int puts(char *);
extern int foo(int a) { return puts("Hello"); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @foo(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void sha512_finish(struct sha512 *sha) {}


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

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

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

LLVM IR (-O2):
%struct.sha512 = type opaque
define void @sha512_finish(%struct.sha512* nocapture %0) {
ret void
}