xunge/DecIR huggingface dataset:
double calcGeomMeanAnomalySun(const double t) {
  return 357.52911 + t * (35999.05029 - 0.0001537 * t);
}


x86 assembly (clang, -O0):
<calcGeomMeanAnomalySun>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xeed(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xee9(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec9(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcGeomMeanAnomalySun>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calcGeomMeanAnomalySun(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double -1.537000e-04, double %4, double 0x40E193E19BF9C62A)
%6 = call double @llvm.fmuladd.f64(double %3, double %5, double 0x407658773C0C1FC9)
ret double %6
}

LLVM IR (-O2):
define double @calcGeomMeanAnomalySun(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double -1.537000e-04, double 0x40E193E19BF9C62A)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0x407658773C0C1FC9)
ret double %3
}
int f(int (**p)(void)) { return -p[1](); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
call   *0x8(%rax)
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
call   *0x8(%rdi)
neg    %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @f(i32 ()** nocapture %0) {
%2 = getelementptr inbounds i32 ()*, i32 ()** %0, i64 1
%3 = load i32 ()*, i32 ()** %2
%4 = tail call i32 %3()
%5 = sub nsw i32 0, %4
ret i32 %5
}
long brk(void *end_data_segment) {
  long ret = 0;
  asm("movq $45, %%rax   \n\t"
      "movq %1, %%rbx  \n\t"
      "int $0x80		\n\t"
      "movq %%rax,%0  \n\t"
      : "=r"(ret)
      : "m"(end_data_segment));
}


x86 assembly (clang, -O0):
<brk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x2d,%rax
mov    -0x10(%rbp),%rbx
int    $0x80
mov    %rax,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<brk>:
mov    %rdi,-0x8(%rsp)
mov    $0x2d,%rax
mov    -0x8(%rsp),%rbx
int    $0x80
mov    %rax,%rax
ret

LLVM IR (-O0):
define i64 @brk(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 0, i64* %4
%5 = call i64 asm "movq $$45, %rax \0A\09movq $1, %rbx \0A\09int $$0x80\09\09\0A\09movq %rax,$0 \0A\09", "=r,*m,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %3)
store i64 %5, i64* %4
%6 = load i64, i64* %2
ret i64 %6
}

LLVM IR (-O2):
define i64 @brk(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 asm "movq $$45, %rax \0A\09movq $1, %rbx \0A\09int $$0x80\09\09\0A\09movq %rax,$0 \0A\09", "=r,*m,~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %2)
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s", "I have SOOO MANY COOKIES, like…");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [34 x i8] c"I have SOOO MANY COOKIES, like\E2\80\A6\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [34 x i8] c"I have SOOO MANY COOKIES, like\E2\80\A6\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct colourSystem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gamma_correct(struct colourSystem const *, float *);
void gamma_correct_rgb(const struct colourSystem *cs, float *r, float *g,
                       float *b) {
  gamma_correct(cs, r);
  gamma_correct(cs, g);
  gamma_correct(cs, b);
}


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

x86 assembly (clang, -O2):
<gamma_correct_rgb>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
call   1030 <gamma_correct@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <gamma_correct@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <gamma_correct@plt>

LLVM IR (-O0):
%struct.colourSystem = type { i32 }
define void @gamma_correct_rgb(%struct.colourSystem* %0, float* %1, float* %2, float* %3) {
%5 = alloca %struct.colourSystem*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store %struct.colourSystem* %0, %struct.colourSystem** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load %struct.colourSystem*, %struct.colourSystem** %5
%10 = load float*, float** %6
%11 = call i32 @gamma_correct(%struct.colourSystem* %9, float* %10)
%12 = load %struct.colourSystem*, %struct.colourSystem** %5
%13 = load float*, float** %7
%14 = call i32 @gamma_correct(%struct.colourSystem* %12, float* %13)
%15 = load %struct.colourSystem*, %struct.colourSystem** %5
%16 = load float*, float** %8
%17 = call i32 @gamma_correct(%struct.colourSystem* %15, float* %16)
ret void
}

LLVM IR (-O2):
%struct.colourSystem = type { i32 }
define void @gamma_correct_rgb(%struct.colourSystem* %0, float* %1, float* %2, float* %3) {
%5 = tail call i32 @gamma_correct(%struct.colourSystem* %0, float* %1)
%6 = tail call i32 @gamma_correct(%struct.colourSystem* %0, float* %2)
%7 = tail call i32 @gamma_correct(%struct.colourSystem* %0, float* %3)
ret void
}
long UARTCharGetNonBlocking(unsigned long ulBase) {
  ;
  if (!((*((volatile unsigned long *)(ulBase + 0x00000018))) & 0x00000010)) {
    return ((*((volatile unsigned long *)(ulBase + 0x00000000))));
  } else {
    return (-1);
  }
}


x86 assembly (clang, -O0):
<UARTCharGetNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
and    $0x10,%rax
cmp    $0x0,%rax
jne    112e <UARTCharGetNonBlocking+0x2e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1136 <UARTCharGetNonBlocking+0x36>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTCharGetNonBlocking>:
mov    $0xffffffffffffffff,%rax
testq  $0x10,0x18(%rdi)
jne    1114 <UARTCharGetNonBlocking+0x14>
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @UARTCharGetNonBlocking(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = add i64 %4, 24
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 16
%9 = icmp ne i64 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %1
%11 = load i64, i64* %3
%12 = add i64 %11, 0
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
store i64 %14, i64* %2
br label %16
15: ; preds = %1
store i64 -1, i64* %2
br label %16
16: ; preds = %15, %10
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
define i64 @UARTCharGetNonBlocking(i64 %0) {
%2 = add i64 %0, 24
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 16
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = inttoptr i64 %0 to i64*
%9 = load volatile i64, i64* %8
br label %10
10: ; preds = %1, %7
%11 = phi i64 [ %9, %7 ], [ -1, %1 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: jsoncc [options] input-file\n\nOptions:\n    -H, --header     "
         "             Generate header.\n    -h, --help                    Get "
         "help.\n    -n, --name=NAME               Struct name (default is "
         "file name).\n    -s, --source                  Generate source.\n    "
         "-t, --template-path=PATH      Specify path to templates.\n");
}


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

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

LLVM IR (-O0):
@.str = [323 x i8] c"Usage: jsoncc [options] input-file\0A\0AOptions:\0A -H, --header Generate header.\0A -h, --help Get help.\0A -n, --name=NAME Struct name (default is file name).\0A -s, --source Generate source.\0A -t, --template-path=PATH Specify path to templates.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([323 x i8], [323 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [322 x i8] c"Usage: jsoncc [options] input-file\0A\0AOptions:\0A -H, --header Generate header.\0A -h, --help Get help.\0A -n, --name=NAME Struct name (default is file name).\0A -s, --source Generate source.\0A -t, --template-path=PATH Specify path to templates.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([322 x i8], [322 x i8]* @str, i64 0, i64 0))
ret void
}
void rep_nop(void) { __asm__ __volatile__("rep; nop"); }


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

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

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

LLVM IR (-O2):
define void @rep_nop() {
tail call void asm sideeffect "rep; nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int SSL_connect(int /*<<< orphan*/ *);
scalar_t__ waitforit(int /*<<< orphan*/ *);
int do_connect(SSL *ssl) {
  int ret;
again:
  ret = SSL_connect(ssl);
  if (ret < 0) {
    if (waitforit(ssl)) {
      goto again;
    } else {
      return -1;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<do_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <SSL_connect@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1166 <do_connect+0x46>
mov    -0x10(%rbp),%rdi
call   1030 <waitforit@plt>
cmp    $0x0,%rax
je     115a <do_connect+0x3a>
jmp    112c <do_connect+0xc>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <do_connect+0x4c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_connect>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <SSL_connect@plt>
test   %eax,%eax
jns    114e <do_connect+0x2e>
mov    %rbx,%rdi
call   1030 <waitforit@plt>
test   %rax,%rax
jne    1130 <do_connect+0x10>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @do_connect(i32* %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i32 @SSL_connect(i32* %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i64 @waitforit(i32* %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %2
8: ; preds = %2, %5
%9 = phi i32 [ -1, %5 ], [ %3, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void show_usage(const char *name) {
  const char *p = "";
  if (NULL != p) {
    p = name;
  }
  printf("%s -l : to lock\n", p);
  printf("%s -u : to unlock\n", p);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeed(%rip),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     113b <show_usage+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [17 x i8] c"%s -l : to lock\0A\00"
@.str.2 = [19 x i8] c"%s -u : to unlock\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* null, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** %2
store i8* %7, i8** %3
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"%s -l : to lock\0A\00"
@.str.2 = [19 x i8] c"%s -u : to unlock\0A\00"
define void @show_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
unsigned xrop3_15_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = ~T;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_15_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
void _Unwind_Complete() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_Complete() {
ret void
}
int adis16060_probe_trigger(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16060_probe_trigger(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _cause(int);
void _cause_ibe() { _cause(3); }


x86 assembly (clang, -O0):
<_cause_ibe>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <_cause@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cause_ibe>:
mov    $0x3,%edi
jmp    1030 <_cause@plt>

LLVM IR (-O0):
define void @_cause_ibe() {
%1 = call i32 @_cause(i32 3)
ret void
}

LLVM IR (-O2):
define void @_cause_ibe() {
%1 = tail call i32 @_cause(i32 3)
ret void
}
int e_pal(char *str, int start, int end) {
  if (start >= end)
    return 1;
  if (str[start] == str[end])
    return e_pal(str, start + 1, end - 1);
  return 0;
}


x86 assembly (clang, -O0):
<e_pal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     113a <e_pal+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    117e <e_pal+0x6e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1177 <e_pal+0x67>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
call   1030 <e_pal@plt>
mov    %eax,-0x4(%rbp)
jmp    117e <e_pal+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_pal>:
mov    $0x1,%eax
cmp    %edx,%esi
jge    113b <e_pal+0x3b>
movslq %edx,%r8
movslq %esi,%rdx
add    $0xffffffffffffffff,%r8
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi,%rdx,1),%ecx
cmp    0x1(%rdi,%r8,1),%cl
jne    113c <e_pal+0x3c>
add    $0x1,%rdx
lea    -0x1(%r8),%rcx
cmp    %r8,%rdx
mov    %rcx,%r8
jl     1120 <e_pal+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @e_pal(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* %7
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 1, i32* %4
br label %34
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i8*, i8** %5
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %18, %24
br i1 %25, label %26, label %33
26: ; preds = %12
%27 = load i8*, i8** %5
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
%30 = load i32, i32* %7
%31 = sub nsw i32 %30, 1
%32 = call i32 @e_pal(i8* %27, i32 %29, i32 %31)
store i32 %32, i32* %4
br label %34
33: ; preds = %12
store i32 0, i32* %4
br label %34
34: ; preds = %33, %26, %11
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @e_pal(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %20
5: ; preds = %3
%6 = sext i32 %2 to i64
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %5, %16
%9 = phi i64 [ %7, %5 ], [ %17, %16 ]
%10 = phi i64 [ %6, %5 ], [ %18, %16 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %9
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
br i1 %15, label %16, label %20
16: ; preds = %8
%17 = add nsw i64 %9, 1
%18 = add nsw i64 %10, -1
%19 = icmp slt i64 %17, %18
br i1 %19, label %8, label %20
20: ; preds = %16, %8, %3
%21 = phi i32 [ 1, %3 ], [ 0, %8 ], [ 1, %16 ]
ret i32 %21
}
/* Variables and functions */
int read(int /*<<< orphan*/, char **, int);
int /*<<< orphan*/ write(int, char **, int);
int main(int argc, char **argv) {
  char buf[10];
  int n;
  while ((n = read(0, &buf, 10)) > 0) {
    write(1, &buf, 10);
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rsi
xor    %edi,%edi
mov    $0xa,%edx
call   1040 <read@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
jle    116a <main+0x4a>
lea    -0x1a(%rbp),%rsi
mov    $0x1,%edi
mov    $0xa,%edx
call   1030 <write@plt>
jmp    1136 <main+0x16>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x6(%rsp),%rsi
xor    %edi,%edi
mov    $0xa,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1165 <main+0x45>
lea    0x6(%rsp),%rbx
nop
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1030 <write@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1140 <main+0x20>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %8
8: ; preds = %12, %2
%9 = bitcast [10 x i8]* %6 to i8**
%10 = call i32 @read(i32 0, i8** %9, i32 10)
store i32 %10, i32* %7
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = bitcast [10 x i8]* %6 to i8**
%14 = call i32 @write(i32 1, i8** %13, i32 10)
br label %8
15: ; preds = %8
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = bitcast [10 x i8]* %3 to i8**
%6 = call i32 @read(i32 0, i8** %5, i32 10)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2, %8
%9 = call i32 @write(i32 1, i8** %5, i32 10)
%10 = call i32 @read(i32 0, i8** %5, i32 10)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %8, label %12
12: ; preds = %8, %2
ret i32 1
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long mstime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_usec / 1000 + tv.tv_sec * 1000;
}


x86 assembly (clang, -O0):
<mstime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0x3e8,-0x4(%rbp),%ecx
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
movslq 0x4(%rsp),%rcx
imul   $0x3e8,%rcx,%rcx
cltq
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @mstime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = sdiv i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = add nsw i32 %5, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @mstime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 1000
%10 = add nsw i32 %9, %6
%11 = sext i32 %10 to i64
ret i64 %11
}
/* Type definitions */
struct char_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_to_char(char *, struct char_data *);
void do_shutdow(struct char_data *ch, char *argument, int cmd) {
  send_to_char("If you want to shut something down - say so!\n\r", ch);
}


x86 assembly (clang, -O0):
<do_shutdow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <send_to_char@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_shutdow>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <send_to_char@plt>

LLVM IR (-O0):
%struct.char_data = type { i32 }
@.str = [47 x i8] c"If you want to shut something down - say so!\0A\0D\00"
define void @do_shutdow(%struct.char_data* %0, i8* %1, i32 %2) {
%4 = alloca %struct.char_data*
%5 = alloca i8*
%6 = alloca i32
store %struct.char_data* %0, %struct.char_data** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.char_data*, %struct.char_data** %4
%8 = call i32 @send_to_char(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), %struct.char_data* %7)
ret void
}

LLVM IR (-O2):
%struct.char_data = type { i32 }
@.str = [47 x i8] c"If you want to shut something down - say so!\0A\0D\00"
define void @do_shutdow(%struct.char_data* %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @send_to_char(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), %struct.char_data* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void s337_set_data_type(uint8_t *p_s337, uint8_t i_data_type) {
  p_s337[5] &= ~0x1f;
  p_s337[5] |= i_data_type & 0x1f;
}


x86 assembly (clang, -O0):
<s337_set_data_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
and    $0xffffffe0,%ecx
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    -0x8(%rbp),%rax
or     0x14(%rax),%ecx
mov    %ecx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<s337_set_data_type>:
mov    0x14(%rdi),%eax
and    $0xffffffe0,%eax
and    $0x1f,%esi
or     %eax,%esi
mov    %esi,0x14(%rdi)
ret

LLVM IR (-O0):
define void @s337_set_data_type(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 = getelementptr inbounds i32, i32* %5, i64 5
%7 = load i32, i32* %6
%8 = and i32 %7, -32
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 31
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 5
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @s337_set_data_type(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 5
%4 = load i32, i32* %3
%5 = and i32 %4, -32
%6 = and i32 %1, 31
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
void SetSysClock(void) {}


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

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

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

LLVM IR (-O2):
define void @SetSysClock() {
ret void
}
/* Variables and functions */
unsigned long long pack754(double, int, int);
int /*<<< orphan*/ packi64(unsigned char *, unsigned long long);
extern void serialize_float64(unsigned char *buf, double f) {
  unsigned long long int fhold = (pack754((f), 64, 11));
  packi64(buf, fhold);
}


x86 assembly (clang, -O0):
<serialize_float64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x40,%edi
mov    $0xb,%esi
call   1040 <pack754@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <packi64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize_float64>:
push   %rbx
mov    %rdi,%rbx
mov    $0x40,%edi
mov    $0xb,%esi
call   1040 <pack754@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <packi64@plt>

LLVM IR (-O0):
define void @serialize_float64(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca i64
store i8* %0, i8** %3
store double %1, double* %4
%6 = load double, double* %4
%7 = call i64 @pack754(double %6, i32 64, i32 11)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = call i32 @packi64(i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @serialize_float64(i8* %0, double %1) {
%3 = tail call i64 @pack754(double %1, i32 64, i32 11)
%4 = tail call i32 @packi64(i8* %0, i64 %3)
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct fileinfo_list {
  int dummy;
};
struct fileinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert(struct genlist *, struct fileinfo *, int);
void fileinfo_list_insert(struct fileinfo_list *tthis, struct fileinfo *pfoo,
                          int idx) {
  genlist_insert((struct genlist *)tthis, pfoo, idx);
}


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

x86 assembly (clang, -O2):
<fileinfo_list_insert>:
jmp    1030 <genlist_insert@plt>

LLVM IR (-O0):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.genlist = type { i32 }
define void @fileinfo_list_insert(%struct.fileinfo_list* %0, %struct.fileinfo* %1, i32 %2) {
%4 = alloca %struct.fileinfo_list*
%5 = alloca %struct.fileinfo*
%6 = alloca i32
store %struct.fileinfo_list* %0, %struct.fileinfo_list** %4
store %struct.fileinfo* %1, %struct.fileinfo** %5
store i32 %2, i32* %6
%7 = load %struct.fileinfo_list*, %struct.fileinfo_list** %4
%8 = bitcast %struct.fileinfo_list* %7 to %struct.genlist*
%9 = load %struct.fileinfo*, %struct.fileinfo** %5
%10 = load i32, i32* %6
%11 = call i32 @genlist_insert(%struct.genlist* %8, %struct.fileinfo* %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.genlist = type { i32 }
define void @fileinfo_list_insert(%struct.fileinfo_list* %0, %struct.fileinfo* %1, i32 %2) {
%4 = bitcast %struct.fileinfo_list* %0 to %struct.genlist*
%5 = tail call i32 @genlist_insert(%struct.genlist* %4, %struct.fileinfo* %1, i32 %2)
ret void
}
int test() {
  int f = (int)1.32;
  struct {
    int a, b;
  } * s;
  void *vs = (void *)s;
  if (f != 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1129 <test+0x29>
movl   $0x1,-0x4(%rbp)
jmp    1130 <test+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.anon*
%4 = alloca i8*
store i32 1, i32* %2
%5 = load %struct.anon*, %struct.anon** %3
%6 = bitcast %struct.anon* %5 to i8*
store i8* %6, i8** %4
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 1, i32* %1
br label %11
10: ; preds = %0
store i32 0, i32* %1
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
%struct.anon = type { i32, i32 }
define i32 @test() {
ret i32 0
}
void gtk_expander_get_spacing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_expander_get_spacing() {
ret void
}
/* Variables and functions */
int Config_set_str(char const *, char *);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
int Config_set_int(const char *par_name, unsigned int value) {
  char strval[16];
  sprintf(strval, "0x%04x", value);
  return Config_set_str(par_name, strval);
}


x86 assembly (clang, -O0):
<Config_set_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <Config_set_str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Config_set_int>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xecd(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Config_set_str@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"0x%04x\00"
define i32 @Config_set_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [16 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%11 = call i32 @Config_set_str(i8* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"0x%04x\00"
define i32 @Config_set_int(i8* %0, i32 %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @Config_set_str(i8* %0, i8* %4)
ret i32 %6
}
unsigned long map_rgb(unsigned char r, unsigned char g, unsigned char b) {
  return 0xFF;
}


x86 assembly (clang, -O0):
<map_rgb>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    $0xff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @map_rgb(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
ret i64 255
}
/* Variables and functions */
int _write_sysfs_int(char *, char *, int, int /*<<< orphan*/,
                     int /*<<< orphan*/, int /*<<< orphan*/);
int write_sysfs_int(char *filename, char *basedir, int val) {
  return _write_sysfs_int(filename, basedir, val, 0, 0, 0);
}


x86 assembly (clang, -O0):
<write_sysfs_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <_write_sysfs_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_sysfs_int>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <_write_sysfs_int@plt>

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

LLVM IR (-O2):
define i32 @write_sysfs_int(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_write_sysfs_int(i8* %0, i8* %1, i32 %2, i32 0, i32 0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_array(int, int *);
int /*<<< orphan*/ quicksort(int, int *);
void test_qs() {
  int test[] = {8,  10, 6,  13, 16, 18, 2, 4,  11, 19,
                20, 7,  14, 5,  15, 3,  9, 12, 17, 1};
  print_array(20, test);
  quicksort(20, test);
  print_array(20, test);
}


x86 assembly (clang, -O0):
<test_qs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x50,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rsi
mov    $0x14,%edi
call   1030 <print_array@plt>
lea    -0x50(%rbp),%rsi
mov    $0x14,%edi
call   1040 <quicksort@plt>
lea    -0x50(%rbp),%rsi
mov    $0x14,%edi
call   1030 <print_array@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_qs>:
push   %rbx
sub    $0x50,%rsp
movaps 0xf14(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    $0x14,%edi
mov    %rbx,%rsi
call   1030 <print_array@plt>
mov    $0x14,%edi
mov    %rbx,%rsi
call   1040 <quicksort@plt>
mov    $0x14,%edi
mov    %rbx,%rsi
call   1030 <print_array@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_qs.test = [20 x i32] [i32 8, i32 10, i32 6, i32 13, i32 16, i32 18, i32 2, i32 4, i32 11, i32 19, i32 20, i32 7, i32 14, i32 5, i32 15, i32 3, i32 9, i32 12, i32 17, i32 1]
define void @test_qs() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_array(i32 20, i32* %3)
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%6 = call i32 @quicksort(i32 20, i32* %5)
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%8 = call i32 @print_array(i32 20, i32* %7)
ret void
}

LLVM IR (-O2):
@__const.test_qs.test = [20 x i32] [i32 8, i32 10, i32 6, i32 13, i32 16, i32 18, i32 2, i32 4, i32 11, i32 19, i32 20, i32 7, i32 14, i32 5, i32 15, i32 3, i32 9, i32 12, i32 17, i32 1]
define void @test_qs() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_array(i32 20, i32* %3)
%5 = call i32 @quicksort(i32 20, i32* %3)
%6 = call i32 @print_array(i32 20, i32* %3)
ret void
}
int is_side_no_valid(int side_no) {
  return (side_no >= 0 && side_no <= 9999) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_side_no_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <is_side_no_valid+0x23>
cmpl   $0x270f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_side_no_valid>:
xor    %eax,%eax
cmp    $0x2710,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_side_no_valid(i32 %0) {
%2 = icmp ult i32 %0, 10000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ClearAcFlag_asm();
int /*<<< orphan*/ SetAppFlags_asm(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  ClearAcFlag_asm();
  SetAppFlags_asm(0x40000);
  ClearAcFlag_asm();
  SetAppFlags_asm(0x40000);
  ClearAcFlag_asm();
  printf("SUCCESS\n");
  exit(0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <ClearAcFlag_asm@plt>
mov    $0x40000,%edi
call   1050 <SetAppFlags_asm@plt>
xor    %eax,%eax
call   1040 <ClearAcFlag_asm@plt>
mov    $0x40000,%edi
call   1050 <SetAppFlags_asm@plt>
xor    %eax,%eax
call   1040 <ClearAcFlag_asm@plt>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"SUCCESS\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ClearAcFlag_asm()
%3 = call i32 @SetAppFlags_asm(i32 262144)
%4 = call i32 (...) @ClearAcFlag_asm()
%5 = call i32 @SetAppFlags_asm(i32 262144)
%6 = call i32 (...) @ClearAcFlag_asm()
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"SUCCESS\00"
define i32 @main() {
%1 = tail call i32 (...) @ClearAcFlag_asm()
%2 = tail call i32 @SetAppFlags_asm(i32 262144)
%3 = tail call i32 (...) @ClearAcFlag_asm()
%4 = tail call i32 @SetAppFlags_asm(i32 262144)
%5 = tail call i32 (...) @ClearAcFlag_asm()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_dialog_hide_i(char const *);
void roadmap_trip_dialog_cancel(const char *name, void *data) {
  roadmap_dialog_hide_i(name);
}


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

x86 assembly (clang, -O2):
<roadmap_trip_dialog_cancel>:
jmp    1030 <roadmap_dialog_hide_i@plt>

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

LLVM IR (-O2):
define void @roadmap_trip_dialog_cancel(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @roadmap_dialog_hide_i(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hvl_GenTables();
void hvl_InitReplayer(void) { hvl_GenTables(); }


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

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

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

LLVM IR (-O2):
define void @hvl_InitReplayer() {
%1 = tail call i32 (...) @hvl_GenTables()
ret void
}
/* Variables and functions */
int const isnan(double);
const int wIsnan(double n) { return isnan(n); }


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

x86 assembly (clang, -O2):
<wIsnan>:
jmp    1030 <isnan@plt>

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

LLVM IR (-O2):
define i32 @wIsnan(double %0) {
%2 = tail call i32 @isnan(double %0)
ret i32 %2
}
int test_imm_33int16_reg(short val) {
  return ((val) & (-0x33 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_33int16_reg>:
test   $0xffcd,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_33int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -51
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_33int16_reg(i16 signext %0) {
%2 = and i16 %0, -51
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int dolby_dap_init(int port_id, int channels) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @dolby_dap_init(i32 %0, i32 %1) {
ret i32 0
}