xunge/DecIR huggingface dataset:
int EMB_length(char *s) {
  char *p = s;
  while (*(p++))
    ;
  return (int)(p - s) - 1;
}


x86 assembly (clang, -O0):
<EMB_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <EMB_length+0x2d>
jmp    1110 <EMB_length+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMB_length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <EMB_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @EMB_length(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
%12 = add nsw i32 %11, -1
ret i32 %12
}
/* Type definitions */
struct telnetd_state {
  int dummy;
};

/* Variables and functions */
scalar_t__ strlen(char *);
int /*<<< orphan*/ telnetd_output(struct telnetd_state *, char *, char *);
void none(struct telnetd_state *s, char *str) {
  if (strlen(str) > 0) {
    telnetd_output(s, "Unknown command", "");
  }
}


x86 assembly (clang, -O0):
<none>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jle    115a <none+0x3a>
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
lea    0xeba(%rip),%rdx
call   1030 <telnetd_output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<none>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
jle    1148 <none+0x28>
lea    0xec8(%rip),%rsi
lea    0xed0(%rip),%rdx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <telnetd_output@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.telnetd_state = type { i32 }
@.str = [16 x i8] c"Unknown command\00"
@.str.1 = [1 x i8] zeroinitializer
define void @none(%struct.telnetd_state* %0, i8* %1) {
%3 = alloca %struct.telnetd_state*
%4 = alloca i8*
store %struct.telnetd_state* %0, %struct.telnetd_state** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strlen(i8* %5)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load %struct.telnetd_state*, %struct.telnetd_state** %3
%10 = call i32 @telnetd_output(%struct.telnetd_state* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.telnetd_state = type { i32 }
@.str = [16 x i8] c"Unknown command\00"
@.str.1 = [1 x i8] zeroinitializer
define void @none(%struct.telnetd_state* %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @telnetd_output(%struct.telnetd_state* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
double metric_jacobian(const double x[3]) { return x[0]; }


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

x86 assembly (clang, -O2):
<metric_jacobian>:
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @metric_jacobian(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
ret double %5
}

LLVM IR (-O2):
define double @metric_jacobian(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
void mdp4_mddi_overlay_blt(struct msm_fb_data_type *mfd,
                           struct msmfb_overlay_blt *req) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
%struct.msmfb_overlay_blt = type opaque
define void @mdp4_mddi_overlay_blt(%struct.msm_fb_data_type* nocapture %0, %struct.msmfb_overlay_blt* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256d;

/* Variables and functions */
int /*<<< orphan*/ _mm256_and_pd(int /*<<< orphan*/, int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm256_castsi256_pd(int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_set_epi32(int, int, int, int, int, int, int, int);
__m256d gmx_mm256_abs_pd(__m256d x) {
  const __m256d signmask = _mm256_castsi256_pd(
      _mm256_set_epi32(0x7FFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0xFFFFFFFF,
                       0x7FFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0xFFFFFFFF));
  return _mm256_and_pd(x, signmask);
}


x86 assembly (clang, -O0):
<gmx_mm256_abs_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x7fffffff,%r8d
mov    $0xffffffff,%r9d
mov    %r8d,%edi
mov    %r9d,%esi
mov    %r8d,%edx
mov    %r9d,%ecx
movl   $0x7fffffff,(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
call   1030 <_mm256_set_epi32@plt>
mov    %eax,%edi
call   1050 <_mm256_castsi256_pd@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm256_and_pd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_mm256_abs_pd>:
push   %rbx
mov    %edi,%ebx
mov    $0x7fffffff,%edi
mov    $0xffffffff,%esi
mov    $0x7fffffff,%edx
mov    $0xffffffff,%ecx
mov    $0x7fffffff,%r8d
mov    $0xffffffff,%r9d
push   $0xffffffffffffffff
push   $0x7fffffff
call   1030 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
call   1050 <_mm256_castsi256_pd@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <_mm256_and_pd@plt>

LLVM IR (-O0):
define i32 @gmx_mm256_abs_pd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @_mm256_set_epi32(i32 2147483647, i32 -1, i32 2147483647, i32 -1, i32 2147483647, i32 -1, i32 2147483647, i32 -1)
%5 = call i32 @_mm256_castsi256_pd(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @_mm256_and_pd(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @gmx_mm256_abs_pd(i32 %0) {
%2 = tail call i32 @_mm256_set_epi32(i32 2147483647, i32 -1, i32 2147483647, i32 -1, i32 2147483647, i32 -1, i32 2147483647, i32 -1)
%3 = tail call i32 @_mm256_castsi256_pd(i32 %2)
%4 = tail call i32 @_mm256_and_pd(i32 %0, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int crc8_p93_2b(int const, int const);
int /*<<< orphan*/ printf(char *, int const, int const, int const);
uint8_t test2(uint8_t const b1, uint8_t const b2) {
  uint8_t const crc = crc8_p93_2b(b1, b2);
  printf("b2=%02x%02x crc=%02x\n", b1, b2, crc);
  return crc;
}


x86 assembly (clang, -O0):
<test2>:
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   1040 <crc8_p93_2b@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
call   1040 <crc8_p93_2b@plt>
mov    %eax,%ebx
lea    0xec9(%rip),%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"b2=%02x%02x crc=%02x\0A\00"
define i32 @test2(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 = call i32 @crc8_p93_2b(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [22 x i8] c"b2=%02x%02x crc=%02x\0A\00"
define i32 @test2(i32 %0, i32 %1) {
%3 = tail call i32 @crc8_p93_2b(i32 %0, i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret i32 %3
}
/* Variables and functions */
int foo(int, int);
int main(void) {
  int a;
  int b;
  int c;
  int tmp;
  int tmp___0;
  int tmp___1;
  {
    {
      tmp = foo(5, 7);
      tmp___0 = foo(6, 7);
      tmp___1 = -1;
      a = (tmp + tmp___0) + -1;
      b = 4;
      c = 16;
    }
    {
      { return (20); }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <foo@plt>
mov    %eax,-0x14(%rbp)
mov    $0x6,%edi
mov    $0x7,%esi
call   1030 <foo@plt>
mov    %eax,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x10,-0x10(%rbp)
mov    $0x14,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <foo@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1030 <foo@plt>
mov    $0x14,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @foo(i32 5, i32 7)
store i32 %8, i32* %5
%9 = call i32 @foo(i32 6, i32 7)
store i32 %9, i32* %6
store i32 -1, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
%13 = add nsw i32 %12, -1
store i32 %13, i32* %2
store i32 4, i32* %3
store i32 16, i32* %4
ret i32 20
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 5, i32 7)
%2 = tail call i32 @foo(i32 6, i32 7)
ret i32 20
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
unsigned int bytestream_get_le16(const uint8_t **b) {
  (*b) += 2;
  return ((((const uint8_t *)(*b - 2))[1] << 8) |
          ((const uint8_t *)(*b - 2))[0]);
}


x86 assembly (clang, -O0):
<bytestream_get_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x4(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
or     -0x8(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytestream_get_le16>:
mov    (%rdi),%rcx
lea    0x8(%rcx),%rax
mov    %rax,(%rdi)
mov    0x4(%rcx),%eax
shl    $0x8,%eax
or     (%rcx),%eax
ret

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

LLVM IR (-O2):
define i32 @bytestream_get_le16(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = getelementptr inbounds i32, i32* %2, i64 2
store i32* %3, i32** %0
%4 = getelementptr inbounds i32, i32* %2, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32, i32* %2
%8 = or i32 %6, %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t mpeg2_accel(uint32_t accel) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mpeg2_accel(i32 %0) {
ret i32 0
}
void SCR_DebugGraph(float value, const float color[]) {}


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

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

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

LLVM IR (-O2):
define void @SCR_DebugGraph(float %0, float* nocapture %1) {
ret void
}
int _gtty(fildes, argp)
int fildes;
char *argp;
{ return _ioctl(fildes, (('t' << 8) | 8), argp); }


x86 assembly (clang, -O0):
<_gtty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x7408,%esi
mov    $0x0,%al
call   1030 <_ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gtty>:
mov    %rsi,%rdx
mov    $0x7408,%esi
xor    %eax,%eax
jmp    1030 <_ioctl@plt>

LLVM IR (-O0):
define i32 @_gtty(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 i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @_ioctl to i32 (i32, i32, i8*, ...)*)(i32 %5, i32 29704, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @_gtty(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @_ioctl to i32 (i32, i32, i8*, ...)*)(i32 %0, i32 29704, i8* %1)
ret i32 %3
}
/* Variables and functions */
size_t v2t_DSW_FullSize(size_t size) {
  size_t Rtn = 1;
  while (Rtn <= size)
    Rtn = Rtn + Rtn + 1;
  return Rtn / 2;
}


x86 assembly (clang, -O0):
<v2t_DSW_FullSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
ja     1133 <v2t_DSW_FullSize+0x33>
mov    -0x10(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <v2t_DSW_FullSize+0x10>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2t_DSW_FullSize>:
test   %rdi,%rdi
je     112d <v2t_DSW_FullSize+0x2d>
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rax
add    %rcx,%rcx
add    $0x1,%rcx
cmp    %rdi,%rcx
jbe    1110 <v2t_DSW_FullSize+0x10>
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
and    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @v2t_DSW_FullSize(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 1, i64* %3
br label %4
4: ; preds = %8, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ule i64 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = load i64, i64* %3
%10 = load i64, i64* %3
%11 = add i64 %9, %10
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
%14 = load i64, i64* %3
%15 = udiv i64 %14, 2
ret i64 %15
}

LLVM IR (-O2):
define i64 @v2t_DSW_FullSize(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 1, %1 ]
%5 = shl i64 %4, 1
%6 = or i64 %5, 1
%7 = icmp ugt i64 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = and i64 %4, 9223372036854775807
br label %10
10: ; preds = %8, %1
%11 = phi i64 [ 0, %1 ], [ %9, %8 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ udelay(int);
int /*<<< orphan*/ write32(int, int);
void ChangeClock(void) {
  write32((0xd800000 + 0x190), 1);
  udelay(1);
  write32((0xd800000 + 0x194), 0x7FFFFFF7);
  udelay(1);
  write32((0xd800000 + 0x190), 3);
  write32((0xd800000 + 0x194), 0x7FFFFFFF);
  udelay(4);
  write32((0xd800000 + 0x190), 2);
  udelay(1);
}


x86 assembly (clang, -O0):
<ChangeClock>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd800190,%edi
mov    $0x1,%esi
call   1030 <write32@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
mov    $0xd800194,%edi
mov    $0x7ffffff7,%esi
call   1030 <write32@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
mov    $0xd800190,%edi
mov    $0x3,%esi
call   1030 <write32@plt>
mov    $0xd800194,%edi
mov    $0x7fffffff,%esi
call   1030 <write32@plt>
mov    $0x4,%edi
call   1040 <udelay@plt>
mov    $0xd800190,%edi
mov    $0x2,%esi
call   1030 <write32@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChangeClock>:
push   %rax
mov    $0xd800190,%edi
mov    $0x1,%esi
call   1030 <write32@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
mov    $0xd800194,%edi
mov    $0x7ffffff7,%esi
call   1030 <write32@plt>
mov    $0x1,%edi
call   1040 <udelay@plt>
mov    $0xd800190,%edi
mov    $0x3,%esi
call   1030 <write32@plt>
mov    $0xd800194,%edi
mov    $0x7fffffff,%esi
call   1030 <write32@plt>
mov    $0x4,%edi
call   1040 <udelay@plt>
mov    $0xd800190,%edi
mov    $0x2,%esi
call   1030 <write32@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <udelay@plt>

LLVM IR (-O0):
define void @ChangeClock() {
%1 = call i32 @write32(i32 226492816, i32 1)
%2 = call i32 @udelay(i32 1)
%3 = call i32 @write32(i32 226492820, i32 2147483639)
%4 = call i32 @udelay(i32 1)
%5 = call i32 @write32(i32 226492816, i32 3)
%6 = call i32 @write32(i32 226492820, i32 2147483647)
%7 = call i32 @udelay(i32 4)
%8 = call i32 @write32(i32 226492816, i32 2)
%9 = call i32 @udelay(i32 1)
ret void
}

LLVM IR (-O2):
define void @ChangeClock() {
%1 = tail call i32 @write32(i32 226492816, i32 1)
%2 = tail call i32 @udelay(i32 1)
%3 = tail call i32 @write32(i32 226492820, i32 2147483639)
%4 = tail call i32 @udelay(i32 1)
%5 = tail call i32 @write32(i32 226492816, i32 3)
%6 = tail call i32 @write32(i32 226492820, i32 2147483647)
%7 = tail call i32 @udelay(i32 4)
%8 = tail call i32 @write32(i32 226492816, i32 2)
%9 = tail call i32 @udelay(i32 1)
ret void
}
void unsigned_char_xor_signed_char_signed_char(unsigned char *LHS,
                                               signed char RHS) {
  (*LHS) ^= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_xor_signed_char_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_xor_signed_char_signed_char>:
xor    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_xor_signed_char_signed_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = xor i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @unsigned_char_xor_signed_char_signed_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = xor i8 %3, %1
store i8 %4, i8* %0
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
struct slName {
  int dummy;
};

/* Variables and functions */
struct slName *extNamesForId(struct sqlConnection *, int, char *);
struct slName *genePixGenbank(struct sqlConnection *conn, int id) {
  return extNamesForId(conn, id, "genbank");
}


x86 assembly (clang, -O0):
<genePixGenbank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <extNamesForId@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genePixGenbank>:
lea    0xee9(%rip),%rdx
jmp    1030 <extNamesForId@plt>

LLVM IR (-O0):
%struct.slName = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"genbank\00"
define %struct.slName* @genePixGenbank(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call %struct.slName* @extNamesForId(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.slName* %7
}

LLVM IR (-O2):
%struct.slName = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"genbank\00"
define %struct.slName* @genePixGenbank(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call %struct.slName* @extNamesForId(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.slName* %3
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};
typedef int /*<<< orphan*/ Time;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
Time getTimeStamp() {
  int tint;
  struct timeval tv;
  struct timezone tz;
  gettimeofday(&tv, &tz);
  tint = (int)tv.tv_sec * 1000;
  tint = tint / 1000 * 1000;
  tint = tint + tv.tv_usec / 1000;
  return (Time)tint;
}


x86 assembly (clang, -O0):
<getTimeStamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <gettimeofday@plt>
mov    -0x10(%rbp),%rax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0x3e8,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimeStamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%ecx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i32 @getTimeStamp() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca %struct.timezone
%4 = call i32 @gettimeofday(%struct.timeval* %2, %struct.timezone* %3)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = mul nsw i32 %7, 1000
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = sdiv i32 %9, 1000
%11 = mul nsw i32 %10, 1000
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%14 = load i32, i32* %13
%15 = sdiv i32 %14, 1000
%16 = add nsw i32 %12, %15
store i32 %16, i32* %1
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i32 @getTimeStamp() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %8, 1000
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%11 = load i32, i32* %10
%12 = sdiv i32 %11, 1000
%13 = add nsw i32 %9, %12
ret i32 %13
}
/* Variables and functions */
void *thread3(void *d) {
  int count3 = 0;
  count3++;
  int *bad;
  *bad = 1;
  return NULL;
}


x86 assembly (clang, -O0):
<thread3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i8* @thread3(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32*
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32*, i32** %4
store i32 1, i32* %7
ret i8* null
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ grab(void *, int);
void grab1(void *p) { grab(p, 1); }


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

x86 assembly (clang, -O2):
<grab1>:
mov    $0x1,%esi
jmp    1030 <grab@plt>

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

LLVM IR (-O2):
define void @grab1(i8* %0) {
%2 = tail call i32 @grab(i8* %0, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ inline_test();
int function_test(int c) {
  int i, j = 0;
  for (i = 0; i < c; i++) {
    j++;
  }
  {
    int j = -1;
    j++;
  }
  j += inline_test();
  if (j > 0) {
    j = 0;
  }
  return j;
}


x86 assembly (clang, -O0):
<function_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114c <function_test+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <function_test+0x19>
movl   $0xffffffff,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <inline_test@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1181 <function_test+0x71>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_test>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
test   %edi,%edi
cmovs  %eax,%ebx
xor    %eax,%eax
call   1030 <inline_test@plt>
add    %ebx,%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @function_test(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
%4 = tail call i64 (...) @inline_test()
%5 = trunc i64 %4 to i32
%6 = add i32 %3, %5
%7 = icmp slt i32 %6, 0
%8 = select i1 %7, i32 %6, i32 0
ret i32 %8
}
int test_imm_5Duint8_mem(unsigned char *val) {
  return ((*val) & (0x5D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_5Duint8_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, 93
%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_5Duint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 93
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ pthread_self();
void *get_current_thread_id(void) { return (void *)pthread_self(); }


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

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

LLVM IR (-O0):
define i8* @get_current_thread_id() {
%1 = call i64 (...) @pthread_self()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @get_current_thread_id() {
%1 = tail call i64 (...) @pthread_self()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
void ScaleRowDown34_0_Box_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown34_0_Box_Any_NEON() {
ret void
}
int fun374() { return 374; }


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

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

LLVM IR (-O0):
define i32 @fun374() {
ret i32 374
}

LLVM IR (-O2):
define i32 @fun374() {
ret i32 374
}
/* Variables and functions */
int /*<<< orphan*/ entry_point(int /*<<< orphan*/);
void _reset_entry() { entry_point(0); }


x86 assembly (clang, -O0):
<_reset_entry>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <entry_point@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_reset_entry>:
xor    %edi,%edi
jmp    1030 <entry_point@plt>

LLVM IR (-O0):
define void @_reset_entry() {
%1 = call i32 @entry_point(i32 0)
ret void
}

LLVM IR (-O2):
define void @_reset_entry() {
%1 = tail call i32 @entry_point(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int ingresarNota() {
  int nota;
  printf("\nIngrese la nota ");
  scanf("%d", &nota);
  return nota;
}


x86 assembly (clang, -O0):
<ingresarNota>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ingresarNota>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"\0AIngrese la nota \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @ingresarNota() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0AIngrese la nota \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @ingresarNota() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 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
ret i32 %5
}
/* Variables and functions */
double to_feet(double);
double calc_fps(double miles, double seconds) {
  double fps, feet;
  feet = to_feet(miles);
  fps = feet / seconds;
  return fps;
}


x86 assembly (clang, -O0):
<calc_fps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <to_feet@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_fps>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <to_feet@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calc_fps(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = call double @to_feet(double %7)
store double %8, double* %6
%9 = load double, double* %6
%10 = load double, double* %4
%11 = fdiv double %9, %10
store double %11, double* %5
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @calc_fps(double %0, double %1) {
%3 = tail call double @to_feet(double %0)
%4 = fdiv double %3, %1
ret double %4
}
int lw_sock_recv_str_ex(int sock, char *str) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lw_sock_recv_str_ex(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ wfile_slash_this_way(char *, char);
void wfile_reslash(char *filename) { wfile_slash_this_way(filename, '/'); }


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

x86 assembly (clang, -O2):
<wfile_reslash>:
mov    $0x2f,%esi
jmp    1030 <wfile_slash_this_way@plt>

LLVM IR (-O0):
define void @wfile_reslash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @wfile_slash_this_way(i8* %3, i8 signext 47)
ret void
}

LLVM IR (-O2):
define void @wfile_reslash(i8* %0) {
%2 = tail call i32 @wfile_slash_this_way(i8* %0, i8 signext 47)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef scalar_t__ Atom;

/* Variables and functions */
int /*<<< orphan*/ False;
scalar_t__ XInternAtom(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
Atom getatom(Display *dpy) {
  static Atom atom = 0;
  if (atom == 0) {
    atom = XInternAtom(dpy, "_WINDOWMAKER_MENU", False);
  }
  return atom;
}


x86 assembly (clang, -O0):
<getatom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,0x2f0c(%rip)
jne    114a <getatom+0x3a>
mov    -0x8(%rbp),%rdi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
lea    0xec2(%rip),%rsi
call   1030 <XInternAtom@plt>
mov    %rax,0x2ee6(%rip)
mov    0x2edf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getatom>:
push   %rax
mov    0x2f18(%rip),%rax
test   %rax,%rax
je     111f <getatom+0xf>
pop    %rcx
ret
mov    0x2ec2(%rip),%rax
mov    (%rax),%edx
lea    0xed1(%rip),%rsi
call   1030 <XInternAtom@plt>
mov    %rax,0x2ef5(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@getatom.atom = internal global i64 0
@.str = [18 x i8] c"_WINDOWMAKER_MENU\00"
@False = global i32 0
define i64 @getatom(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i64, i64* @getatom.atom
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* @False
%8 = call i64 @XInternAtom(i32* %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
store i64 %8, i64* @getatom.atom
br label %9
9: ; preds = %5, %1
%10 = load i64, i64* @getatom.atom
ret i64 %10
}

LLVM IR (-O2):
@getatom.atom = internal unnamed_addr global i64 0
@.str = [18 x i8] c"_WINDOWMAKER_MENU\00"
@False = global i32 0
define i64 @getatom(i32* %0) {
%2 = load i64, i64* @getatom.atom
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @False
%6 = tail call i64 @XInternAtom(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
store i64 %6, i64* @getatom.atom
br label %7
7: ; preds = %4, %1
%8 = phi i64 [ %6, %4 ], [ %2, %1 ]
ret i64 %8
}
void reset_checker(void) {}


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

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

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

LLVM IR (-O2):
define void @reset_checker() {
ret void
}
/* Variables and functions */
int subtract_func(int, int, int, int, int);
int ssb_func(int src, int dest, int is_word) {
  return subtract_func(src, dest, is_word, 1, 1);
}


x86 assembly (clang, -O0):
<ssb_func>:
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
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <subtract_func@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssb_func>:
mov    $0x1,%ecx
mov    $0x1,%r8d
jmp    1030 <subtract_func@plt>

LLVM IR (-O0):
define i32 @ssb_func(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @subtract_func(i32 %7, i32 %8, i32 %9, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ssb_func(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @subtract_func(i32 %0, i32 %1, i32 %2, i32 1, i32 1)
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int depth;
};
typedef TYPE_1__ Depth;

/* Variables and functions */
void set_Depth_depth(void *_p, int _v) { ((Depth *)_p)->depth = (int)_v; }


x86 assembly (clang, -O0):
<set_Depth_depth>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_Depth_depth>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_Depth_depth(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ read(int, char *, int);
char *strchr(char *, char);
char *fgets(char *s, int size, FILE *stream) {
  read(((int)stream), s, size - 1);
  char *end = strchr(s, '\n');
  if (end != 0)
    *++end = '\0';
  return s;
}


x86 assembly (clang, -O0):
<fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
call   1040 <read@plt>
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1178 <fgets+0x58>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgets>:
push   %rbx
mov    %rdx,%rax
mov    %rdi,%rbx
lea    -0x1(%rsi),%edx
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <read@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     114a <fgets+0x2a>
movb   $0x0,0x1(%rax)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @fgets(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %6
%9 = ptrtoint i32* %8 to i32
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = call i32 @read(i32 %9, i8* %10, i32 %12)
%14 = load i8*, i8** %4
%15 = call i8* @strchr(i8* %14, i8 signext 10)
store i8* %15, i8** %7
%16 = load i8*, i8** %7
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %3
%19 = load i8*, i8** %7
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %7
store i8 0, i8* %20
br label %21
21: ; preds = %18, %3
%22 = load i8*, i8** %4
ret i8* %22
}

LLVM IR (-O2):
define i8* @fgets(i8* returned %0, i32 %1, i32* %2) {
%4 = ptrtoint i32* %2 to i64
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %1, -1
%7 = tail call i32 @read(i32 %5, i8* %0, i32 %6)
%8 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%9 = icmp eq i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8 0, i8* %11
br label %12
12: ; preds = %10, %3
ret i8* %0
}
int tk_doidledummy() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tk_doidledummy() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_3__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
typedef int u_int32_t;
struct TYPE_4__ {
  int _flags;
};
typedef TYPE_1__ ns_msg;
struct TYPE_5__ {
  int mask;
  int shift;
};

/* Variables and functions */
TYPE_3__ *_ns_flagdata;
int ns_msg_getflag(ns_msg handle, int flag) {
  return ((u_int32_t)((handle)._flags & _ns_flagdata[flag].mask) >>
          _ns_flagdata[flag].shift);
}


x86 assembly (clang, -O0):
<ns_msg_getflag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ecc(%rip),%rcx
mov    (%rcx),%rcx
movslq -0xc(%rbp),%rdx
and    (%rcx,%rdx,8),%eax
mov    0x2ebb(%rip),%rcx
mov    (%rcx),%rcx
movslq -0xc(%rbp),%rdx
mov    0x4(%rcx,%rdx,8),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_msg_getflag>:
mov    %edi,%eax
mov    0x2ed7(%rip),%rcx
mov    (%rcx),%rcx
movslq %esi,%rdx
and    (%rcx,%rdx,8),%eax
mov    0x4(%rcx,%rdx,8),%cl
sar    %cl,%eax
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32, i32 }
%struct.TYPE_4__ = type { i32 }
@_ns_flagdata = global %struct.TYPE_5__* null
define i32 @ns_msg_getflag(i32 %0, i32 %1) {
%3 = alloca %struct.TYPE_4__
%4 = alloca i32
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i32 0, i32 0
store i32 %0, i32* %5
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.TYPE_5__*, %struct.TYPE_5__** @_ns_flagdata
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %8, i64 %10
%12 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = and i32 %7, %13
%15 = load %struct.TYPE_5__*, %struct.TYPE_5__** @_ns_flagdata
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %15, i64 %17
%19 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %18, i32 0, i32 1
%20 = load i32, i32* %19
%21 = ashr i32 %14, %20
ret i32 %21
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, i32 }
@_ns_flagdata = global %struct.TYPE_5__* null
define i32 @ns_msg_getflag(i32 %0, i32 %1) {
%3 = load %struct.TYPE_5__*, %struct.TYPE_5__** @_ns_flagdata
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %4, i32 0
%6 = load i32, i32* %5
%7 = and i32 %6, %0
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 %4, i32 1
%9 = load i32, i32* %8
%10 = ashr i32 %7, %9
ret i32 %10
}
int strLen(const char *s) {
  int len = 0;
  while (s[len] != 0) {
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<strLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strLen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strLen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strLen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strLen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strLen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int cmd_linestat(int fd, int argc, char *argv[]) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cmd_linestat(i32 %0, i32 %1, i8** nocapture readnone %2) {
ret i32 0
}
float centsToDollar(int cents) { return cents / 100.0; }


x86 assembly (clang, -O0):
<centsToDollar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<centsToDollar>:
cvtsi2sd %edi,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @centsToDollar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 1.000000e+02
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @centsToDollar(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 1.000000e+02
%4 = fptrunc double %3 to float
ret float %4
}