xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ console_putc(int, char);
void putchar(char c) { console_putc((1 << 1), c); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x2,%edi
movsbl -0x1(%rbp),%esi
call   1030 <console_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    %edi,%esi
mov    $0x2,%edi
jmp    1030 <console_putc@plt>

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

LLVM IR (-O2):
define void @putchar(i8 signext %0) {
%2 = tail call i32 @console_putc(i32 2, i8 signext %0)
ret void
}
/* Variables and functions */
bool readbit() { return false; }


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

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

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

LLVM IR (-O2):
define i32 @readbit() {
ret i32 0
}
void voyeur_log(const char *str) {}


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

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

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

LLVM IR (-O2):
define void @voyeur_log(i8* nocapture %0) {
ret void
}
void rq_sched_info_depart(struct rq *rq, unsigned long long delta) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @rq_sched_info_depart(%struct.rq* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glPopName();
void PopName(void) { glPopName(); }


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

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

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

LLVM IR (-O2):
define void @PopName() {
%1 = tail call i32 (...) @glPopName()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float r, p;
  printf("Enter the price of an item :\n");
  scanf("%f", &r);
  p = (r * 100);
  printf("The price of an item is %fpaise", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeab(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xea4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter the price of an item :\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [32 x i8] c"The price of an item is %fpaise\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fmul float %6, 1.000000e+02
store float %7, float* %3
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [32 x i8] c"The price of an item is %fpaise\00"
@str = [29 x i8] c"Enter the price of an item :\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 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), float* %1)
%5 = load float, float* %1
%6 = fmul float %5, 1.000000e+02
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __CONST_SOCKADDR_ARG;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int bind(int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @bind(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* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @bind(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PSRAD(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0xe2);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PSRAD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xe2,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PSRAD>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xe2,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PSRAD(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 226)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PSRAD(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 226)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
int ft_strlen(char const *s) {
  int i;
  i = 0;
  while (s[i] != '\0')
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_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 <ft_strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_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 @ft_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
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void gen_not_equal(void) {
  gen_pop();
  gen_call("ccne");
}


x86 assembly (clang, -O0):
<gen_not_equal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_not_equal>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ccne\00"
define void @gen_not_equal() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccne\00"
define void @gen_not_equal() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};
struct inode_info {
  int dummy;
};

/* Variables and functions */
struct inode_info *lookup_inode2(struct stat *, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
struct inode_info *lookup_inode(struct stat *buf) {
  return lookup_inode2(buf, 0, 0);
}


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

x86 assembly (clang, -O2):
<lookup_inode>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <lookup_inode2@plt>

LLVM IR (-O0):
%struct.inode_info = type { i32 }
%struct.stat = type { i32 }
define %struct.inode_info* @lookup_inode(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = call %struct.inode_info* @lookup_inode2(%struct.stat* %3, i32 0, i32 0)
ret %struct.inode_info* %4
}

LLVM IR (-O2):
%struct.inode_info = type { i32 }
%struct.stat = type { i32 }
define %struct.inode_info* @lookup_inode(%struct.stat* %0) {
%2 = tail call %struct.inode_info* @lookup_inode2(%struct.stat* %0, i32 0, i32 0)
ret %struct.inode_info* %2
}
/* Variables and functions */
int /*<<< orphan*/ GPS_Math_XYZ_To_LatLonH(double *, double *, double *, double,
                                           double, double, double, double);
void GPS_Math_XYZ_To_WGS84LatLonH(double *phi, double *lambda, double *H,
                                  double x, double y, double z) {
  double a = 6378137.000;
  double b = 66356752.3141;
  GPS_Math_XYZ_To_LatLonH(phi, lambda, H, x, y, z, a, b);
  return;
}


x86 assembly (clang, -O0):
<GPS_Math_XYZ_To_WGS84LatLonH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
call   1030 <GPS_Math_XYZ_To_LatLonH@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_XYZ_To_WGS84LatLonH>:
movsd  0xee8(%rip),%xmm3
movsd  0xee8(%rip),%xmm4
jmp    1030 <GPS_Math_XYZ_To_LatLonH@plt>

LLVM IR (-O0):
define void @GPS_Math_XYZ_To_WGS84LatLonH(double* %0, double* %1, double* %2, double %3, double %4, double %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
store double 0x415854A640000000, double* %13
store double 0x418FA430828346DC, double* %14
%15 = load double*, double** %7
%16 = load double*, double** %8
%17 = load double*, double** %9
%18 = load double, double* %10
%19 = load double, double* %11
%20 = load double, double* %12
%21 = load double, double* %13
%22 = load double, double* %14
%23 = call i32 @GPS_Math_XYZ_To_LatLonH(double* %15, double* %16, double* %17, double %18, double %19, double %20, double %21, double %22)
ret void
}

LLVM IR (-O2):
define void @GPS_Math_XYZ_To_WGS84LatLonH(double* %0, double* %1, double* %2, double %3, double %4, double %5) {
%7 = tail call i32 @GPS_Math_XYZ_To_LatLonH(double* %0, double* %1, double* %2, double %3, double %4, double %5, double 0x415854A640000000, double 0x418FA430828346DC)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void timer_init() {
  uint8_t *b;
  uint32_t *t;
  b = (uint8_t *)((0x1f000000) + 0x0100);
  b[0] = 3;
  b[4] = 0xff;
  t = (uint32_t *)((0x1f000000) + 0x1000);
  t[0] = 3;
}


x86 assembly (clang, -O0):
<timer_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1f000100,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xff,0x10(%rax)
mov    $0x1f001000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_init>:
movl   $0x3,0x1f000100
movl   $0xff,0x1f000110
movl   $0x3,0x1f001000
ret

LLVM IR (-O0):
define void @timer_init() {
%1 = alloca i32*
%2 = alloca i32*
store i32* inttoptr (i64 520093952 to i32*), i32** %1
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 3, i32* %4
%5 = load i32*, i32** %1
%6 = getelementptr inbounds i32, i32* %5, i64 4
store i32 255, i32* %6
store i32* inttoptr (i64 520097792 to i32*), i32** %2
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 3, i32* %8
ret void
}

LLVM IR (-O2):
define void @timer_init() {
store i32 3, i32* inttoptr (i64 520093952 to i32*)
store i32 255, i32* inttoptr (i64 520093968 to i32*)
store i32 3, i32* inttoptr (i64 520097792 to i32*)
ret void
}
/* Variables and functions */
int __syscall(int, void *, int /*<<< orphan*/, int /*<<< orphan*/, int);
int fstat(int filedes, void *info) {
  return __syscall(filedes, info, 0, 0, 22);
}


x86 assembly (clang, -O0):
<fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    $0x16,%r8d
mov    %ecx,%edx
call   1030 <__syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstat>:
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x16,%r8d
jmp    1030 <__syscall@plt>

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

LLVM IR (-O2):
define i32 @fstat(i32 %0, i8* %1) {
%3 = tail call i32 @__syscall(i32 %0, i8* %1, i32 0, i32 0, i32 22)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ tste();
scalar_t__ tste_vol();
main() {
  if (tste() != tste_vol())
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <tste@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <tste_vol@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     1178 <main+0x38>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <tste@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <tste_vol@plt>
cmp    %rax,%rbx
jne    115e <main+0x1e>
xor    %edi,%edi
call   1060 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @tste()
%3 = call i64 (...) @tste_vol()
%4 = icmp ne i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @tste()
%2 = tail call i64 (...) @tste_vol()
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = tail call i32 @exit(i32 0)
unreachable
}
int lengthAckermannSequence(int n) {
  int count = 0;
  do {
    if (n & 1) {
      n = 3 * n + 1;
    } else {
      n >>= 1;
    }
    count++;
  } while (n > 1);
  return count;
}


x86 assembly (clang, -O0):
<lengthAckermannSequence>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112c <lengthAckermannSequence+0x2c>
imul   $0x3,-0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <lengthAckermannSequence+0x35>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     110e <lengthAckermannSequence+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lengthAckermannSequence>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%ecx
sar    %ecx
test   $0x1,%dil
lea    0x1(%rdi,%rdi,2),%edi
cmove  %ecx,%edi
add    $0x1,%eax
cmp    $0x1,%edi
jg     1110 <lengthAckermannSequence+0x10>
ret

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

LLVM IR (-O2):
define i32 @lengthAckermannSequence(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %10, %2 ]
%4 = phi i32 [ 0, %1 ], [ %11, %2 ]
%5 = and i32 %3, 1
%6 = icmp eq i32 %5, 0
%7 = mul nsw i32 %3, 3
%8 = add nsw i32 %7, 1
%9 = ashr i32 %3, 1
%10 = select i1 %6, i32 %9, i32 %8
%11 = add nuw nsw i32 %4, 1
%12 = icmp sgt i32 %10, 1
br i1 %12, label %2, label %13
13: ; preds = %2
ret i32 %11
}
int _dldump(const char *str1, const char *str2, int x) {}


x86 assembly (clang, -O0):
<_dldump>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_dldump(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 undef
}
long C_Utils_min_long(const long item1, const long item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_min_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <C_Utils_min_long+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <C_Utils_min_long+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_min_long>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @C_Utils_min_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @C_Utils_min_long(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
int test_imm_1Bint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x1B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Bint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 115964116992
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int unlink(char const *);
int pwpFileDelete(const char *filename) {
  int ret = 0;
  if (((filename) && (filename[0]))) {
    ret = unlink(filename);
  }
  return ret;
}


x86 assembly (clang, -O0):
<pwpFileDelete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114a <pwpFileDelete+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114a <pwpFileDelete+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwpFileDelete>:
test   %rdi,%rdi
je     111f <pwpFileDelete+0xf>
cmpb   $0x0,(%rdi)
je     111f <pwpFileDelete+0xf>
jmp    1030 <unlink@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pwpFileDelete(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%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 = %6
%13 = load i8*, i8** %2
%14 = call i32 @unlink(i8* %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %6, %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @pwpFileDelete(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @unlink(i8* %0)
br label %8
8: ; preds = %6, %3, %1
%9 = phi i32 [ %7, %6 ], [ 0, %3 ], [ 0, %1 ]
ret i32 %9
}
void printtriangle(m, b, t) struct mesh *m;
struct behavior *b;
struct otri *t;
{
  printf("printtriangle is not supported");
}


x86 assembly (clang, -O0):
<printtriangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printtriangle>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.mesh = type opaque
%struct.behavior = type opaque
%struct.otri = type opaque
@.str = [31 x i8] c"printtriangle is not supported\00"
define void @printtriangle(%struct.mesh* %0, %struct.behavior* %1, %struct.otri* %2) {
%4 = alloca %struct.mesh*
%5 = alloca %struct.behavior*
%6 = alloca %struct.otri*
store %struct.mesh* %0, %struct.mesh** %4
store %struct.behavior* %1, %struct.behavior** %5
store %struct.otri* %2, %struct.otri** %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.mesh = type opaque
%struct.behavior = type opaque
%struct.otri = type opaque
@.str = [31 x i8] c"printtriangle is not supported\00"
define void @printtriangle(%struct.mesh* nocapture readnone %0, %struct.behavior* nocapture readnone %1, %struct.otri* nocapture readnone %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BSP_WriteIcr(unsigned long);
void BSP_ClearDspInterruptAll(void) {
  unsigned long tmp;
  tmp = 0xfff0;
  BSP_WriteIcr(tmp);
}


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

x86 assembly (clang, -O2):
<BSP_ClearDspInterruptAll>:
mov    $0xfff0,%edi
jmp    1030 <BSP_WriteIcr@plt>

LLVM IR (-O0):
define void @BSP_ClearDspInterruptAll() {
%1 = alloca i64
store i64 65520, i64* %1
%2 = load i64, i64* %1
%3 = call i32 @BSP_WriteIcr(i64 %2)
ret void
}

LLVM IR (-O2):
define void @BSP_ClearDspInterruptAll() {
%1 = tail call i32 @BSP_WriteIcr(i64 65520)
ret void
}
/* Variables and functions */
int strlen(char *);
int string_length(char *s) { return strlen(s); }


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

x86 assembly (clang, -O2):
<string_length>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @string_length(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
enum E1 { A, B = 0 } f3() { ; }


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

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

LLVM IR (-O0):
define i32 @f3() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f3() {
ret i32 undef
}
void io_delay(void) {
  const unsigned short DELAY_PORT = 0x80;
  asm volatile("outb %%al,%0" : : "dN"(DELAY_PORT));
}


x86 assembly (clang, -O0):
<io_delay>:
push   %rbp
mov    %rsp,%rbp
movw   $0x80,-0x2(%rbp)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_delay>:
out    %al,$0x80
ret

LLVM IR (-O0):
define void @io_delay() {
%1 = alloca i16
store i16 128, i16* %1
ret void
}

LLVM IR (-O2):
define void @io_delay() {
tail call void asm sideeffect "outb %al,$0", "{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 128)
ret void
}
void RTStrCacheDestroy(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ le32toh(int /*<<< orphan*/);
uint32_t _le32toh(uint32_t value) { return le32toh(value); }


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

x86 assembly (clang, -O2):
<_le32toh>:
jmp    1030 <le32toh@plt>

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

LLVM IR (-O2):
define i32 @_le32toh(i32 %0) {
%2 = tail call i32 @le32toh(i32 %0)
ret i32 %2
}
void ff_hevc_put_hevc_uni_w_qpel_v64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_v64_10_sse4() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_Laurent_start_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(784, a, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @copy_dobldobl_Laurent_start_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 784, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
bool ia_bit16(uint16_t word, int i) { return (word & (1 << i)) != 0; }


x86 assembly (clang, -O0):
<ia_bit16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ia_bit16>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ia_bit16(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 = shl i32 1, %6
%8 = and i32 %5, %7
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ia_bit16(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
int clamp255(int clr) {
  if (clr < 0)
    return (0);
  if (clr > 255)
    return (255);
  return (clr);
}


x86 assembly (clang, -O0):
<clamp255>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <clamp255+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113c <clamp255+0x3c>
cmpl   $0xff,-0x8(%rbp)
jle    1136 <clamp255+0x36>
movl   $0xff,-0x4(%rbp)
jmp    113c <clamp255+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp255>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @clamp255(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 255
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 255, i32* %2
br label %13
11: ; preds = %7
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @clamp255(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
float UI_ProportionalSizeScale(int style) {
  if (style & 0x00000010) {
    return 0.45f;
  }
  return 1.00;
}


x86 assembly (clang, -O0):
<UI_ProportionalSizeScale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1128 <UI_ProportionalSizeScale+0x28>
movss  0xee6(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1135 <UI_ProportionalSizeScale+0x35>
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_ProportionalSizeScale>:
xor    %eax,%eax
test   $0x10,%dil
sete   %al
lea    0xef0(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @UI_ProportionalSizeScale(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0x3FDCCCCCC0000000, float* %2
br label %9
8: ; preds = %1
store float 1.000000e+00, float* %2
br label %9
9: ; preds = %8, %7
%10 = load float, float* %2
ret float %10
}

LLVM IR (-O2):
define float @UI_ProportionalSizeScale(i32 %0) {
%2 = and i32 %0, 16
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, float 1.000000e+00, float 0x3FDCCCCCC0000000
ret float %4
}
int funA(int x) { return x + 2; }


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

x86 assembly (clang, -O2):
<funA>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @funA(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
__attribute__((gnu_)) double carmen_clamp(double X, double Y, double Z) {
  if (Y < X)
    return X;
  else if (Y > Z)
    return Z;
  return Y;
}


x86 assembly (clang, -O0):
<carmen_clamp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <carmen_clamp+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <carmen_clamp+0x64>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1155 <carmen_clamp+0x55>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <carmen_clamp+0x64>
jmp    115a <carmen_clamp+0x5a>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<carmen_clamp>:
minsd  %xmm1,%xmm2
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @carmen_clamp(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %6
%9 = load double, double* %5
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double, double* %5
store double %12, double* %4
br label %22
13: ; preds = %3
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double, double* %7
store double %18, double* %4
br label %22
19: ; preds = %13
br label %20
20: ; preds = %19
%21 = load double, double* %6
store double %21, double* %4
br label %22
22: ; preds = %20, %17, %11
%23 = load double, double* %4
ret double %23
}

LLVM IR (-O2):
define double @carmen_clamp(double %0, double %1, double %2) {
%4 = fcmp olt double %1, %0
%5 = fcmp ogt double %1, %2
%6 = select i1 %5, double %2, double %1
%7 = select i1 %4, double %0, double %6
ret double %7
}
void eiwic_test_trigger() {}


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

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

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

LLVM IR (-O2):
define void @eiwic_test_trigger() {
ret void
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int alphasort(const struct dirent **a, const struct dirent **b) {
  return strcmp((*a)->d_name, (*b)->d_name);
}


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

x86 assembly (clang, -O2):
<alphasort>:
mov    (%rdi),%rax
mov    (%rax),%edi
mov    (%rsi),%rax
mov    (%rax),%esi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @alphasort(%struct.dirent** %0, %struct.dirent** %1) {
%3 = alloca %struct.dirent**
%4 = alloca %struct.dirent**
store %struct.dirent** %0, %struct.dirent*** %3
store %struct.dirent** %1, %struct.dirent*** %4
%5 = load %struct.dirent**, %struct.dirent*** %3
%6 = load %struct.dirent*, %struct.dirent** %5
%7 = getelementptr inbounds %struct.dirent, %struct.dirent* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load %struct.dirent**, %struct.dirent*** %4
%10 = load %struct.dirent*, %struct.dirent** %9
%11 = getelementptr inbounds %struct.dirent, %struct.dirent* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @strcmp(i32 %8, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @alphasort(%struct.dirent** nocapture %0, %struct.dirent** nocapture %1) {
%3 = load %struct.dirent*, %struct.dirent** %0
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i64 0, i32 0
%5 = load i32, i32* %4
%6 = load %struct.dirent*, %struct.dirent** %1
%7 = getelementptr inbounds %struct.dirent, %struct.dirent* %6, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @strcmp(i32 %5, i32 %8)
ret i32 %9
}
/* Variables and functions */
scalar_t__ log(double);
float logf(float x) { return (float)log((double)x); }


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

x86 assembly (clang, -O2):
<logf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @logf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @log(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @logf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @log(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
int getpid(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getpid() {
ret i32 0
}
void state_input_b(unsigned int value) {}


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

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

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

LLVM IR (-O2):
define void @state_input_b(i32 %0) {
ret void
}
int armv6_pmcr_has_overflowed(unsigned long pmcr) {
  return pmcr & ((1 << 8) | (1 << 9) | (1 << 10));
}


x86 assembly (clang, -O0):
<armv6_pmcr_has_overflowed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x700,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<armv6_pmcr_has_overflowed>:
mov    %rdi,%rax
and    $0x700,%eax
ret

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

LLVM IR (-O2):
define i32 @armv6_pmcr_has_overflowed(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1792
ret i32 %3
}
/* Variables and functions */
char *strchr(char *, char);
void terminate_str(char *str, char what) {
  char *dummy = strchr(str, what);
  if (dummy)
    *dummy = 0x00;
}


x86 assembly (clang, -O0):
<terminate_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1145 <terminate_str+0x35>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate_str>:
push   %rax
call   1030 <strchr@plt>
test   %rax,%rax
je     111e <terminate_str+0xe>
movb   $0x0,(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
define void @terminate_str(i8* %0, i8 signext %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
store i8 0, i8* %3
br label %6
6: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printLocalVariable() {
  int numberone = 2;
  printf("Function printLocalVariable, variable = %d\n", numberone);
}


x86 assembly (clang, -O0):
<printLocalVariable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLocalVariable>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Function printLocalVariable, variable = %d\0A\00"
define void @printLocalVariable() {
%1 = alloca i32
store i32 2, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Function printLocalVariable, variable = %d\0A\00"
define void @printLocalVariable() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, unsigned long);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *ret = realloc(ptr, size);
  if (!ret)
    die("Can't realloc %ld bytes\n", (unsigned long)size);
  return ret;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115c <xrealloc+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <xrealloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Can't realloc %ld bytes\0A\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [25 x i8] c"Can't realloc %ld bytes\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void um_mutex_init(void) {}


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

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

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

LLVM IR (-O2):
define void @um_mutex_init() {
ret void
}
int is_litter_endian(void) {
  int x = 1;
  return (int)(*(char *)&x);
}


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

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

LLVM IR (-O0):
define i32 @is_litter_endian() {
%1 = alloca i32
store i32 1, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_litter_endian() {
ret i32 1
}
void silc_usleep(long microseconds) {}


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

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

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

LLVM IR (-O2):
define void @silc_usleep(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PE_low_level_init();
void main(void) {
  PE_low_level_init();
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PE_low_level_init@plt>
jmp    111b <main+0xb>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <PE_low_level_init@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @PE_low_level_init()
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @PE_low_level_init()
br label %2
2: ; preds = %2, %0
br label %2
}