xunge/DecIR huggingface dataset:
void clear() {
  for (unsigned char i = 0; i < 8; i++)
    clear(i);
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jge    1141 <clear+0x31>
movzbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <clear@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    111c <clear+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @clear() {
%1 = alloca i8
store i8 0, i8* %1
br label %2
2: ; preds = %9, %0
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 8
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i8, i8* %1
%8 = zext i8 %7 to i32
br label %9
9: ; preds = %6
%10 = load i8, i8* %1
%11 = add i8 %10, 1
store i8 %11, i8* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @clear() {
tail call void @clear()
ret void
}
int getpat(arg, pat)
char *arg;
char *pat;
{
  int makeres;
  makeres = makepat(arg, 0, '\0', pat);
  return (makeres > 0);
}


x86 assembly (clang, -O0):
<getpat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <makepat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpat>:
push   %rax
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <makepat@plt>
xor    %ecx,%ecx
test   %eax,%eax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getpat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i32, i32, i8*, ...) bitcast (i32 (...)* @makepat to i32 (i8*, i32, i32, i8*, ...)*)(i8* %6, i32 0, i32 0, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @getpat(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i32, i32, i8*, ...) bitcast (i32 (...)* @makepat to i32 (i8*, i32, i32, i8*, ...)*)(i8* %0, i32 0, i32 0, i8* %1)
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main() {
  struct timeval t;
  while (1) {
    gettimeofday(&t, NULL);
    printf("%ld.%ld\n", t.tv_sec, t.tv_usec);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r14
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [9 x i8] c"%ld.%ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
%10 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [9 x i8] c"%ld.%ld\0A\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
br label %5
5: ; preds = %5, %0
%6 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = tail call i32 @sleep(i32 1)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ __mf_set_options(char *);
struct boo *malloc(int);
int main() {
  struct boo {
    int a;
  };
  int c;
  struct boo *b = malloc(sizeof(struct boo));
  __mf_set_options("-check-initialization");
  c = b->a;
  (void)malloc(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xebc(%rip),%rdi
call   1040 <__mf_set_options@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <malloc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdi
call   1040 <__mf_set_options@plt>
mov    (%rbx),%edi
call   1030 <malloc@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.boo = type { i32 }
%struct.boo.0 = type opaque
@.str = [22 x i8] c"-check-initialization\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.boo*
store i32 0, i32* %1
%4 = call %struct.boo.0* @malloc(i32 4)
%5 = bitcast %struct.boo.0* %4 to %struct.boo*
store %struct.boo* %5, %struct.boo** %3
%6 = call i32 @__mf_set_options(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = load %struct.boo*, %struct.boo** %3
%8 = getelementptr inbounds %struct.boo, %struct.boo* %7, i32 0, i32 0
%9 = load i32, i32* %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call %struct.boo.0* @malloc(i32 %10)
ret i32 0
}

LLVM IR (-O2):
%struct.boo.0 = type opaque
@.str = [22 x i8] c"-check-initialization\00"
define i32 @main() {
%1 = tail call %struct.boo.0* @malloc(i32 4)
%2 = tail call i32 @__mf_set_options(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = bitcast %struct.boo.0* %1 to i32*
%4 = load i32, i32* %3
%5 = tail call %struct.boo.0* @malloc(i32 %4)
ret i32 0
}
unsigned int lshiftu(unsigned int val, unsigned int cnt) {
  if (cnt >= sizeof(unsigned int) * 8 || val > ((0x7fffffff * 2U) >> cnt))
    return val;
  return val << cnt;
}


x86 assembly (clang, -O0):
<lshiftu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x20,%rax
jae    112e <lshiftu+0x2e>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xfffffffe,%edx
shr    %cl,%edx
mov    %edx,%ecx
cmp    %ecx,%eax
jbe    1139 <lshiftu+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <lshiftu+0x44>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lshiftu>:
mov    %esi,%ecx
mov    %edi,%eax
mov    $0xfffffffe,%edx
shr    %cl,%edx
xor    %esi,%esi
cmp    %edi,%edx
mov    %ecx,%edx
cmovb  %esi,%edx
cmp    $0x20,%ecx
cmovae %esi,%edx
mov    %edx,%ecx
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @lshiftu(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = zext i32 %6 to i64
%8 = icmp uge i64 %7, 32
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = lshr i32 -2, %11
%13 = icmp ugt i32 %10, %12
br i1 %13, label %14, label %16
14: ; preds = %9, %2
%15 = load i32, i32* %4
store i32 %15, i32* %3
br label %20
16: ; preds = %9
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = shl i32 %17, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %16, %14
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @lshiftu(i32 %0, i32 %1) {
%3 = icmp ugt i32 %1, 31
%4 = lshr i32 -2, %1
%5 = icmp ult i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = select i1 %6, i32 0, i32 %1
%8 = shl i32 %0, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeBufferFile(void *in, int X) {
  if (!X)
    return;
  free(in);
}


x86 assembly (clang, -O0):
<FreeBufferFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112e <FreeBufferFile+0x1e>
jmp    1137 <FreeBufferFile+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeBufferFile>:
test   %esi,%esi
je     1119 <FreeBufferFile+0x9>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @FreeBufferFile(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %2, %4
ret void
}
unsigned long unsignedlong_ignoring_signedlong(unsigned long x, signed long y) {
  return x;
}


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

x86 assembly (clang, -O2):
<unsignedlong_ignoring_signedlong>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedlong_ignoring_signedlong(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlong_ignoring_signedlong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t HibernateRTCSSGet(void) {
  return ((*((volatile uint32_t *)(0x400FC028))) & 0x00007FFF);
}


x86 assembly (clang, -O0):
<HibernateRTCSSGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc028,%eax
mov    (%rax),%eax
and    $0x7fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCSSGet>:
mov    $0x7fff,%eax
and    0x400fc028,%eax
ret

LLVM IR (-O0):
define i32 @HibernateRTCSSGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074774056 to i32*)
%2 = and i32 %1, 32767
ret i32 %2
}

LLVM IR (-O2):
define i32 @HibernateRTCSSGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074774056 to i32*)
%2 = and i32 %1, 32767
ret i32 %2
}
/* Variables and functions */
double pow(double, int);
double standardOffset(double mean, double *array, int i) {
  return (pow(mean - array[i], 2));
}


x86 assembly (clang, -O0):
<standardOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standardOffset>:
movslq %esi,%rax
subsd  (%rdi,%rax,8),%xmm0
mov    $0x2,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @standardOffset(double %0, double* %1, i32 %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca i32
store double %0, double* %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = load double*, double** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %8, i64 %10
%12 = load double, double* %11
%13 = fsub double %7, %12
%14 = call double @pow(double %13, i32 2)
ret double %14
}

LLVM IR (-O2):
define double @standardOffset(double %0, double* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds double, double* %1, i64 %4
%6 = load double, double* %5
%7 = fsub double %0, %6
%8 = tail call double @pow(double %7, i32 2)
ret double %8
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  (argc = argc);
  ;
  printf("%s: Not supported on this platform. This program requires fork()."
         "\n",
         argv[0]);
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [67 x i8] c"%s: Not supported on this platform. This program requires fork().\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
store i32 %6, i32* %4
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [67 x i8] c"%s: Not supported on this platform. This program requires fork().\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, ...);
void C_Ret(void) {
  Inst_Printf("addl", "$%d,%%esp", 32 * 4 + 4);
  Inst_Printf("popl", "%%esi");
  Inst_Printf("ret", "");
}


x86 assembly (clang, -O0):
<C_Ret>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    $0x84,%edx
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    0xeda(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    0xed0(%rip),%rdi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Ret>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x84,%edx
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
lea    0xedd(%rip),%rdi
lea    0xedb(%rip),%rsi
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
lea    0xed3(%rip),%rdi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"addl\00"
@.str.1 = [10 x i8] c"$%d,%%esp\00"
@.str.2 = [5 x i8] c"popl\00"
@.str.3 = [6 x i8] c"%%esi\00"
@.str.4 = [4 x i8] c"ret\00"
@.str.5 = [1 x i8] zeroinitializer
define void @C_Ret() {
%1 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 132)
%2 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"addl\00"
@.str.1 = [10 x i8] c"$%d,%%esp\00"
@.str.2 = [5 x i8] c"popl\00"
@.str.3 = [6 x i8] c"%%esi\00"
@.str.4 = [4 x i8] c"ret\00"
@.str.5 = [1 x i8] zeroinitializer
define void @C_Ret() {
%1 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 132)
%2 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
ret void
}
int get_middle_pivot(int *array, int left, int right) {
  int diff = right - left;
  int p = left + diff / 2;
  return p;
}


x86 assembly (clang, -O0):
<get_middle_pivot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_middle_pivot>:
sub    %esi,%edx
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @get_middle_pivot(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %7
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sdiv i32 %13, 2
%15 = add nsw i32 %12, %14
store i32 %15, i32* %8
%16 = load i32, i32* %8
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_middle_pivot(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = sdiv i32 %4, 2
%6 = add nsw i32 %5, %1
ret i32 %6
}
unsigned long de32(char *buf) {
  return (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + buf[3];
}


x86 assembly (clang, -O0):
<de32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
add    %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<de32>:
movzbl (%rdi),%eax
shl    $0x18,%eax
movsbq 0x1(%rdi),%rcx
shl    $0x10,%rcx
cltq
add    %rcx,%rax
movsbq 0x2(%rdi),%rcx
shl    $0x8,%rcx
add    %rax,%rcx
movsbq 0x3(%rdi),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @de32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = add nsw i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = add nsw i32 %13, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = add nsw i32 %19, %23
%25 = sext i32 %24 to i64
ret i64 %25
}

LLVM IR (-O2):
define i64 @de32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = shl nsw i32 %7, 16
%9 = add nsw i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = shl nsw i32 %12, 8
%14 = add nsw i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = add nsw i32 %14, %17
%19 = sext i32 %18 to i64
ret i64 %19
}
/* Type definitions */
struct deque {
  int dummy;
};

/* Variables and functions */
scalar_t__ deque_count(struct deque const *);
bool deque_is_empty(const struct deque *deque) {
  return deque_count(deque) == 0;
}


x86 assembly (clang, -O0):
<deque_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <deque_count@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deque_is_empty>:
push   %rax
call   1030 <deque_count@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.deque = type { i32 }
define i32 @deque_is_empty(%struct.deque* %0) {
%2 = alloca %struct.deque*
store %struct.deque* %0, %struct.deque** %2
%3 = load %struct.deque*, %struct.deque** %2
%4 = call i64 @deque_count(%struct.deque* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.deque = type { i32 }
define i32 @deque_is_empty(%struct.deque* %0) {
%2 = tail call i64 @deque_count(%struct.deque* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int udisk_detect_vir(char *devname) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @udisk_detect_vir(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_hsc0(unsigned char *, unsigned char *, int *, int);
void set_hsc(unsigned char *h, unsigned char *s, unsigned char *c, int sector) {
  int cc;
  set_hsc0(h, s, &cc, sector);
  *c = cc & 0xFF;
  *s |= (cc >> 2) & 0xC0;
}


x86 assembly (clang, -O0):
<set_hsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
lea    -0x20(%rbp),%rdx
call   1030 <set_hsc0@plt>
mov    -0x20(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%edx
sar    $0x2,%edx
and    $0xc0,%edx
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_hsc>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0x4(%rsp),%rdx
call   1030 <set_hsc0@plt>
mov    0x4(%rsp),%eax
mov    %al,(%r14)
shr    $0x2,%eax
and    $0xc0,%al
or     %al,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @set_hsc(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %8
%13 = call i32 @set_hsc0(i8* %10, i8* %11, i32* %9, i32 %12)
%14 = load i32, i32* %9
%15 = and i32 %14, 255
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %7
store i8 %16, i8* %17
%18 = load i32, i32* %9
%19 = ashr i32 %18, 2
%20 = and i32 %19, 192
%21 = load i8*, i8** %6
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = or i32 %23, %20
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
ret void
}

LLVM IR (-O2):
define void @set_hsc(i8* %0, i8* %1, i8* nocapture writeonly %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32 @set_hsc0(i8* %0, i8* %1, i32* %5, i32 %3)
%8 = load i32, i32* %5
%9 = trunc i32 %8 to i8
store i8 %9, i8* %2
%10 = lshr i32 %8, 2
%11 = load i8, i8* %1
%12 = trunc i32 %10 to i8
%13 = and i8 %12, -64
%14 = or i8 %13, %11
store i8 %14, i8* %1
ret void
}
int processor_flash_enable(void) {
  int ret = 1;
  ret = 0;
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @processor_flash_enable() {
ret i32 0
}
/* Variables and functions */
scalar_t__ calloc(int, int);
double *alloc1d_dble(int n) {
  double *array1 = (double *)calloc(n, sizeof(double));
  return array1;
}


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

x86 assembly (clang, -O2):
<alloc1d_dble>:
mov    $0x8,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define double* @alloc1d_dble(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double*, double** %3
ret double* %7
}

LLVM IR (-O2):
define double* @alloc1d_dble(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = inttoptr i64 %2 to double*
ret double* %3
}
/* Variables and functions */
int hexstrtoint(char *);
unsigned char *int2utf8str(int);
unsigned char *utf8code16tostr(char *str) {
  int codepoint;
  codepoint = (hexstrtoint(str) << 8) + hexstrtoint(str + 2);
  return (int2utf8str(codepoint));
}


x86 assembly (clang, -O0):
<utf8code16tostr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hexstrtoint@plt>
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1030 <hexstrtoint@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <int2utf8str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8code16tostr>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <hexstrtoint@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    $0x2,%rbx
mov    %rbx,%rdi
call   1030 <hexstrtoint@plt>
add    %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <int2utf8str@plt>

LLVM IR (-O0):
define i8* @utf8code16tostr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @hexstrtoint(i8* %4)
%6 = shl i32 %5, 8
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = call i32 @hexstrtoint(i8* %8)
%10 = add nsw i32 %6, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i8* @int2utf8str(i32 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @utf8code16tostr(i8* %0) {
%2 = tail call i32 @hexstrtoint(i8* %0)
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = tail call i32 @hexstrtoint(i8* %4)
%6 = add nsw i32 %3, %5
%7 = tail call i8* @int2utf8str(i32 %6)
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int pkey_bits_gost(const EVP_PKEY *pk) { return 256; }


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

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

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

LLVM IR (-O2):
define i32 @pkey_bits_gost(i32* nocapture readnone %0) {
ret i32 256
}
void ARGB4444ToARGBRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToARGBRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xad() {
  Assert_real((ispunct(173) == 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_ispunct.c",
              870, ("ispunct should be 0 for 0xad"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xad>:
push   %rax
mov    $0xad,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x366,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xad\00"
define void @t_ispunct_0xad() {
%1 = call i64 @ispunct(i32 173)
%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 870, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xad\00"
define void @t_ispunct_0xad() {
%1 = tail call i64 @ispunct(i32 173)
%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 870, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((always_)) const int xisnan(double x) { return x != x; }


x86 assembly (clang, -O0):
<xisnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisnan>:
xor    %eax,%eax
ucomisd %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @xisnan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fcmp une double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @xisnan(double %0) {
%2 = fcmp uno double %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ f(char *);
void g(char c[]) { f(c); }


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

x86 assembly (clang, -O2):
<g>:
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @g(i8* %0) {
%2 = tail call i32 @f(i8* %0)
ret void
}
int test_imm_BDint64_midword_reg(long long val) {
  return ((val >> 16) & (0xBD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BDint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 189
%6 = icmp ne i64 %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_BDint64_midword_reg(i64 %0) {
%2 = and i64 %0, 12386304
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int pm8901_mpp_config(unsigned int, int, unsigned int, unsigned int);
int pm8901_mpp_config_digital_out(unsigned mpp, unsigned level,
                                  unsigned control) {
  return pm8901_mpp_config(mpp, 1, level, control);
}


x86 assembly (clang, -O0):
<pm8901_mpp_config_digital_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x1,%esi
call   1030 <pm8901_mpp_config@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8901_mpp_config_digital_out>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x1,%esi
jmp    1030 <pm8901_mpp_config@plt>

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

LLVM IR (-O2):
define i32 @pm8901_mpp_config_digital_out(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pm8901_mpp_config(i32 %0, i32 1, i32 %1, i32 %2)
ret i32 %4
}
void delay_ms(int msecs) {
  volatile int count = 100000 * msecs;
  while (count--)
    ;
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x186a0,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     112a <delay_ms+0x2a>
jmp    1111 <delay_ms+0x11>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
imul   $0x186a0,%edi,%eax
mov    %eax,-0x4(%rsp)
nopw   0x0(%rax,%rax,1)
subl   $0x1,-0x4(%rsp)
jae    1110 <delay_ms+0x10>
ret

LLVM IR (-O0):
define void @delay_ms(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 100000, %4
store volatile i32 %5, i32* %3
br label %6
6: ; preds = %10, %1
%7 = load volatile i32, i32* %3
%8 = add nsw i32 %7, -1
store volatile i32 %8, i32* %3
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = mul nsw i32 %0, 100000
store volatile i32 %4, i32* %2
br label %5
5: ; preds = %5, %1
%6 = load volatile i32, i32* %2
%7 = add nsw i32 %6, -1
store volatile i32 %7, i32* %2
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %5
9: ; preds = %5
ret void
}
/* Variables and functions */
char *nr_strerror(int);
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *);
int nr_strerror_r(int errnum, char *strerrbuf, size_t buflen) {
  char *error = nr_strerror(errnum);
  snprintf(strerrbuf, buflen, "%s", error);
  return 0;
}


x86 assembly (clang, -O0):
<nr_strerror_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <nr_strerror@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xeae(%rip),%rdx
call   1040 <snprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr_strerror_r>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <nr_strerror@plt>
lea    0xeca(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rcx
call   1040 <snprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @nr_strerror_r(i32 %0, i8* %1, i64 %2) {
%4 = tail call i8* @nr_strerror(i32 %0)
%5 = tail call i32 @snprintf(i8* %1, i64 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void interrupt_memmanage(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<interrupt_memmanage>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <interrupt_memmanage+0x9>
jmp    1109 <interrupt_memmanage+0x9>

x86 assembly (clang, -O2):
<interrupt_memmanage>:
jmp    1100 <interrupt_memmanage>

LLVM IR (-O0):
define void @interrupt_memmanage() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @interrupt_memmanage() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int lrand48();
int rand_int(int min, int max) { return lrand48() % (max - min) + min; }


x86 assembly (clang, -O0):
<rand_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <lrand48@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @lrand48()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = srem i32 %5, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0, i32 %1) {
%3 = tail call i32 (...) @lrand48()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ root;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
unsigned long get_XWindowAttributes_root(void *_p) {
  return (unsigned long)((XWindowAttributes *)_p)->root;
}


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

x86 assembly (clang, -O2):
<get_XWindowAttributes_root>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XWindowAttributes_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int test_imm_0Dint8_mem(signed char *val) {
  return ((*val) & (-0x0D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Dint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -13
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M190_f(char *s) {
  debug("M190_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M190_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M190_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M190_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M190_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M190_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M190_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int getn(int, int);
int get2() { return getn(2, 1); }


x86 assembly (clang, -O0):
<get2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <getn@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @get2() {
%1 = call i32 @getn(i32 2, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get2() {
%1 = tail call i32 @getn(i32 2, i32 1)
ret i32 %1
}
void check_memory_main_dos_c(void) {}


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

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

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

LLVM IR (-O2):
define void @check_memory_main_dos_c() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memfree(void **, int /*<<< orphan*/ *);
void thread_memfree(void *arg) {
  void **ptr = (void **)arg;
  do {
  } while (0);
  memfree(ptr, NULL);
}


x86 assembly (clang, -O0):
<thread_memfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1129 <thread_memfree+0x19>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <memfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_memfree>:
xor    %esi,%esi
jmp    1030 <memfree@plt>

LLVM IR (-O0):
define void @thread_memfree(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
br label %6
6: ; preds = %1
br label %7
7: ; preds = %6
%8 = load i8**, i8*** %3
%9 = call i32 @memfree(i8** %8, i32* null)
ret void
}

LLVM IR (-O2):
define void @thread_memfree(i8* %0) {
%2 = bitcast i8* %0 to i8**
%3 = tail call i32 @memfree(i8** %2, i32* null)
ret void
}
/* Type definitions */
struct predicate {
  int dummy;
};

/* Variables and functions */
bool pred_openparen(const char *path, int flags, struct predicate *pred) {
  return true;
}


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

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

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

LLVM IR (-O2):
%struct.predicate = type { i32 }
define i32 @pred_openparen(i8* nocapture readnone %0, i32 %1, %struct.predicate* nocapture readnone %2) {
ret i32 1
}
void answer_post(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_post() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 33;
  int height = 1.82;
  printf("I'm %d years old\n", age);
  printf("I'm %d meters tall\n", height);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x21,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x21,%esi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"I'm %d years old\0A\00"
@.str.1 = [20 x i8] c"I'm %d meters tall\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 33, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"I'm %d years old\0A\00"
@.str.1 = [20 x i8] c"I'm %d meters tall\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 33)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
void glDeleteShader(unsigned int shader) {}


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

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

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

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

/* Type definitions */
struct TYPE_3__ {
  short rbearing;
};
struct TYPE_4__ {
  TYPE_1__ max_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_max_bounds_rbearing(void *_p, short _v) {
  ((XFontStruct *)_p)->max_bounds.rbearing = (short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_max_bounds_rbearing>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_max_bounds_rbearing>:
mov    %si,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XFontStruct_max_bounds_rbearing(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}