xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cmt_wait(int);
int /*<<< orphan*/ printf(char *, ...);
void routineY(void *data) {
  int i;
  printf("<Y: %p>", &i);
  i = 0;
  while (1) {
    printf("[Y: %d]", i++);
    cmt_wait(150);
  }
  printf("[Y: end]");
}


x86 assembly (clang, -O0):
<routineY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    %eax,-0xc(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x96,%edi
call   1040 <cmt_wait@plt>
jmp    1145 <routineY+0x25>

x86 assembly (clang, -O2):
<routineY>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec9(%rip),%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rsi),%eax
mov    %eax,0xc(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x96,%edi
call   1040 <cmt_wait@plt>
mov    0xc(%rsp),%esi
jmp    1150 <routineY+0x30>

LLVM IR (-O0):
@.str = [8 x i8] c"<Y: %p>\00"
@.str.1 = [8 x i8] c"[Y: %d]\00"
define void @routineY(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 0, i32* %3
br label %5
5: ; preds = %1, %5
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%9 = call i32 @cmt_wait(i32 150)
br label %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"<Y: %p>\00"
@.str.1 = [8 x i8] c"[Y: %d]\00"
define void @routineY(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ %10, %5 ], [ 0, %1 ]
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%9 = call i32 @cmt_wait(i32 150)
%10 = load i32, i32* %2
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ RadioComBridgeStatsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void RadioComBridgeStatsRequestUpdate() {
  UAVObjRequestUpdate(RadioComBridgeStatsHandle());
}


x86 assembly (clang, -O0):
<RadioComBridgeStatsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <RadioComBridgeStatsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RadioComBridgeStatsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <RadioComBridgeStatsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @RadioComBridgeStatsRequestUpdate() {
%1 = call i32 (...) @RadioComBridgeStatsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @RadioComBridgeStatsRequestUpdate() {
%1 = tail call i32 (...) @RadioComBridgeStatsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funcao();
int main() {
  for (int i = 0; i < 10; ++i)
    funcao();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <funcao@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funcao()
%2 = tail call i32 (...) @funcao()
%3 = tail call i32 (...) @funcao()
%4 = tail call i32 (...) @funcao()
%5 = tail call i32 (...) @funcao()
%6 = tail call i32 (...) @funcao()
%7 = tail call i32 (...) @funcao()
%8 = tail call i32 (...) @funcao()
%9 = tail call i32 (...) @funcao()
%10 = tail call i32 (...) @funcao()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void perror_exit(const char *info) {
  perror(info);
  exit(-1);
}


x86 assembly (clang, -O0):
<perror_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<perror_exit>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @perror_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @perror_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
long unset_mark(long);
long get_unmarked_ref(long w) { return unset_mark(w); }


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

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

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

LLVM IR (-O2):
define i64 @get_unmarked_ref(i64 %0) {
%2 = tail call i64 @unset_mark(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ I2C_noack();
unsigned char I2C_read();
int /*<<< orphan*/ I2C_start();
int /*<<< orphan*/ I2C_stop();
int /*<<< orphan*/ I2C_write(int);
unsigned char EEPROM_get(unsigned int addr) {
  unsigned char dat;
  I2C_start();
  I2C_write(0xA0);
  I2C_write(addr & 0xF0);
  I2C_write(addr & 0x0F);
  I2C_start();
  I2C_write(0xA0 + 1);
  dat = I2C_read();
  I2C_noack();
  I2C_stop();
  return dat;
}


x86 assembly (clang, -O0):
<EEPROM_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1060 <I2C_start@plt>
mov    $0xa0,%edi
call   1070 <I2C_write@plt>
mov    -0x4(%rbp),%edi
and    $0xf0,%edi
call   1070 <I2C_write@plt>
mov    -0x4(%rbp),%edi
and    $0xf,%edi
call   1070 <I2C_write@plt>
mov    $0x0,%al
call   1060 <I2C_start@plt>
mov    $0xa1,%edi
call   1070 <I2C_write@plt>
mov    $0x0,%al
call   1050 <I2C_read@plt>
mov    %al,-0x5(%rbp)
mov    $0x0,%al
call   1030 <I2C_noack@plt>
mov    $0x0,%al
call   1040 <I2C_stop@plt>
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROM_get>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1060 <I2C_start@plt>
mov    $0xa0,%edi
call   1070 <I2C_write@plt>
mov    %ebx,%edi
and    $0xf0,%edi
call   1070 <I2C_write@plt>
and    $0xf,%ebx
mov    %ebx,%edi
call   1070 <I2C_write@plt>
xor    %eax,%eax
call   1060 <I2C_start@plt>
mov    $0xa1,%edi
call   1070 <I2C_write@plt>
xor    %eax,%eax
call   1050 <I2C_read@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <I2C_noack@plt>
xor    %eax,%eax
call   1040 <I2C_stop@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @EEPROM_get(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = call i32 (...) @I2C_start()
%5 = call i32 @I2C_write(i32 160)
%6 = load i32, i32* %2
%7 = and i32 %6, 240
%8 = call i32 @I2C_write(i32 %7)
%9 = load i32, i32* %2
%10 = and i32 %9, 15
%11 = call i32 @I2C_write(i32 %10)
%12 = call i32 (...) @I2C_start()
%13 = call i32 @I2C_write(i32 161)
%14 = call zeroext i8 (...) @I2C_read()
store i8 %14, i8* %3
%15 = call i32 (...) @I2C_noack()
%16 = call i32 (...) @I2C_stop()
%17 = load i8, i8* %3
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @EEPROM_get(i32 %0) {
%2 = tail call i32 (...) @I2C_start()
%3 = tail call i32 @I2C_write(i32 160)
%4 = and i32 %0, 240
%5 = tail call i32 @I2C_write(i32 %4)
%6 = and i32 %0, 15
%7 = tail call i32 @I2C_write(i32 %6)
%8 = tail call i32 (...) @I2C_start()
%9 = tail call i32 @I2C_write(i32 161)
%10 = tail call zeroext i8 (...) @I2C_read()
%11 = tail call i32 (...) @I2C_noack()
%12 = tail call i32 (...) @I2C_stop()
ret i8 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int IPC_CREAT;
int /*<<< orphan*/ createKey();
int shmget(int /*<<< orphan*/, size_t, int);
int createShm(size_t size, int permission) {
  int result = -1;
  int shmid;
  key_t key = createKey();
  if (-1 != (shmid = shmget(key, size, permission | IPC_CREAT)))
    result = shmid;
  return result;
}


x86 assembly (clang, -O0):
<createShm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    $0x0,%al
call   1030 <createKey@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    0x2e8f(%rip),%rax
or     (%rax),%edx
call   1040 <shmget@plt>
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
mov    $0xffffffff,%eax
cmp    %ecx,%eax
je     1170 <createShm+0x50>
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createShm>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <createKey@plt>
mov    0x2ea9(%rip),%rcx
or     (%rcx),%ebx
mov    %eax,%edi
mov    %r14,%rsi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <shmget@plt>

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

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @createShm(i64 %0, i32 %1) {
%3 = tail call i32 (...) @createKey()
%4 = load i32, i32* @IPC_CREAT
%5 = or i32 %4, %1
%6 = tail call i32 @shmget(i32 %3, i64 %0, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ARC4_LOCK_();
int /*<<< orphan*/ ARC4_UNLOCK_();
int arc4_stir();
int arc4random_stir(void) {
  int val;
  ARC4_LOCK_();
  val = arc4_stir();
  ARC4_UNLOCK_();
  return val;
}


x86 assembly (clang, -O0):
<arc4random_stir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <ARC4_LOCK_@plt>
mov    $0x0,%al
call   1030 <arc4_stir@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <ARC4_UNLOCK_@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc4random_stir>:
push   %rbx
xor    %eax,%eax
call   1040 <ARC4_LOCK_@plt>
xor    %eax,%eax
call   1030 <arc4_stir@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <ARC4_UNLOCK_@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @arc4random_stir() {
%1 = alloca i32
%2 = call i32 (...) @ARC4_LOCK_()
%3 = call i32 (...) @arc4_stir()
store i32 %3, i32* %1
%4 = call i32 (...) @ARC4_UNLOCK_()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @arc4random_stir() {
%1 = tail call i32 (...) @ARC4_LOCK_()
%2 = tail call i32 (...) @arc4_stir()
%3 = tail call i32 (...) @ARC4_UNLOCK_()
ret i32 %2
}
/* Variables and functions */
scalar_t__ coin();
int *dynCastToInt(void *);
void testBranch(void *p) {
  int *casted;
  if (coin()) {
    casted = dynCastToInt(p);
  } else {
    if (p)
      return;
    casted = (int *)p;
  }
  *casted = 1;
}


x86 assembly (clang, -O0):
<testBranch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <coin@plt>
cmp    $0x0,%rax
je     114f <testBranch+0x2f>
mov    -0x8(%rbp),%rdi
call   1040 <dynCastToInt@plt>
mov    %rax,-0x10(%rbp)
jmp    1167 <testBranch+0x47>
cmpq   $0x0,-0x8(%rbp)
je     115f <testBranch+0x3f>
jmp    1171 <testBranch+0x51>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBranch>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <coin@plt>
test   %rax,%rax
je     113e <testBranch+0x1e>
mov    %rbx,%rdi
call   1040 <dynCastToInt@plt>
movl   $0x1,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @testBranch(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i64 (...) @coin()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32* @dynCastToInt(i8* %7)
store i32* %8, i32** %3
br label %16
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %9
br label %18
13: ; preds = %9
%14 = load i8*, i8** %2
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %3
br label %16
16: ; preds = %13, %6
%17 = load i32*, i32** %3
store i32 1, i32* %17
br label %18
18: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
define void @testBranch(i8* %0) {
%2 = tail call i64 (...) @coin()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32* @dynCastToInt(i8* %0)
store i32 1, i32* %5
br label %8
6: ; preds = %1
%7 = icmp ne i8* %0, null
tail call void @llvm.assume(i1 %7)
br label %8
8: ; preds = %6, %4
ret void
}
unsigned int multiple(unsigned int x, unsigned int f) {
  return ((x + (f - 1)) / f);
}


x86 assembly (clang, -O0):
<multiple>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiple>:
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i32 @multiple(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 = sub i32 %6, 1
%8 = add i32 %5, %7
%9 = load i32, i32* %4
%10 = udiv i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @multiple(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = udiv i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  float f = 1.0;
  int *ptr;
  ptr = (int *)&f;
  printf("%x", *ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec3(%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    $0x3f800000,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%x\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32*
store i32 0, i32* %1
store float 1.000000e+00, float* %2
%4 = bitcast float* %2 to i32*
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1065353216)
ret i32 0
}
/* Variables and functions */
int random();
int randrange(int lower, int higher) {
  return random() % ((higher - lower) + 1) + lower;
}


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

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

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

LLVM IR (-O2):
define i32 @randrange(i32 %0, i32 %1) {
%3 = tail call i32 (...) @random()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
int hash(int data, int divident) { return data % divident; }


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

x86 assembly (clang, -O2):
<hash>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hash(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 = srem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @hash(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sha1_init();
void crypt_init(void) {
  sha1_init();
  return;
}


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

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

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

LLVM IR (-O2):
define void @crypt_init() {
%1 = tail call i32 (...) @sha1_init()
ret void
}
double c4(float x, unsigned char y, int z) { return z ? x + x : y; }


x86 assembly (clang, -O0):
<c4>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
movss  %xmm0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1130 <c4+0x30>
movss  -0x4(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    113d <c4+0x3d>
movzbl -0x5(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<c4>:
test   %esi,%esi
je     110d <c4+0xd>
addss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
ret
xorps  %xmm0,%xmm0
cvtsi2ss %edi,%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @c4(float %0, i8 zeroext %1, i32 %2) {
%4 = alloca float
%5 = alloca i8
%6 = alloca i32
store float %0, float* %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load float, float* %4
%11 = load float, float* %4
%12 = fadd float %10, %11
br label %17
13: ; preds = %3
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = sitofp i32 %15 to float
br label %17
17: ; preds = %13, %9
%18 = phi float [ %12, %9 ], [ %16, %13 ]
%19 = fpext float %18 to double
ret double %19
}

LLVM IR (-O2):
define double @c4(float %0, i8 zeroext %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = fadd float %0, %0
%6 = uitofp i8 %1 to float
%7 = select i1 %4, float %6, float %5
%8 = fpext float %7 to double
ret double %8
}
int HelpItem69(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem69() {
ret i32 0
}
/* Variables and functions */
int optncc(int);
int optnccf(int *n) {
  int optn;
  optn = optncc(*n);
  return optn;
}


x86 assembly (clang, -O0):
<optnccf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <optncc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<optnccf>:
mov    (%rdi),%edi
jmp    1030 <optncc@plt>

LLVM IR (-O0):
define i32 @optnccf(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @optncc(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @optnccf(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @optncc(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __debugbreak();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello world\n");
  int x = 42;
  __debugbreak();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <__debugbreak@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 42, i32* %1
%3 = call i32 (...) @__debugbreak()
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @__debugbreak()
ret i32 0
}
void XtDestroyGC() {}


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

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

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

LLVM IR (-O2):
define void @XtDestroyGC() {
ret void
}
/* Variables and functions */
void ft_bzero(void *s, size_t n) {
  char *dest;
  int i;
  dest = (char *)s;
  i = 0;
  while (n != 0) {
    dest[i] = 0;
    i++;
    n--;
  }
}


x86 assembly (clang, -O0):
<ft_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <ft_bzero+0x4c>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    111b <ft_bzero+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_bzero>:
test   %rsi,%rsi
je     1124 <ft_bzero+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @ft_bzero(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_break();
int /*<<< orphan*/ write_line(char *);
void html_list(void) {
  write_break();
  write_line("<DL COMPACT>");
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"<DL COMPACT>\00"
define void @html_list() {
%1 = call i32 (...) @write_break()
%2 = call i32 @write_line(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<DL COMPACT>\00"
define void @html_list() {
%1 = tail call i32 (...) @write_break()
%2 = tail call i32 @write_line(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
int do_858() { return 858; }


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

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

LLVM IR (-O0):
define i32 @do_858() {
ret i32 858
}

LLVM IR (-O2):
define i32 @do_858() {
ret i32 858
}
void OpenSSL_add_all_algorithms(void) {}


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

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

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

LLVM IR (-O2):
define void @OpenSSL_add_all_algorithms() {
ret void
}
void dm_ima_reset_data(struct mapped_device *md) {}


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

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

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

LLVM IR (-O2):
%struct.mapped_device = type opaque
define void @dm_ima_reset_data(%struct.mapped_device* nocapture %0) {
ret void
}
int word_size(char const *s, int i, char c) {
  int len;
  len = 0;
  while (s[i + len] != c) {
    if (s[i + len] == '\0')
      break;
    len++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<word_size>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0xd(%rbp),%ecx
cmp    %ecx,%eax
je     1161 <word_size+0x61>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1153 <word_size+0x53>
jmp    1161 <word_size+0x61>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <word_size+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_size>:
movslq %esi,%rsi
add    %rdi,%rsi
mov    $0xffffffff,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%eax
cmp    %dl,%cl
je     1122 <word_size+0x22>
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <word_size+0x10>
ret

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

LLVM IR (-O2):
define i32 @word_size(i8* nocapture %0, i32 %1, i8 signext %2) {
%4 = sext i32 %1 to i64
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %13, %5 ], [ 0, %3 ]
%7 = add nsw i64 %6, %4
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %2
%11 = icmp eq i8 %9, 0
%12 = or i1 %10, %11
%13 = add nuw i64 %6, 1
br i1 %12, label %14, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
ret i32 %15
}
/* Variables and functions */
char *escape_field(char *);
char *timlib_escape_field(char *source_destination) {
  return escape_field(source_destination);
}


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

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

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

LLVM IR (-O2):
define i8* @timlib_escape_field(i8* %0) {
%2 = tail call i8* @escape_field(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_loadl_pd(int /*<<< orphan*/, void *);
__m128d test_mm_loadl_pd(__m128d x, void *y) { return _mm_loadl_pd(x, y); }


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

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

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

LLVM IR (-O2):
define i32 @test_mm_loadl_pd(i32 %0, i8* %1) {
%3 = tail call i32 @_mm_loadl_pd(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
long hv_generic(int, unsigned long);
long h_free_logical_lan(unsigned long unit_address) {
  return hv_generic(0x118, unit_address);
}


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

x86 assembly (clang, -O2):
<h_free_logical_lan>:
mov    %rdi,%rsi
mov    $0x118,%edi
jmp    1030 <hv_generic@plt>

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

LLVM IR (-O2):
define i64 @h_free_logical_lan(i64 %0) {
%2 = tail call i64 @hv_generic(i32 280, i64 %0)
ret i64 %2
}
/* Variables and functions */
int scroll1(void *, int /*<<< orphan*/);
int scroll(void *v) { return scroll1(v, 0); }


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

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

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

LLVM IR (-O2):
define i32 @scroll(i8* %0) {
%2 = tail call i32 @scroll1(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int MB_CUR_MAX;
int isu8cont(unsigned char c) {
  return MB_CUR_MAX > 1 && (c & (0x80 | 0x40)) == 0x80;
}


x86 assembly (clang, -O0):
<isu8cont>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
mov    0x2ee5(%rip),%rcx
cmpl   $0x1,(%rcx)
mov    %al,-0x2(%rbp)
jle    1133 <isu8cont+0x33>
movzbl -0x1(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isu8cont>:
mov    0x2ef1(%rip),%rax
cmpl   $0x2,(%rax)
setge  %al
and    $0xc0,%dil
cmp    $0x80,%dil
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
@MB_CUR_MAX = global i32 0
define i32 @isu8cont(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i32, i32* @MB_CUR_MAX
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = and i32 %7, 192
%9 = icmp eq i32 %8, 128
br label %10
10: ; preds = %5, %1
%11 = phi i1 [ false, %1 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@MB_CUR_MAX = global i32 0
define i32 @isu8cont(i8 zeroext %0) {
%2 = load i32, i32* @MB_CUR_MAX
%3 = icmp sgt i32 %2, 1
%4 = and i8 %0, -64
%5 = icmp eq i8 %4, -128
%6 = and i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
int bla_check_bcast_duplist(struct bat_priv *bat_priv,
                            struct bcast_packet *bcast_packet, int hdr_size) {
  return 0;
}


x86 assembly (clang, -O0):
<bla_check_bcast_duplist>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.bat_priv = type opaque
%struct.bcast_packet = type opaque
define i32 @bla_check_bcast_duplist(%struct.bat_priv* nocapture readnone %0, %struct.bcast_packet* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef size_t off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
size_t lseek(int, size_t, int /*<<< orphan*/);
off_t fileLength(int hFile) {
  off_t length;
  off_t currentPosition;
  currentPosition = lseek(hFile, (size_t)0, SEEK_CUR);
  length = lseek(hFile, (size_t)0, SEEK_END);
  lseek(hFile, currentPosition, SEEK_SET);
  return (length);
}


x86 assembly (clang, -O0):
<fileLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <lseek@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <lseek@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileLength>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %rax,%r14
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %rax,%r15
mov    0x2e8a(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <lseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fileLength(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* @SEEK_CUR
%7 = call i64 @lseek(i32 %5, i64 0, i32 %6)
store i64 %7, i64* %4
%8 = load i32, i32* %2
%9 = load i32, i32* @SEEK_END
%10 = call i64 @lseek(i32 %8, i64 0, i32 %9)
store i64 %10, i64* %3
%11 = load i32, i32* %2
%12 = load i64, i64* %4
%13 = load i32, i32* @SEEK_SET
%14 = call i64 @lseek(i32 %11, i64 %12, i32 %13)
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fileLength(i32 %0) {
%2 = load i32, i32* @SEEK_CUR
%3 = tail call i64 @lseek(i32 %0, i64 0, i32 %2)
%4 = load i32, i32* @SEEK_END
%5 = tail call i64 @lseek(i32 %0, i64 0, i32 %4)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i64 @lseek(i32 %0, i64 %3, i32 %6)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ enable_PLL();
int /*<<< orphan*/ write_ZIGBEE_long(int, int);
int /*<<< orphan*/ write_ZIGBEE_short(int, int);
void init_ZIGBEE_basic() {
  write_ZIGBEE_short(0x18, 0x98);
  write_ZIGBEE_short(0x2E, 0x95);
  write_ZIGBEE_long(0x201, 0x01);
  enable_PLL();
  write_ZIGBEE_long(0x206, 0x90);
  write_ZIGBEE_long(0x207, 0x80);
  write_ZIGBEE_long(0x208, 0x10);
  write_ZIGBEE_long(0x220, 0x21);
}


x86 assembly (clang, -O0):
<init_ZIGBEE_basic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
mov    $0x98,%esi
call   1030 <write_ZIGBEE_short@plt>
mov    $0x2e,%edi
mov    $0x95,%esi
call   1030 <write_ZIGBEE_short@plt>
mov    $0x201,%edi
mov    $0x1,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x0,%al
call   1040 <enable_PLL@plt>
mov    $0x206,%edi
mov    $0x90,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x207,%edi
mov    $0x80,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x208,%edi
mov    $0x10,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x220,%edi
mov    $0x21,%esi
call   1050 <write_ZIGBEE_long@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_ZIGBEE_basic>:
push   %rax
mov    $0x18,%edi
mov    $0x98,%esi
call   1030 <write_ZIGBEE_short@plt>
mov    $0x2e,%edi
mov    $0x95,%esi
call   1030 <write_ZIGBEE_short@plt>
mov    $0x201,%edi
mov    $0x1,%esi
call   1050 <write_ZIGBEE_long@plt>
xor    %eax,%eax
call   1040 <enable_PLL@plt>
mov    $0x206,%edi
mov    $0x90,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x207,%edi
mov    $0x80,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x208,%edi
mov    $0x10,%esi
call   1050 <write_ZIGBEE_long@plt>
mov    $0x220,%edi
mov    $0x21,%esi
pop    %rax
jmp    1050 <write_ZIGBEE_long@plt>

LLVM IR (-O0):
define void @init_ZIGBEE_basic() {
%1 = call i32 @write_ZIGBEE_short(i32 24, i32 152)
%2 = call i32 @write_ZIGBEE_short(i32 46, i32 149)
%3 = call i32 @write_ZIGBEE_long(i32 513, i32 1)
%4 = call i32 (...) @enable_PLL()
%5 = call i32 @write_ZIGBEE_long(i32 518, i32 144)
%6 = call i32 @write_ZIGBEE_long(i32 519, i32 128)
%7 = call i32 @write_ZIGBEE_long(i32 520, i32 16)
%8 = call i32 @write_ZIGBEE_long(i32 544, i32 33)
ret void
}

LLVM IR (-O2):
define void @init_ZIGBEE_basic() {
%1 = tail call i32 @write_ZIGBEE_short(i32 24, i32 152)
%2 = tail call i32 @write_ZIGBEE_short(i32 46, i32 149)
%3 = tail call i32 @write_ZIGBEE_long(i32 513, i32 1)
%4 = tail call i32 (...) @enable_PLL()
%5 = tail call i32 @write_ZIGBEE_long(i32 518, i32 144)
%6 = tail call i32 @write_ZIGBEE_long(i32 519, i32 128)
%7 = tail call i32 @write_ZIGBEE_long(i32 520, i32 16)
%8 = tail call i32 @write_ZIGBEE_long(i32 544, i32 33)
ret void
}
unsigned long long decode_base256(const unsigned char *buffer) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @decode_base256(i8* nocapture readnone %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printSeq(int, int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int k, n;
  scanf("%d%d", &n, &k);
  char arr[k];
  printSeq(n, k, 0, arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <printSeq@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
lea    0xed3(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <printSeq@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %2)
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %4
%10 = alloca i8, i64 %8
store i64 %8, i64* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = call i32 @printSeq(i32 %11, i32 %12, i32 0, i8* %10)
store i32 0, i32* %1
%14 = load i8*, i8** %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %1)
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
%9 = alloca i8, i64 %7
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = call i32 @printSeq(i32 %10, i32 %11, i32 0, i8* %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 'A';
  int b = 'a';
  while (a <= 'Z' && b <= 'z') {
    printf("%c-%c\n", a, b);
    a++;
    b++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x41,-0x8(%rbp)
movl   $0x61,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x5a,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jg     1146 <main+0x36>
cmpl   $0x7a,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1156 <main+0x46>
jmp    117f <main+0x6f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x41,%ebx
lea    0xee0(%rip),%r14
lea    0x20(%rbx),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x5b,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%c-%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 65, i32* %2
store i32 97, i32* %3
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 90
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 122
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ false, %4 ], [ %9, %7 ]
br i1 %11, label %12, label %20
12: ; preds = %10
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c-%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 97, %0 ], [ %6, %1 ]
%3 = phi i32 [ 65, %0 ], [ %5, %1 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %2)
%5 = add nuw nsw i32 %3, 1
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 123
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
unsigned short int f22(unsigned short int x, long int y) {
  return (x >> ((-y) & (8 * 2 - 1))) ^ (x << y);
}


x86 assembly (clang, -O0):
<f22>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f22>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f22(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub nsw i64 0, %7
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
%11 = ashr i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = shl i32 %13, %15
%17 = xor i32 %11, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f22(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 15
%7 = lshr i32 %3, %6
%8 = shl i32 %3, %4
%9 = xor i32 %7, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}