xunge/DecIR huggingface dataset:
double triangle_filter(double t) {
  if (t < 0.0)
    t = -t;
  if (t < 1.0)
    return (1.0 - t);
  return (0.0);
}


x86 assembly (clang, -O0):
<triangle_filter>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1138 <triangle_filter+0x38>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1162 <triangle_filter+0x62>
movsd  0xead(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116a <triangle_filter+0x6a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangle_filter>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movsd  0xee3(%rip),%xmm0
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
cmpltsd %xmm0,%xmm1
andpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @triangle_filter(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
store double %8, double* %3
br label %9
9: ; preds = %6, %1
%10 = load double, double* %3
%11 = fcmp olt double %10, 1.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load double, double* %3
%14 = fsub double 1.000000e+00, %13
store double %14, double* %2
br label %16
15: ; preds = %9
store double 0.000000e+00, double* %2
br label %16
16: ; preds = %15, %12
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @triangle_filter(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
%5 = fcmp olt double %4, 1.000000e+00
%6 = fsub double 1.000000e+00, %4
%7 = select i1 %5, double %6, double 0.000000e+00
ret double %7
}
A0RX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((*((int *)10000000)) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x989680,%eax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     113c <A0RX1+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <A0RX1+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0RX1>:
mov    0x989680,%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,4),%edx
setle  %al
ret

LLVM IR (-O0):
define i32 @A0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 10000000 to i32*)
%15 = load i32*, i32** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = icmp sle i32 %14, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @A0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = load i32, i32* inttoptr (i64 10000000 to i32*)
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = icmp sle i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ set2clear(int, int, int);
void rtc_clear_int_pending(void) { set2clear((0xE2800000 + 0x30), 0x1, 1); }


x86 assembly (clang, -O0):
<rtc_clear_int_pending>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe2800030,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <set2clear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtc_clear_int_pending>:
mov    $0xe2800030,%edi
mov    $0x1,%esi
mov    $0x1,%edx
jmp    1030 <set2clear@plt>

LLVM IR (-O0):
define void @rtc_clear_int_pending() {
%1 = call i32 @set2clear(i32 -494927824, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @rtc_clear_int_pending() {
%1 = tail call i32 @set2clear(i32 -494927824, i32 1, i32 1)
ret void
}
/* Type definitions */
struct gusto_sim {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gusto_mesh_clear(struct gusto_sim *, char);
void gusto_free(struct gusto_sim *sim) { gusto_mesh_clear(sim, 'a'); }


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

x86 assembly (clang, -O2):
<gusto_free>:
mov    $0x61,%esi
jmp    1030 <gusto_mesh_clear@plt>

LLVM IR (-O0):
%struct.gusto_sim = type { i32 }
define void @gusto_free(%struct.gusto_sim* %0) {
%2 = alloca %struct.gusto_sim*
store %struct.gusto_sim* %0, %struct.gusto_sim** %2
%3 = load %struct.gusto_sim*, %struct.gusto_sim** %2
%4 = call i32 @gusto_mesh_clear(%struct.gusto_sim* %3, i8 signext 97)
ret void
}

LLVM IR (-O2):
%struct.gusto_sim = type { i32 }
define void @gusto_free(%struct.gusto_sim* %0) {
%2 = tail call i32 @gusto_mesh_clear(%struct.gusto_sim* %0, i8 signext 97)
ret void
}
/* Variables and functions */
scalar_t__ fminl(long double, long double);
void foo(long double xl) {
  do {
    if ((long)fminl(xl, xl) != (long)xl)
      return;
  } while (0);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fld    %st(0)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <fminl@plt>
fldt   -0x10(%rbp)
fnstcw -0x1a(%rbp)
movzwl -0x1a(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x1c(%rbp)
fldcw  -0x1c(%rbp)
fistpll -0x18(%rbp)
fldcw  -0x1a(%rbp)
mov    -0x18(%rbp),%rcx
cmp    %rcx,%rax
je     115f <foo+0x4f>
jmp    1164 <foo+0x54>
jmp    1164 <foo+0x54>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <fminl@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @foo(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
br label %3
3: ; preds = %1
%4 = load x86_fp80, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @fminl(x86_fp80 %4, x86_fp80 %5)
%7 = load x86_fp80, x86_fp80* %2
%8 = fptosi x86_fp80 %7 to i64
%9 = icmp ne i64 %6, %8
br i1 %9, label %10, label %11
10: ; preds = %3
br label %12
11: ; preds = %3
br label %12
12: ; preds = %10, %11
ret void
}

LLVM IR (-O2):
define void @foo(x86_fp80 %0) {
%2 = tail call i64 @fminl(x86_fp80 %0, x86_fp80 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SubjectModel_getSubjectRange(char *);
int /*<<< orphan*/ SubjectModel_modifySubject(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
void Controller_updateSubjectCriteria(char subjectName[],
                                      char subjectCriteria[]) {
  char subjectRange[256];
  strcpy(subjectRange, SubjectModel_getSubjectRange(subjectName));
  SubjectModel_modifySubject(subjectName, subjectCriteria, subjectRange);
  return;
}


x86 assembly (clang, -O0):
<Controller_updateSubjectCriteria>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SubjectModel_getSubjectRange@plt>
mov    -0x118(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x110(%rbp),%rdx
call   1050 <SubjectModel_modifySubject@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Controller_updateSubjectCriteria>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <SubjectModel_getSubjectRange@plt>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <SubjectModel_modifySubject@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Controller_updateSubjectCriteria(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @SubjectModel_getSubjectRange(i8* %7)
%9 = call i32 @strcpy(i8* %6, i32 %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%13 = call i32 @SubjectModel_modifySubject(i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @Controller_updateSubjectCriteria(i8* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @SubjectModel_getSubjectRange(i8* %0)
%6 = call i32 @strcpy(i8* %4, i32 %5)
%7 = call i32 @SubjectModel_modifySubject(i8* %0, i8* %1, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xeb() {
  Assert_real((isalnum(235) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1180, ("isalnum should be 0 for 0xeb"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xeb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xeb,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x49c,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xeb>:
push   %rax
mov    $0xeb,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x49c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xeb\00"
define void @t_isalnum_0xeb() {
%1 = call i64 @isalnum(i32 235)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xeb\00"
define void @t_isalnum_0xeb() {
%1 = tail call i64 @isalnum(i32 235)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *xstrdup(char const *);
char *oauth_sign_plaintext(const char *m, const char *k) { return xstrdup(k); }


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

x86 assembly (clang, -O2):
<oauth_sign_plaintext>:
mov    %rsi,%rdi
jmp    1030 <xstrdup@plt>

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

LLVM IR (-O2):
define i8* @oauth_sign_plaintext(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i8* @xstrdup(i8* %1)
ret i8* %3
}
void TimerITRxExternalClockConfigure(unsigned long ulBase,
                                     unsigned long ulInputTriggerSource) {

  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) |= ulInputTriggerSource;
}


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

x86 assembly (clang, -O2):
<TimerITRxExternalClockConfigure>:
or     %rsi,0x8(%rdi)
ret

LLVM IR (-O0):
define void @TimerITRxExternalClockConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 8
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @TimerITRxExternalClockConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 8
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = or i64 %5, %1
store volatile i64 %6, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char const *, int /*<<< orphan*/);
void wild_open(void) {
  int fd;
  fd = open((const char *)0x4, O_RDONLY);
  close(fd);
}


x86 assembly (clang, -O0):
<wild_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edi
call   1040 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wild_open>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edi
call   1040 <open@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <close@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define void @wild_open() {
%1 = alloca i32
%2 = load i32, i32* @O_RDONLY
%3 = call i32 @open(i8* inttoptr (i64 4 to i8*), i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @close(i32 %4)
ret void
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define void @wild_open() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* inttoptr (i64 4 to i8*), i32 %1)
%3 = tail call i32 @close(i32 %2)
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t n = 0;
  while (*s != '\0') {
    s++;
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113d <strlen+0x3d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
Vset(a, b) double a[3], b[3];
{
  a[0] = b[0];
  a[1] = b[1];
  a[2] = b[2];
}


x86 assembly (clang, -O0):
<Vset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vset>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define i32 @Vset(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
store double %3, double* %0
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 1
store double %5, double* %6
%7 = getelementptr inbounds double, double* %1, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 2
store double %8, double* %9
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int pipe(int filedes[2] __attribute__((unused))) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<pipe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @pipe(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @pipe(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double my_sum(double a, double b) {
  printf("Called C function with %f and %f.\n", a, b);
  return a + b;
}


x86 assembly (clang, -O0):
<my_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_sum>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Called C function with %f and %f.\0A\00"
define double @my_sum(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fadd double %8, %9
ret double %10
}

LLVM IR (-O2):
@.str = [35 x i8] c"Called C function with %f and %f.\0A\00"
define double @my_sum(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), double %0, double %1)
%4 = fadd double %0, %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int oerbla_(char *srname, int *info) {
  printf("** On entry to %6s, parameter number %2i had an illegal value\n",
         srname, *info);
  return 0;
}


x86 assembly (clang, -O0):
<oerbla_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [63 x i8] c"** On entry to %6s, parameter number %2i had an illegal value\0A\00"
define i32 @oerbla_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [63 x i8] c"** On entry to %6s, parameter number %2i had an illegal value\0A\00"
define i32 @oerbla_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int);
main() {
  if (foo(3) != 12)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1040 <foo@plt>
cmp    $0xc,%eax
je     1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1040 <foo@plt>
cmp    $0xc,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 3)
%2 = icmp eq i32 %1, 12
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
double EvalAngDist_alpha0_1minus_0plus_15097_L1(double);
double funcAngDist_alpha0_1minus_0plus_15097_L1(double *x, double *par) {
  double result;
  result = par[0] * EvalAngDist_alpha0_1minus_0plus_15097_L1(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngDist_alpha0_1minus_0plus_15097_L1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngDist_alpha0_1minus_0plus_15097_L1@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngDist_alpha0_1minus_0plus_15097_L1>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngDist_alpha0_1minus_0plus_15097_L1@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngDist_alpha0_1minus_0plus_15097_L1(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngDist_alpha0_1minus_0plus_15097_L1(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngDist_alpha0_1minus_0plus_15097_L1(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngDist_alpha0_1minus_0plus_15097_L1(double %4)
%6 = fmul double %3, %5
ret double %6
}
int check_and_install_modules_linux() { return 1; }


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

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

LLVM IR (-O0):
define i32 @check_and_install_modules_linux() {
ret i32 1
}

LLVM IR (-O2):
define i32 @check_and_install_modules_linux() {
ret i32 1
}
/* Variables and functions */
scalar_t__ VIM_HIF_GetReg8(int);
int /*<<< orphan*/ VIM_HIF_SetReg8(int, int /*<<< orphan*/);
unsigned long VIM_MARB_GetJbufChipPointer(void) {
  unsigned long Temp = 0;
  VIM_HIF_SetReg8((0x2400 + 0x060), 0);
  Temp = (unsigned long)VIM_HIF_GetReg8((0x2400 + 0x062));
  Temp |= (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x061))) << 8;
  Temp |= (unsigned long)(VIM_HIF_GetReg8((0x2400 + 0x060))) << 16;
  return Temp;
}


x86 assembly (clang, -O0):
<VIM_MARB_GetJbufChipPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x2460,%edi
xor    %esi,%esi
call   1030 <VIM_HIF_SetReg8@plt>
mov    $0x2462,%edi
call   1040 <VIM_HIF_GetReg8@plt>
mov    %rax,-0x8(%rbp)
mov    $0x2461,%edi
call   1040 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x2460,%edi
call   1040 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_GetJbufChipPointer>:
push   %r14
push   %rbx
push   %rax
mov    $0x2460,%edi
xor    %esi,%esi
call   1030 <VIM_HIF_SetReg8@plt>
mov    $0x2462,%edi
call   1040 <VIM_HIF_GetReg8@plt>
mov    %rax,%r14
mov    $0x2461,%edi
call   1040 <VIM_HIF_GetReg8@plt>
mov    %rax,%rbx
shl    $0x8,%rbx
or     %r14,%rbx
mov    $0x2460,%edi
call   1040 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @VIM_MARB_GetJbufChipPointer() {
%1 = alloca i64
store i64 0, i64* %1
%2 = call i32 @VIM_HIF_SetReg8(i32 9312, i32 0)
%3 = call i64 @VIM_HIF_GetReg8(i32 9314)
store i64 %3, i64* %1
%4 = call i64 @VIM_HIF_GetReg8(i32 9313)
%5 = shl i64 %4, 8
%6 = load i64, i64* %1
%7 = or i64 %6, %5
store i64 %7, i64* %1
%8 = call i64 @VIM_HIF_GetReg8(i32 9312)
%9 = shl i64 %8, 16
%10 = load i64, i64* %1
%11 = or i64 %10, %9
store i64 %11, i64* %1
%12 = load i64, i64* %1
ret i64 %12
}

LLVM IR (-O2):
define i64 @VIM_MARB_GetJbufChipPointer() {
%1 = tail call i32 @VIM_HIF_SetReg8(i32 9312, i32 0)
%2 = tail call i64 @VIM_HIF_GetReg8(i32 9314)
%3 = tail call i64 @VIM_HIF_GetReg8(i32 9313)
%4 = shl i64 %3, 8
%5 = or i64 %4, %2
%6 = tail call i64 @VIM_HIF_GetReg8(i32 9312)
%7 = shl i64 %6, 16
%8 = or i64 %5, %7
ret i64 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
FILE *fileopen(char file_name[20]) {
  FILE *f = fopen(file_name, "r");
  if (f == NULL) {
    perror("\nOpening file error!\n");
    exit(1);
  }
  return f;
}


x86 assembly (clang, -O0):
<fileopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <fileopen+0x41>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileopen>:
push   %rax
lea    0xec8(%rip),%rsi
call   1030 <fopen@plt>
test   %rax,%rax
je     1144 <fileopen+0x14>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [22 x i8] c"\0AOpening file error!\0A\00"
define i32* @fileopen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [22 x i8] c"\0AOpening file error!\0A\00"
define noalias i32* @fileopen(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i32* %2
}
void ex1(void) { asm("movl $0xffff, %eax\n"); }


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

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

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

LLVM IR (-O2):
define void @ex1() {
tail call void asm sideeffect "movl $$0xffff, %eax\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned xrop3_189_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ D;
  stk2 = T ^ D;
  stk1 = stk1 & stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_189_0_0>:
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    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xrop3_189_0_0(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 = xor i32 %4, 255
%8 = xor i32 %6, 255
%9 = and i32 %8, %7
%10 = xor i32 %9, -1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_Test(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


x86 assembly (clang, -O0):
<SensorGetReg_Test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorGetReg_Test>:
jmp    1030 <VIM_SIF_I2cReadByte@plt>

LLVM IR (-O0):
define void @SensorGetReg_Test(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_Test(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
int ldap_int_unhex(int c) {
  return (c >= '0' && c <= '9'   ? c - '0'
          : c >= 'A' && c <= 'F' ? c - 'A' + 10
                                 : c - 'a' + 10);
}


x86 assembly (clang, -O0):
<ldap_int_unhex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1129 <ldap_int_unhex+0x29>
cmpl   $0x39,-0x4(%rbp)
jg     1129 <ldap_int_unhex+0x29>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1160 <ldap_int_unhex+0x60>
cmpl   $0x41,-0x4(%rbp)
jl     114e <ldap_int_unhex+0x4e>
cmpl   $0x46,-0x4(%rbp)
jg     114e <ldap_int_unhex+0x4e>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    115a <ldap_int_unhex+0x5a>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldap_int_unhex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     111a <ldap_int_unhex+0x1a>
lea    -0x41(%rdi),%eax
cmp    $0x5,%eax
ja     1115 <ldap_int_unhex+0x15>
add    $0xffffffc9,%edi
jmp    1118 <ldap_int_unhex+0x18>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @ldap_int_unhex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 48
br label %27
11: ; preds = %5, %1
%12 = load i32, i32* %2
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 70
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 65
%20 = add nsw i32 %19, 10
br label %25
21: ; preds = %14, %11
%22 = load i32, i32* %2
%23 = sub nsw i32 %22, 97
%24 = add nsw i32 %23, 10
br label %25
25: ; preds = %21, %17
%26 = phi i32 [ %20, %17 ], [ %24, %21 ]
br label %27
27: ; preds = %25, %8
%28 = phi i32 [ %10, %8 ], [ %26, %25 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @ldap_int_unhex(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = add i32 %0, -65
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -55
br label %11
9: ; preds = %4
%10 = add nsw i32 %0, -87
br label %11
11: ; preds = %1, %7, %9
%12 = phi i32 [ %8, %7 ], [ %10, %9 ], [ %2, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ f5a(int);
void f5(int x) { f5a(x); }


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

x86 assembly (clang, -O2):
<f5>:
jmp    1030 <f5a@plt>

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

LLVM IR (-O2):
define void @f5(i32 %0) {
%2 = tail call i32 @f5a(i32 %0)
ret void
}
unsigned long long dynref__nlinks(const struct dynref__obj *p) {}


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

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

LLVM IR (-O0):
%struct.dynref__obj = type opaque
define i64 @dynref__nlinks(%struct.dynref__obj* %0) {
%2 = alloca i64
%3 = alloca %struct.dynref__obj*
store %struct.dynref__obj* %0, %struct.dynref__obj** %3
%4 = load i64, i64* %2
ret i64 %4
}

LLVM IR (-O2):
%struct.dynref__obj = type opaque
define i64 @dynref__nlinks(%struct.dynref__obj* nocapture readnone %0) {
ret i64 undef
}
int main() {
  int b;
  int a = b, c;
  int y = (y, 0);
  int x = ((y = 3), y - 2);
  int z = ((y ? 2 : 3), 4);
  int u_ = ((y = 2) ? 3 : 0);
  int v = (y = (2 ? 3 : 0));
  int s = (2 ? 3 : (y = x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
movl   $0x2,-0x10(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x3,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = load i32, i32* %1
store i32 %10, i32* %2
%11 = load i32, i32* %4
store i32 0, i32* %4
store i32 3, i32* %4
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 2
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 2, i32 3
store i32 4, i32* %6
store i32 2, i32* %4
store i32 3, i32* %7
store i32 3, i32* %4
store i32 3, i32* %8
store i32 3, i32* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void p(void *d) { printf("--> %s\n", (char *)d); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"--> %s\0A\00"
define void @p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"--> %s\0A\00"
define void @p(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int FUTEX_PRIVATE_FLAG;
int FUTEX_WAIT;
int errno;
scalar_t__ futex(int *, int, int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/);
int futex_wait(int *address, int val) {
  return futex(address, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, val, NULL, NULL, 0)
             ? errno
             : 0;
}


x86 assembly (clang, -O0):
<futex_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
mov    0x2ea5(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
mov    %r8,%rcx
call   1030 <futex@plt>
cmp    $0x0,%rax
je     1163 <futex_wait+0x53>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    116d <futex_wait+0x5d>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    116d <futex_wait+0x5d>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futex_wait>:
push   %rbx
mov    %esi,%edx
mov    0x2ece(%rip),%rax
mov    0x2eb7(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
xor    %ebx,%ebx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <futex@plt>
test   %rax,%rax
je     1142 <futex_wait+0x32>
mov    0x2e90(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@FUTEX_WAIT = global i32 0
@FUTEX_PRIVATE_FLAG = global i32 0
@errno = global i32 0
define i32 @futex_wait(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* @FUTEX_WAIT
%7 = load i32, i32* @FUTEX_PRIVATE_FLAG
%8 = or i32 %6, %7
%9 = load i32, i32* %4
%10 = call i64 @futex(i32* %5, i32 %8, i32 %9, i32* null, i32* null, i32 0)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* @errno
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 0, %14 ]
ret i32 %16
}

LLVM IR (-O2):
@FUTEX_WAIT = global i32 0
@FUTEX_PRIVATE_FLAG = global i32 0
@errno = global i32 0
define i32 @futex_wait(i32* %0, i32 %1) {
%3 = load i32, i32* @FUTEX_WAIT
%4 = load i32, i32* @FUTEX_PRIVATE_FLAG
%5 = or i32 %4, %3
%6 = tail call i64 @futex(i32* %0, i32 %5, i32 %1, i32* null, i32* null, i32 0)
%7 = icmp eq i64 %6, 0
%8 = load i32, i32* @errno
%9 = select i1 %7, i32 0, i32 %8
ret i32 %9
}
float parseToFloatCelsius(float fahr) { return (fahr - 32.0) * 5.0 / 9.0; }


x86 assembly (clang, -O0):
<parseToFloatCelsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef6(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseToFloatCelsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @parseToFloatCelsius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double %5, 5.000000e+00
%7 = fdiv double %6, 9.000000e+00
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
define float @parseToFloatCelsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 5.000000e+00
%5 = fdiv double %4, 9.000000e+00
%6 = fptrunc double %5 to float
ret float %6
}
/* Variables and functions */
double tensor_dot(double const *, double const *, unsigned int);
double tensor_ig1(double g[1], const double *wtr, unsigned int nr,
                  const double *u) {
  g[0] = tensor_dot(wtr + nr, u, nr);
  return tensor_dot(wtr, u, nr);
}


x86 assembly (clang, -O0):
<tensor_ig1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <tensor_dot@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <tensor_dot@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tensor_ig1>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %edx,%eax
lea    (%rsi,%rax,8),%rdi
mov    %rcx,%rsi
call   1030 <tensor_dot@plt>
movsd  %xmm0,(%r15)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <tensor_dot@plt>

LLVM IR (-O0):
define double @tensor_ig1(double* %0, double* %1, i32 %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store double* %3, double** %8
%9 = load double*, double** %6
%10 = load i32, i32* %7
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds double, double* %9, i64 %11
%13 = load double*, double** %8
%14 = load i32, i32* %7
%15 = call double @tensor_dot(double* %12, double* %13, i32 %14)
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 0
store double %15, double* %17
%18 = load double*, double** %6
%19 = load double*, double** %8
%20 = load i32, i32* %7
%21 = call double @tensor_dot(double* %18, double* %19, i32 %20)
ret double %21
}

LLVM IR (-O2):
define double @tensor_ig1(double* nocapture writeonly %0, double* %1, i32 %2, double* %3) {
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds double, double* %1, i64 %5
%7 = tail call double @tensor_dot(double* %6, double* %3, i32 %2)
store double %7, double* %0
%8 = tail call double @tensor_dot(double* %1, double* %3, i32 %2)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int *retPtr();
int *retPtrMightAlias(int *);
int cmpHeapAllocationToUnknown() {
  int zero = 0;
  int *yBefore = retPtr();
  int *m = malloc(8);
  int *yAfter = retPtrMightAlias(m);
  clang_analyzer_eval(yBefore == m);
  clang_analyzer_eval(yAfter == m);
  free(m);
  return 0;
}


x86 assembly (clang, -O0):
<cmpHeapAllocationToUnknown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <retPtr@plt>
mov    %rax,-0x10(%rbp)
mov    $0x8,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <retPtrMightAlias@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <clang_analyzer_eval@plt>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <clang_analyzer_eval@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpHeapAllocationToUnknown>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <retPtr@plt>
mov    %rax,%r14
mov    $0x8,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <retPtrMightAlias@plt>
mov    %rax,%r15
xor    %edi,%edi
cmp    %rbx,%r14
sete   %dil
call   1070 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    %rbx,%r15
sete   %dil
call   1070 <clang_analyzer_eval@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @cmpHeapAllocationToUnknown() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
%5 = call i32* (...) @retPtr()
store i32* %5, i32** %2
%6 = call i32* @malloc(i32 8)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32* @retPtrMightAlias(i32* %7)
store i32* %8, i32** %4
%9 = load i32*, i32** %2
%10 = load i32*, i32** %3
%11 = icmp eq i32* %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @clang_analyzer_eval(i32 %12)
%14 = load i32*, i32** %4
%15 = load i32*, i32** %3
%16 = icmp eq i32* %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @clang_analyzer_eval(i32 %17)
%19 = load i32*, i32** %3
%20 = call i32 @free(i32* %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @cmpHeapAllocationToUnknown() {
%1 = tail call i32* (...) @retPtr()
%2 = tail call i32* @malloc(i32 8)
%3 = tail call i32* @retPtrMightAlias(i32* %2)
%4 = icmp eq i32* %1, %2
%5 = zext i1 %4 to i32
%6 = tail call i32 @clang_analyzer_eval(i32 %5)
%7 = icmp eq i32* %3, %2
%8 = zext i1 %7 to i32
%9 = tail call i32 @clang_analyzer_eval(i32 %8)
%10 = tail call i32 @free(i32* %2)
ret i32 0
}