xunge/DecIR huggingface dataset:
int test_lsbZero(int x) {
  if ((x > 0 && x % 2 == 1) || (x < 0 && x % 2 == -1))
    x--;
  return x;
}


x86 assembly (clang, -O0):
<test_lsbZero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1125 <test_lsbZero+0x25>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
je     1143 <test_lsbZero+0x43>
cmpl   $0x0,-0x4(%rbp)
jge    114c <test_lsbZero+0x4c>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0xffffffff,%edx
jne    114c <test_lsbZero+0x4c>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lsbZero>:
mov    %edi,%eax
mov    %edi,%edx
shr    $0x1f,%edx
add    %edi,%edx
and    $0xfffffffe,%edx
mov    %edi,%ecx
sub    %edx,%ecx
test   %edi,%edi
jle    1119 <test_lsbZero+0x19>
cmp    $0x1,%ecx
je     1122 <test_lsbZero+0x22>
test   %eax,%eax
jns    1125 <test_lsbZero+0x25>
cmp    $0xffffffff,%ecx
jne    1125 <test_lsbZero+0x25>
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @test_lsbZero(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = srem i32 %0, 2
%4 = icmp eq i32 %3, 1
%5 = and i1 %2, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = icmp slt i32 %0, 0
%8 = icmp eq i32 %3, -1
%9 = and i1 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %6, %1
%11 = add nsw i32 %0, -1
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %11, %10 ], [ %0, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ Continuation_cache_invalidate();
void Continuation_cache_destroy(void) { Continuation_cache_invalidate(); }


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

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

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

LLVM IR (-O2):
define void @Continuation_cache_destroy() {
%1 = tail call i32 (...) @Continuation_cache_invalidate()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EEPROMBlockHide(uint32_t ui32Block) {
  ;
  ;
  (*((volatile unsigned long *)(0x400AF050))) = (1 << ui32Block);
}


x86 assembly (clang, -O0):
<EEPROMBlockHide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0x400af050,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockHide>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,0x400af050
40
ret

LLVM IR (-O0):
define void @EEPROMBlockHide(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* inttoptr (i64 1074458704 to i64*)
ret void
}

LLVM IR (-O2):
define void @EEPROMBlockHide(i32 %0) {
%2 = shl nuw i32 1, %0
%3 = sext i32 %2 to i64
store volatile i64 %3, i64* inttoptr (i64 1074458704 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ metro_paris();
int /*<<< orphan*/ project_presentation();
int main() {
  project_presentation();
  metro_paris();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <project_presentation@plt>
mov    $0x0,%al
call   1040 <metro_paris@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <project_presentation@plt>
xor    %eax,%eax
call   1040 <metro_paris@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @project_presentation()
%3 = call i32 (...) @metro_paris()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @project_presentation()
%2 = tail call i32 (...) @metro_paris()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_NAME;

/* Variables and functions */
int /*<<< orphan*/ NID_stateOrProvinceName;
char const *req_GetNameNid(int /*<<< orphan*/ *, int /*<<< orphan*/);
const char *req_GetName_SP(X509_NAME *name) {
  return req_GetNameNid(name, NID_stateOrProvinceName);
}


x86 assembly (clang, -O0):
<req_GetName_SP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
call   1030 <req_GetNameNid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_GetName_SP>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <req_GetNameNid@plt>

LLVM IR (-O0):
@NID_stateOrProvinceName = global i32 0
define i8* @req_GetName_SP(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @NID_stateOrProvinceName
%5 = call i8* @req_GetNameNid(i32* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@NID_stateOrProvinceName = global i32 0
define i8* @req_GetName_SP(i32* %0) {
%2 = load i32, i32* @NID_stateOrProvinceName
%3 = tail call i8* @req_GetNameNid(i32* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ write(int, void *, size_t);
__attribute__((__weak__, __always___)) ssize_t
softboundmpx_write(int fd, void *buf, size_t count) {
  return write(fd, buf, count);
}


x86 assembly (clang, -O0):
<softboundmpx_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define weak i32 @softboundmpx_write(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int bar(void) {
  printf("bar()\n");
  return 3;
}


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

x86 assembly (clang, -O2):
<bar>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"bar()\0A\00"
define i32 @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
@str = [6 x i8] c"bar()\00"
define i32 @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 3
}
void copia(void) {
  int i;
  extern char linea[], linea_max[];
  i = 0;
  while (1) {
    linea_max[i] = linea[i];
    if (linea_max[i] == '\0')
      break;
    i++;
  }
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax,%rcx,1),%dl
movslq -0x4(%rbp),%rcx
mov    0x2eb4(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movslq -0x4(%rbp),%rcx
mov    0x2ea6(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1144 <copia+0x44>
jmp    1152 <copia+0x52>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copia+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
xor    %eax,%eax
mov    0x2ee7(%rip),%rsi
mov    0x2ec8(%rip),%rdx
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copia+0x10>
ret

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %17
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %8
store i8 %6, i8* %9
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
br label %20
17: ; preds = %2
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %2
20: ; preds = %16
ret void
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %2
store i8 %4, i8* %5
%6 = icmp eq i8 %4, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret void
}
void report_memory(int id) {}


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

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

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

LLVM IR (-O2):
define void @report_memory(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int main(void) {
  unsigned long count, i, j, k, sums;
  i = sums = 0;
  j = 1;
  for (count = 0; count < 50; count++) {
    k = i + j;
    i = j;
    j = k;
    if (k % 2 == 0 && k < 4000000) {
      sums += k;
    }
  }
  printf("%lu\n", sums);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x32,-0x10(%rbp)
jae    11a8 <main+0x98>
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1192 <main+0x82>
cmpq   $0x3d0900,-0x28(%rbp)
jae    1192 <main+0x82>
mov    -0x28(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1197 <main+0x87>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113f <main+0x2f>
mov    -0x30(%rbp),%rsi
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %6
store i64 0, i64* %3
store i64 1, i64* %4
store i64 0, i64* %2
br label %7
7: ; preds = %27, %0
%8 = load i64, i64* %2
%9 = icmp ult i64 %8, 50
br i1 %9, label %10, label %30
10: ; preds = %7
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = add i64 %11, %12
store i64 %13, i64* %5
%14 = load i64, i64* %4
store i64 %14, i64* %3
%15 = load i64, i64* %5
store i64 %15, i64* %4
%16 = load i64, i64* %5
%17 = urem i64 %16, 2
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %10
%20 = load i64, i64* %5
%21 = icmp ult i64 %20, 4000000
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i64, i64* %5
%24 = load i64, i64* %6
%25 = add i64 %24, %23
store i64 %25, i64* %6
br label %26
26: ; preds = %22, %19, %10
br label %27
27: ; preds = %26
%28 = load i64, i64* %2
%29 = add i64 %28, 1
store i64 %29, i64* %2
br label %7
30: ; preds = %7
%31 = load i64, i64* %6
%32 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4613732)
ret i32 0
}
/* Variables and functions */
int f34(int *);
int f35(int *p) { return f34(p); }


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

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

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

LLVM IR (-O2):
define i32 @f35(i32* %0) {
%2 = tail call i32 @f34(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int null_ready(uint8_t id) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @null_ready(i32 %0) {
ret i32 0
}
/* Variables and functions */
short USBSTK5515_I2C_write(int, unsigned char *, unsigned short);
short OSD9616_multiSend(unsigned char *data, unsigned short len) {
  unsigned short x;
  unsigned char cmd[10];
  for (x = 0; x < len; x++) {
    cmd[x] = data[x];
  }
  return USBSTK5515_I2C_write(0x3C, cmd, len);
}


x86 assembly (clang, -O0):
<OSD9616_multiSend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jge    115d <OSD9616_multiSend+0x4d>
mov    -0x8(%rbp),%rax
movzwl -0xc(%rbp),%ecx
mov    (%rax,%rcx,1),%cl
movzwl -0xc(%rbp),%eax
mov    %cl,-0x16(%rbp,%rax,1)
mov    -0xc(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xc(%rbp)
jmp    1129 <OSD9616_multiSend+0x19>
lea    -0x16(%rbp),%rsi
mov    $0x3c,%edi
movzwl -0xa(%rbp),%edx
call   1030 <USBSTK5515_I2C_write@plt>
cwtl
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSD9616_multiSend>:
push   %rbx
sub    $0x10,%rsp
movzwl %si,%ebx
test   %esi,%esi
je     113f <OSD9616_multiSend+0x1f>
mov    %rdi,%rax
lea    0x6(%rsp),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
lea    0x6(%rsp),%rsi
mov    $0x3c,%edi
mov    %ebx,%edx
call   1030 <USBSTK5515_I2C_write@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @OSD9616_multiSend(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i16
%6 = alloca [10 x i8]
store i8* %0, i8** %3
store i16 %1, i16* %4
store i16 0, i16* %5
br label %7
7: ; preds = %22, %2
%8 = load i16, i16* %5
%9 = zext i16 %8 to i32
%10 = load i16, i16* %4
%11 = zext i16 %10 to i32
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %25
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = load i16, i16* %5
%16 = zext i16 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = load i16, i16* %5
%20 = zext i16 %19 to i64
%21 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 %20
store i8 %18, i8* %21
br label %22
22: ; preds = %13
%23 = load i16, i16* %5
%24 = add i16 %23, 1
store i16 %24, i16* %5
br label %7
25: ; preds = %7
%26 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%27 = load i16, i16* %4
%28 = call signext i16 @USBSTK5515_I2C_write(i32 60, i8* %26, i16 zeroext %27)
ret i16 %28
}

LLVM IR (-O2):
define signext i16 @OSD9616_multiSend(i8* nocapture %0, i16 zeroext %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = icmp eq i16 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = zext i16 %1 to i64
br label %9
9: ; preds = %6, %2
%10 = call signext i16 @USBSTK5515_I2C_write(i32 60, i8* %4, i16 zeroext %1)
ret i16 %10
}
/* Type definitions */
struct build_feature_devs_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct build_feature_devs_info *);
void build_info_free(struct build_feature_devs_info *binfo) { free(binfo); }


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

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

LLVM IR (-O0):
%struct.build_feature_devs_info = type { i32 }
define void @build_info_free(%struct.build_feature_devs_info* %0) {
%2 = alloca %struct.build_feature_devs_info*
store %struct.build_feature_devs_info* %0, %struct.build_feature_devs_info** %2
%3 = load %struct.build_feature_devs_info*, %struct.build_feature_devs_info** %2
%4 = call i32 @free(%struct.build_feature_devs_info* %3)
ret void
}

LLVM IR (-O2):
%struct.build_feature_devs_info = type { i32 }
define void @build_info_free(%struct.build_feature_devs_info* nocapture %0) {
%2 = tail call i32 @free(%struct.build_feature_devs_info* %0)
ret void
}
void fnoreturn(void) { __builtin_abort(); }


x86 assembly (clang, -O0):
<fnoreturn>:
push   %rbp
mov    %rsp,%rbp
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<fnoreturn>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @fnoreturn() {
unreachable
}

LLVM IR (-O2):
define void @fnoreturn() {
tail call void @abort()
unreachable
}
float foo(unsigned char n) {
  float r = 10 * n;
  asm volatile("" : : : "memory");
  return r;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
imul   $0xa,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
add    %edi,%edi
lea    (%rdi,%rdi,4),%eax
cvtsi2ss %eax,%xmm0
ret

LLVM IR (-O0):
define float @foo(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca float
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = mul nsw i32 10, %5
%7 = sitofp i32 %6 to float
store float %7, float* %3
%8 = load float, float* %3
ret float %8
}

LLVM IR (-O2):
define float @foo(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = mul nuw nsw i32 %2, 10
%4 = sitofp i32 %3 to float
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret float %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef unsigned int uint64_t;

/* Variables and functions */
uint64_t read48le(const uint8_t *buf) {
  uint64_t ret = 0;
  for (unsigned i = 0; i < 48 / 8; ++i)
    ret |= (uint64_t)buf[i] << (i * 8);
  return ret;
}


x86 assembly (clang, -O0):
<read48le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jae    1147 <read48le+0x47>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <read48le+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @read48le(i64* nocapture %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int x;
  int y;
  assume(x == y && y == 0);
  while (1) {
    x++;
    y++;
    assert(x == y && x >= 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jne    114a <main+0x2a>
cmpl   $0x0,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xe(%rbp)
jne    1184 <main+0x64>
cmpl   $0x0,-0x8(%rbp)
setge  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1157 <main+0x37>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <assume@plt>
nopl   0x0(%rax,%rax,1)
lea    0x1(%rax),%ebx
xor    %edi,%edi
cmp    $0xffffffff,%eax
setge  %dil
call   1030 <assert@plt>
mov    %ebx,%eax
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br label %10
10: ; preds = %7, %0
%11 = phi i1 [ false, %0 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assume(i32 %12)
br label %14
14: ; preds = %10, %25
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %14
%23 = load i32, i32* %2
%24 = icmp sge i32 %23, 0
br label %25
25: ; preds = %22, %14
%26 = phi i1 [ false, %14 ], [ %24, %22 ]
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
br label %14
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ undef, %0 ], [ %4, %2 ]
%4 = add nsw i32 %3, 1
%5 = icmp sgt i32 %3, -2
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
br label %2
}
void sysheap_restore_leak_detection(void) {}


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

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

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

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

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ selection;
};
struct TYPE_4__ {
  TYPE_1__ xselectionclear;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselectionclear_selection(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselectionclear.selection;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xselectionclear_selection(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void Hal_hook_wr_sgndrecfield_receleme(void) {}


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

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

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

LLVM IR (-O2):
define void @Hal_hook_wr_sgndrecfield_receleme() {
ret void
}
/* Variables and functions */
int uasm_rel_lo(long val) { return ((val & 0xffff) ^ 0x8000) - 0x8000; }


x86 assembly (clang, -O0):
<uasm_rel_lo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
xor    $0x8000,%rax
sub    $0x8000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uasm_rel_lo>:
movswq %di,%rax
ret

LLVM IR (-O0):
define i32 @uasm_rel_lo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 65535
%5 = xor i64 %4, 32768
%6 = sub nsw i64 %5, 32768
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @uasm_rel_lo(i64 %0) {
%2 = shl i64 %0, 48
%3 = ashr exact i64 %2, 48
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gmtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
long mktime(struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
long gettimediffwithgmt(void) {
  struct tm tm_local, tm_gmt;
  time_t tl;
  tl = time(NULL);
  localtime_r(&tl, &tm_local);
  gmtime_r(&tl, &tm_gmt);
  return (mktime(&tm_local) - mktime(&tm_gmt));
}


x86 assembly (clang, -O0):
<gettimediffwithgmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <localtime_r@plt>
lea    -0x14(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <gmtime_r@plt>
lea    -0x8(%rbp),%rdi
call   1060 <mktime@plt>
mov    %rax,-0x20(%rbp)
lea    -0x10(%rbp),%rdi
call   1060 <mktime@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimediffwithgmt>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rbx
lea    0x18(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <localtime_r@plt>
lea    0x10(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <gmtime_r@plt>
mov    %r14,%rdi
call   1060 <mktime@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1060 <mktime@plt>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i64 @gettimediffwithgmt() {
%1 = alloca %struct.tm
%2 = alloca %struct.tm
%3 = alloca i32
%4 = call i32 @time(i32* null)
store i32 %4, i32* %3
%5 = call i32 @localtime_r(i32* %3, %struct.tm* %1)
%6 = call i32 @gmtime_r(i32* %3, %struct.tm* %2)
%7 = call i64 @mktime(%struct.tm* %1)
%8 = call i64 @mktime(%struct.tm* %2)
%9 = sub nsw i64 %7, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i64 @gettimediffwithgmt() {
%1 = alloca %struct.tm
%2 = alloca %struct.tm
%3 = alloca i32
%4 = bitcast %struct.tm* %1 to i8*
%5 = bitcast %struct.tm* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @time(i32* null)
store i32 %7, i32* %3
%8 = call i32 @localtime_r(i32* %3, %struct.tm* %1)
%9 = call i32 @gmtime_r(i32* %3, %struct.tm* %2)
%10 = call i64 @mktime(%struct.tm* %1)
%11 = call i64 @mktime(%struct.tm* %2)
%12 = sub nsw i64 %10, %11
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ simple_string_left_trim(char const *, char, char *);
int /*<<< orphan*/ simple_string_right_trim(char *, char, char *);
void simple_string_trim(const char *self, char c, char buf[]) {
  char tmp_buf[2048] = {0};
  simple_string_left_trim(self, c, tmp_buf);
  simple_string_right_trim(tmp_buf, c, buf);
}


x86 assembly (clang, -O0):
<simple_string_trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x820(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
lea    -0x820(%rbp),%rdx
movsbl %al,%esi
call   1040 <simple_string_left_trim@plt>
lea    -0x820(%rbp),%rdi
mov    -0x9(%rbp),%al
mov    -0x18(%rbp),%rdx
movsbl %al,%esi
call   1030 <simple_string_right_trim@plt>
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_string_trim>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x808,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%r15
mov    $0x800,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
call   1040 <simple_string_left_trim@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <simple_string_right_trim@plt>
add    $0x808,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @simple_string_trim(i8* %0, i8 signext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8*
%7 = alloca [2048 x i8]
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%8 = bitcast [2048 x i8]* %7 to i8*
%9 = load i8*, i8** %4
%10 = load i8, i8* %5
%11 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%12 = call i32 @simple_string_left_trim(i8* %9, i8 signext %10, i8* %11)
%13 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%14 = load i8, i8* %5
%15 = load i8*, i8** %6
%16 = call i32 @simple_string_right_trim(i8* %13, i8 signext %14, i8* %15)
ret void
}

LLVM IR (-O2):
define void @simple_string_trim(i8* %0, i8 signext %1, i8* %2) {
%4 = alloca [2048 x i8]
%5 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%6 = call i32 @simple_string_left_trim(i8* %0, i8 signext %1, i8* %5)
%7 = call i32 @simple_string_right_trim(i8* %5, i8 signext %1, i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_BASICRESP;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_BASICRESP_it;
OCSP_BASICRESP *OCSP_BASICRESP_new(void) {
  return (OCSP_BASICRESP *)ASN1_item_new(&OCSP_BASICRESP_it);
}


x86 assembly (clang, -O0):
<OCSP_BASICRESP_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCSP_BASICRESP_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@OCSP_BASICRESP_it = global i32 0
define i32* @OCSP_BASICRESP_new() {
%1 = call i64 @ASN1_item_new(i32* @OCSP_BASICRESP_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@OCSP_BASICRESP_it = global i32 0
define i32* @OCSP_BASICRESP_new() {
%1 = tail call i64 @ASN1_item_new(i32* @OCSP_BASICRESP_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int _mm_movemask_epi8(int /*<<< orphan*/);
int test_mm_movemask_epi8(__m128i A) { return _mm_movemask_epi8(A); }


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

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

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

LLVM IR (-O2):
define i32 @test_mm_movemask_epi8(i32 %0) {
%2 = tail call i32 @_mm_movemask_epi8(i32 %0)
ret i32 %2
}
unsigned rol32(const unsigned int x, const int k) {
  return (x << k) | (x >> (32 - k));
}


x86 assembly (clang, -O0):
<rol32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol32>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rol32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = lshr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Type definitions */
typedef void token;

/* Variables and functions */
int get_token_size(void *);
struct token *get_next_token(struct token *tok) {
  return (void *)tok + get_token_size(tok);
}


x86 assembly (clang, -O0):
<get_next_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_token_size@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next_token>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_token_size@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.token = type opaque
define %struct.token* @get_next_token(%struct.token* %0) {
%2 = alloca %struct.token*
store %struct.token* %0, %struct.token** %2
%3 = load %struct.token*, %struct.token** %2
%4 = bitcast %struct.token* %3 to i8*
%5 = load %struct.token*, %struct.token** %2
%6 = bitcast %struct.token* %5 to i8*
%7 = call i32 @get_token_size(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr i8, i8* %4, i64 %8
%10 = bitcast i8* %9 to %struct.token*
ret %struct.token* %10
}

LLVM IR (-O2):
%struct.token = type opaque
define %struct.token* @get_next_token(%struct.token* %0) {
%2 = bitcast %struct.token* %0 to i8*
%3 = tail call i32 @get_token_size(i8* %2)
%4 = sext i32 %3 to i64
%5 = getelementptr i8, i8* %2, i64 %4
%6 = bitcast i8* %5 to %struct.token*
ret %struct.token* %6
}
/* Variables and functions */
int /*<<< orphan*/ ccf();
void opcode_3f() { ccf(); }


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

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

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

LLVM IR (-O2):
define void @opcode_3f() {
%1 = tail call i32 (...) @ccf()
ret void
}
void dd_pbl_ios_iap_buy(const char *name) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_iap_buy(i8* nocapture %0) {
ret void
}
int func_a(int a) {
  a = a + 1;
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @func_a(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ my_strcapitalize_check(char *, int, int *);
char *my_strcapitalize(char *str) {
  int i;
  int u;
  i = 0;
  u = 1;
  while (str[i] != '\0') {
    my_strcapitalize_check(str, i, &u);
    i = i + 1;
  }
  return (str);
}


x86 assembly (clang, -O0):
<my_strcapitalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115d <my_strcapitalize+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1030 <my_strcapitalize_check@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <my_strcapitalize+0x1a>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcapitalize>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
movl   $0x1,0xc(%rsp)
cmpb   $0x0,(%rdi)
je     1149 <my_strcapitalize+0x39>
xor    %ebx,%ebx
lea    0xc(%rsp),%r15
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15,%rdx
call   1030 <my_strcapitalize_check@plt>
cmpb   $0x0,0x1(%r14,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1130 <my_strcapitalize+0x20>
mov    %r14,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @my_strcapitalize(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1, %6
%7 = phi i64 [ %10, %6 ], [ 0, %1 ]
%8 = trunc i64 %7 to i32
%9 = call i32 @my_strcapitalize_check(i8* %0, i32 %8, i32* %2)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %1
ret i8* %0
}
int q_isupper(int c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<q_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <q_isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @q_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int VisibleContents(int contents) {
  int i;
  for (i = 1; i <= 64; i <<= 1)
    if (contents & i) {
      return i;
    }
  return 0;
}


x86 assembly (clang, -O0):
<VisibleContents>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jg     1145 <VisibleContents+0x45>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1132 <VisibleContents+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <VisibleContents+0x4c>
jmp    1137 <VisibleContents+0x37>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <VisibleContents+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VisibleContents>:
mov    $0x1,%eax
test   $0x1,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x2,%eax
test   $0x2,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x4,%eax
test   $0x4,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x8,%eax
test   $0x8,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x10,%eax
test   $0x10,%dil
jne    1148 <VisibleContents+0x48>
mov    %edi,%ecx
and    $0x40,%ecx
test   $0x20,%dil
mov    $0x20,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @VisibleContents(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %21
4: ; preds = %1
%5 = and i32 %0, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = and i32 %0, 4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = and i32 %0, 8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = and i32 %0, 16
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = and i32 %0, 32
%18 = icmp eq i32 %17, 0
%19 = and i32 %0, 64
%20 = select i1 %18, i32 %19, i32 32
br label %21
21: ; preds = %16, %13, %10, %7, %4, %1
%22 = phi i32 [ 1, %1 ], [ 2, %4 ], [ 4, %7 ], [ 8, %10 ], [ 16, %13 ], [ %20, %16 ]
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ansi_clear_screen() { printf("\x1b[2J"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @ansi_clear_screen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct treenode {
  int dummy;
};
struct symbols {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ satisfy_internal(struct treenode *, struct symbols *,
                                    int /*<<< orphan*/, int *);
bool satisfy(struct treenode *tree, struct symbols *table) {
  bool satisfied = false;
  satisfy_internal(tree, table, 0, &satisfied);
  return satisfied;
}


x86 assembly (clang, -O0):
<satisfy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
lea    -0x14(%rbp),%rcx
call   1030 <satisfy_internal@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<satisfy>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rcx
xor    %edx,%edx
call   1030 <satisfy_internal@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.treenode = type { i32 }
%struct.symbols = type { i32 }
define i32 @satisfy(%struct.treenode* %0, %struct.symbols* %1) {
%3 = alloca %struct.treenode*
%4 = alloca %struct.symbols*
%5 = alloca i32
store %struct.treenode* %0, %struct.treenode** %3
store %struct.symbols* %1, %struct.symbols** %4
store i32 0, i32* %5
%6 = load %struct.treenode*, %struct.treenode** %3
%7 = load %struct.symbols*, %struct.symbols** %4
%8 = call i32 @satisfy_internal(%struct.treenode* %6, %struct.symbols* %7, i32 0, i32* %5)
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
%struct.treenode = type { i32 }
%struct.symbols = type { i32 }
define i32 @satisfy(%struct.treenode* %0, %struct.symbols* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @satisfy_internal(%struct.treenode* %0, %struct.symbols* %1, i32 0, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ baz(char *, char *);
void foo(int x, int y[x][x]) {
  if (x < 2)
    baz("", "");
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1138 <foo+0x28>
lea    0xed0(%rip),%rsi
mov    %rsi,%rdi
call   1030 <baz@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x1,%edi
jg     1124 <foo+0x14>
lea    0xee4(%rip),%rdi
mov    %rdi,%rsi
jmp    1030 <baz@plt>
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @foo(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 = zext i32 %5 to i64
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @baz(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @foo(i32 %0, i32* nocapture readnone %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @baz(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int convert(int px[], int *out[]) {
  printf("convert...\n");
  printf("px0: %d\n", px[0]);
  *out[0] = 19;
  return 0;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movl   $0x13,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%rax
movl   $0x13,(%rax)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"convert...\0A\00"
@.str.1 = [9 x i8] c"px0: %d\0A\00"
define i32 @convert(i32* %0, i32** %1) {
%3 = alloca i32*
%4 = alloca i32**
store i32* %0, i32** %3
store i32** %1, i32*** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32**, i32*** %4
%11 = getelementptr inbounds i32*, i32** %10, i64 0
%12 = load i32*, i32** %11
store i32 19, i32* %12
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"px0: %d\0A\00"
@str = [11 x i8] c"convert...\00"
define i32 @convert(i32* nocapture %0, i32** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* %0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %1
store i32 19, i32* %6
ret i32 0
}