xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Msp430AlarmC__0__Msp430Compare__fired();
void Msp430TimerCapComP__3__Compare__fired(void) {
  Msp430AlarmC__0__Msp430Compare__fired();
}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__3__Compare__fired() {
%1 = tail call i32 (...) @Msp430AlarmC__0__Msp430Compare__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchr(char);
void bell() { putchr('\7'); }


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

x86 assembly (clang, -O2):
<bell>:
mov    $0x7,%edi
jmp    1030 <putchr@plt>

LLVM IR (-O0):
define void @bell() {
%1 = call i32 @putchr(i8 signext 7)
ret void
}

LLVM IR (-O2):
define void @bell() {
%1 = tail call i32 @putchr(i8 signext 7)
ret void
}
/* Variables and functions */
void *a4(int);
void *a3(int x) { return (((x >> 3) & 1) ? a4(x) : a4(x)); }


x86 assembly (clang, -O0):
<a3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113e <a3+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <a4@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <a3+0x3a>
mov    -0x4(%rbp),%edi
call   1030 <a4@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @a3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 3
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i8* @a4(i32 %8)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i8* @a4(i32 %11)
br label %13
13: ; preds = %10, %7
%14 = phi i8* [ %9, %7 ], [ %12, %10 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @a3(i32 %0) {
%2 = tail call i8* @a4(i32 %0)
ret i8* %2
}
unsigned short SwapEndianS(unsigned short s) {
  char *ch = (char *)&s, tmp;
  {
    tmp = ch[0];
    ch[0] = ch[1];
    ch[1] = tmp;
  };
  return s;
}


x86 assembly (clang, -O0):
<SwapEndianS>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x2(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapEndianS>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @SwapEndianS(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i8
store i16 %0, i16* %2
%5 = bitcast i16* %2 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
store i8 %8, i8* %4
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 %11, i8* %13
%14 = load i8, i8* %4
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i16, i16* %2
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @SwapEndianS(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ gzFile;

/* Variables and functions */
int /*<<< orphan*/ ConvertToFloat(unsigned char *, float *);
int gzread(int /*<<< orphan*/, unsigned char *, int);
int ConvertReadFloatZ(gzFile file, float *val) {
  unsigned char tmp[4];
  if (gzread(file, tmp, 4) != 4)
    return -1;
  ConvertToFloat(tmp, val);
  return 0;
}


x86 assembly (clang, -O0):
<ConvertReadFloatZ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
call   1040 <gzread@plt>
cmp    $0x4,%eax
je     1155 <ConvertReadFloatZ+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <ConvertReadFloatZ+0x49>
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ConvertToFloat@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertReadFloatZ>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1040 <gzread@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x4,%ecx
jne    1152 <ConvertReadFloatZ+0x32>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <ConvertToFloat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ConvertReadFloatZ(i32 %0, float* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float*
%6 = alloca [4 x i8]
store i32 %0, i32* %4
store float* %1, float** %5
%7 = load i32, i32* %4
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%9 = call i32 @gzread(i32 %7, i8* %8, i32 4)
%10 = icmp ne i32 %9, 4
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %16
12: ; preds = %2
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%14 = load float*, float** %5
%15 = call i32 @ConvertToFloat(i8* %13, float* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @ConvertReadFloatZ(i32 %0, float* %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @gzread(i32 %0, i8* %4, i32 4)
%6 = icmp eq i32 %5, 4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @ConvertToFloat(i8* %4, float* %1)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %10
}
void RTProcTerminate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTProcTerminate() {
ret void
}
int test_imm_E9uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xE9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E9uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0xe9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E9uint64_highword_reg>:
movabs $0xe900000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E9uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 1000727379968
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ console_puts(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void console_cur_left(int n) {
  char buf[32] = "\033[D";
  if (n)
    snprintf(buf, sizeof(buf), "\033[%dD", n);
  console_puts(buf);
}


x86 assembly (clang, -O0):
<console_cur_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1179 <console_cur_left+0x59>
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x20,%esi
lea    0xeac(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <console_puts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_cur_left>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
test   %edi,%edi
je     1155 <console_cur_left+0x35>
mov    %edi,%ecx
lea    0xed8(%rip),%rdx
mov    %rsp,%rdi
mov    $0x20,%esi
call   1040 <snprintf@plt>
mov    %rsp,%rdi
call   1030 <console_puts@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.console_cur_left.buf = [32 x i8] c"\1B[D\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"\1B[%dD\00"
define void @console_cur_left(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i8]
store i32 %0, i32* %2
%4 = bitcast [32 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @snprintf(i8* %8, i32 32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%13 = call i32 @console_puts(i8* %12)
ret void
}

LLVM IR (-O2):
@__const.console_cur_left.buf = [32 x i8] c"\1B[D\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"\1B[%dD\00"
define void @console_cur_left(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @snprintf(i8* %3, i32 32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %5, %1
%8 = call i32 @console_puts(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ to_point(int /*<<< orphan*/, int);
int /*<<< orphan*/ turn_player(int /*<<< orphan*/);
int turn_up() {
  turn_player(to_point(0, 1));
  return 1;
}


x86 assembly (clang, -O0):
<turn_up>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <to_point@plt>
mov    %eax,%edi
call   1030 <turn_player@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_up>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <to_point@plt>
mov    %eax,%edi
call   1030 <turn_player@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @turn_up() {
%1 = call i32 @to_point(i32 0, i32 1)
%2 = call i32 @turn_player(i32 %1)
ret i32 1
}

LLVM IR (-O2):
define i32 @turn_up() {
%1 = tail call i32 @to_point(i32 0, i32 1)
%2 = tail call i32 @turn_player(i32 %1)
ret i32 1
}
/* Variables and functions */
unsigned char keyboard_getData();
unsigned char keyboard_getStatus();
unsigned char ps2aux_getData() {
  unsigned char status;
  while (1) {
    status = keyboard_getStatus();
    if (status & 0x01) {
      if (status & 0x20)
        break;
      else
        keyboard_getData();
    }
  }
  return keyboard_getData();
}


x86 assembly (clang, -O0):
<ps2aux_getData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <keyboard_getStatus@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1163 <ps2aux_getData+0x43>
movzbl -0x1(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1157 <ps2aux_getData+0x37>
jmp    1168 <ps2aux_getData+0x48>
mov    $0x0,%al
call   1040 <keyboard_getData@plt>
jmp    1163 <ps2aux_getData+0x43>
jmp    1128 <ps2aux_getData+0x8>
mov    $0x0,%al
call   1040 <keyboard_getData@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2aux_getData>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <keyboard_getStatus@plt>
test   $0x1,%al
je     1130 <ps2aux_getData+0x10>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <keyboard_getData@plt>
test   $0x20,%bl
je     1130 <ps2aux_getData+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @ps2aux_getData() {
%1 = alloca i8
br label %2
2: ; preds = %0, %17
%3 = call zeroext i8 (...) @keyboard_getStatus()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i8, i8* %1
%10 = zext i8 %9 to i32
%11 = and i32 %10, 32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %18
14: ; preds = %8
%15 = call zeroext i8 (...) @keyboard_getData()
br label %16
16: ; preds = %14
br label %17
17: ; preds = %16, %2
br label %2
18: ; preds = %13
%19 = call zeroext i8 (...) @keyboard_getData()
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @ps2aux_getData() {
br label %1
1: ; preds = %10, %0
%2 = tail call zeroext i8 (...) @keyboard_getStatus()
%3 = zext i8 %2 to i32
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = and i32 %3, 32
%8 = icmp eq i32 %7, 0
%9 = tail call zeroext i8 (...) @keyboard_getData()
br i1 %8, label %10, label %11
10: ; preds = %6, %1
br label %1
11: ; preds = %6
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int rem(void *e) {
  free(e);
  return 1;
}


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

x86 assembly (clang, -O2):
<rem>:
push   %rax
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @rem(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 1
}
int fun586() { return 586; }


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

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

LLVM IR (-O0):
define i32 @fun586() {
ret i32 586
}

LLVM IR (-O2):
define i32 @fun586() {
ret i32 586
}
int test_imm_C8int16_mem(short *val) {
  return ((*val) & (-0xC8 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C8int16_mem>:
movzwl (%rdi),%eax
test   $0xff38,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C8int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -200
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ POLLOUT;
int poll_one(int, int /*<<< orphan*/, int);
int send_wait(int fd, int timeout_ms) {
  return poll_one(fd, POLLOUT, timeout_ms);
}


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

x86 assembly (clang, -O2):
<send_wait>:
mov    %esi,%edx
mov    0x2edf(%rip),%rax
mov    (%rax),%esi
jmp    1030 <poll_one@plt>

LLVM IR (-O0):
@POLLOUT = global i32 0
define i32 @send_wait(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @POLLOUT
%7 = load i32, i32* %4
%8 = call i32 @poll_one(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@POLLOUT = global i32 0
define i32 @send_wait(i32 %0, i32 %1) {
%3 = load i32, i32* @POLLOUT
%4 = tail call i32 @poll_one(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void compare_release_data(void *data) { free(data); }


x86 assembly (clang, -O0):
<compare_release_data>:
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):
<compare_release_data>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @compare_release_data(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, int /*<<< orphan*/ *);
int main() {
  char *argv[2];
  argv[0] = "/usr/bin/env";
  argv[1] = NULL;
  execve("/usr/bin/env", argv, NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/usr/bin/env\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8*]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 1
store i8* null, i8** %4
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%6 = call i32 @execve(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %5, i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"/usr/bin/env\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %4
%5 = call i32 @execve(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %3, i32* null)
ret i32 0
}
/* Variables and functions */
int read(int, int *, int);
int read_int4_array(int f, int *iarray, int n) {
  int nread = read(f, iarray, 4 * n);
  if (nread <= 0)
    return 0;
  return nread / 4;
}


x86 assembly (clang, -O0):
<read_int4_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
shl    $0x2,%edx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jg     114d <read_int4_array+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    115b <read_int4_array+0x4b>
mov    -0x18(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int4_array>:
push   %rax
shl    $0x2,%edx
call   1030 <read@plt>
test   %eax,%eax
jle    112c <read_int4_array+0x1c>
mov    %eax,%ecx
lea    0x3(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read_int4_array(i32 %0, i32* nocapture %1, i32 %2) {
%4 = shl nsw i32 %2, 2
%5 = tail call i32 @read(i32 %0, i32* %1, i32 %4)
%6 = sdiv i32 %5, 4
%7 = icmp sgt i32 %5, 0
%8 = select i1 %7, i32 %6, i32 0
ret i32 %8
}
int foo(int *a) { *a = *a * 2 + 1; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl nsw i32 %2, 1
%4 = or i32 %3, 1
store i32 %4, i32* %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ do_sleep(int);
void do_sleep_rrobin(int id, int turn, int rrobin, int delay) {
  if (rrobin) {
    if ((turn + id) % 2)
      do_sleep(delay);
  } else {
    do_sleep(delay);
  }
}


x86 assembly (clang, -O0):
<do_sleep_rrobin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1152 <do_sleep_rrobin+0x42>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     114d <do_sleep_rrobin+0x3d>
mov    -0x10(%rbp),%edi
call   1030 <do_sleep@plt>
jmp    115a <do_sleep_rrobin+0x4a>
mov    -0x10(%rbp),%edi
call   1030 <do_sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_sleep_rrobin>:
test   %edx,%edx
je     111d <do_sleep_rrobin+0xd>
add    %edi,%esi
test   $0x1,%sil
jne    111d <do_sleep_rrobin+0xd>
ret
mov    %ecx,%edi
jmp    1030 <do_sleep@plt>

LLVM IR (-O0):
define void @do_sleep_rrobin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %4
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = srem i32 %14, 2
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = load i32, i32* %8
%19 = call i32 @do_sleep(i32 %18)
br label %20
20: ; preds = %17, %11
br label %24
21: ; preds = %4
%22 = load i32, i32* %8
%23 = call i32 @do_sleep(i32 %22)
br label %24
24: ; preds = %21, %20
ret void
}

LLVM IR (-O2):
define void @do_sleep_rrobin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %2, 0
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = add nsw i32 %1, %0
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %4, %6
%11 = tail call i32 @do_sleep(i32 %3)
br label %12
12: ; preds = %10, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
scalar_t__ realloc(char *, int);
void reallocDiagnostics() {
  char *buf = malloc(100);
  char *tmp;
  tmp = (char *)realloc(buf, 0x1000000);
  if (!tmp) {
    return;
  }
  buf = tmp;
  free(buf);
}


x86 assembly (clang, -O0):
<reallocDiagnostics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1000000,%esi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1168 <reallocDiagnostics+0x38>
jmp    1179 <reallocDiagnostics+0x49>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocDiagnostics>:
push   %rax
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    $0x1000000,%esi
call   1050 <realloc@plt>
test   %rax,%rax
je     1156 <reallocDiagnostics+0x26>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @reallocDiagnostics() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 100)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i64 @realloc(i8* %4, i32 16777216)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %0
br label %14
10: ; preds = %0
%11 = load i8*, i8** %2
store i8* %11, i8** %1
%12 = load i8*, i8** %1
%13 = call i32 @free(i8* %12)
br label %14
14: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @reallocDiagnostics() {
%1 = tail call dereferenceable_or_null(100) i8* @malloc(i32 100)
%2 = tail call i64 @realloc(i8* %1, i32 16777216)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = inttoptr i64 %2 to i8*
%6 = tail call i32 @free(i8* %5)
br label %7
7: ; preds = %0, %4
ret void
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int);
void basBitwiseAnd() {
  int a, b;
  a = popNumber();
  b = popNumber();
  pushNumber(a & b);
}


x86 assembly (clang, -O0):
<basBitwiseAnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    -0x8(%rbp),%edi
call   1030 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basBitwiseAnd>:
push   %rbx
xor    %eax,%eax
call   1040 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <popNumber@plt>
and    %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basBitwiseAnd() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @popNumber()
store i32 %3, i32* %1
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = and i32 %5, %6
%8 = call i32 @pushNumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @basBitwiseAnd() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = and i32 %2, %1
%4 = tail call i32 @pushNumber(i32 %3)
ret void
}
int fun457() { return 457; }


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

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

LLVM IR (-O0):
define i32 @fun457() {
ret i32 457
}

LLVM IR (-O2):
define i32 @fun457() {
ret i32 457
}
/* Variables and functions */
int /*<<< orphan*/ sync();
int fsync(int fd) { sync(); }


x86 assembly (clang, -O0):
<fsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <sync@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fsync(i32 %0) {
%2 = tail call i32 (...) @sync()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, long);
void compress(unsigned char *output, long *output_size, unsigned char *input,
              long insize) {
  *output_size = insize;
  memcpy(output, input, insize * sizeof(unsigned char));
}


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

x86 assembly (clang, -O2):
<compress>:
mov    %rcx,(%rsi)
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @compress(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = mul i64 %13, 1
%15 = call i32 @memcpy(i8* %11, i8* %12, i64 %14)
ret void
}

LLVM IR (-O2):
define void @compress(i8* %0, i64* nocapture writeonly %1, i8* %2, i64 %3) {
store i64 %3, i64* %1
%5 = tail call i32 @memcpy(i8* %0, i8* %2, i64 %3)
ret void
}
void tr_onArrayComplete(char *name) { ; }


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

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

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

LLVM IR (-O2):
define void @tr_onArrayComplete(i8* nocapture %0) {
ret void
}
/* Variables and functions */
bool nrf91_errata_28(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf91_errata_28() {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
void *funk_note_on() {
  int *ip = (int *)malloc(sizeof(int));
  *ip = 0;
  return (void *)ip;
}


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

x86 assembly (clang, -O2):
<funk_note_on>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x0,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @funk_note_on() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 0, i32* %4
%5 = load i32*, i32** %1
%6 = bitcast i32* %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @funk_note_on() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 0, i32* %2
%3 = inttoptr i64 %1 to i8*
ret i8* %3
}
__attribute__((no)) unsigned int rosbg_si_sll(unsigned int a, unsigned int b) {
  return a | (b << 1);
}


x86 assembly (clang, -O0):
<rosbg_si_sll>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rosbg_si_sll>:
lea    (%rsi,%rsi,1),%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @rosbg_si_sll(i32 %0, i32 %1) {
%3 = shl i32 %1, 1
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
void *inc_x(void *x_void_ptr) {
  int *x_ptr = (int *)x_void_ptr;
  while (++(*x_ptr) < 100)
    ;
  return NULL;
}


x86 assembly (clang, -O0):
<inc_x>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    (%rcx),%eax
add    $0x1,%eax
mov    %eax,(%rcx)
cmp    $0x64,%eax
jge    1129 <inc_x+0x29>
jmp    1110 <inc_x+0x10>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inc_x>:
mov    (%rdi),%eax
cmp    $0x64,%eax
mov    $0x63,%ecx
cmovge %eax,%ecx
add    $0x1,%ecx
mov    %ecx,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @inc_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = call i32 @llvm.smax.i32(i32 %3, i32 99)
%5 = add nuw i32 %4, 1
store i32 %5, i32* %2
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ pop_dependency();
void free_dependencies(int ndependencies) {
  int i;
  for (i = 0; i < ndependencies; i++) {
    pop_dependency();
  }
}


x86 assembly (clang, -O0):
<free_dependencies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1143 <free_dependencies+0x33>
mov    $0x0,%al
call   1030 <pop_dependency@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <free_dependencies+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_dependencies>:
push   %rbx
test   %edi,%edi
jle    112c <free_dependencies+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pop_dependency@plt>
add    $0xffffffff,%ebx
jne    1120 <free_dependencies+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @free_dependencies(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 (...) @pop_dependency()
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void _E__pr_info_header_wofn(char const *msg) {
  (void)fflush(stderr);
  (void)fprintf(stderr, "%s:\t", msg);
}


x86 assembly (clang, -O0):
<_E__pr_info_header_wofn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_E__pr_info_header_wofn>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
call   1040 <fflush@plt>
mov    (%r14),%edi
lea    0xec0(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s:\09\00"
define void @_E__pr_info_header_wofn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s:\09\00"
define void @_E__pr_info_header_wofn(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fflush(i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_ContentDirectory_StopTransferResource(void *);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPContentDirectory_StopTransferResource(void *upnptoken,
                                               unsigned int TransferID) {
  printf("Invoke: UPnPContentDirectory_StopTransferResource(%u);\r\n",
         TransferID);
  UPnPResponse_ContentDirectory_StopTransferResource(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPContentDirectory_StopTransferResource>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UPnPResponse_ContentDirectory_StopTransferResource@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPContentDirectory_StopTransferResource>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_ContentDirectory_StopTransferResource@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"Invoke: UPnPContentDirectory_StopTransferResource(%u);\0D\0A\00"
define void @UPnPContentDirectory_StopTransferResource(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_ContentDirectory_StopTransferResource(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"Invoke: UPnPContentDirectory_StopTransferResource(%u);\0D\0A\00"
define void @UPnPContentDirectory_StopTransferResource(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_ContentDirectory_StopTransferResource(i8* %0)
ret void
}
int adis16060_configure_ring(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16060_configure_ring(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *fillstrx(char *, int, char);
char *strinit(char *target, int len, char datachar) {
  if (target == NULL)
    return NULL;
  target[0] = '\0';
  return fillstrx(target, len, datachar);
}


x86 assembly (clang, -O0):
<strinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %al,-0x15(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113c <strinit+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1157 <strinit+0x47>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
movsbl -0x15(%rbp),%edx
call   1030 <fillstrx@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strinit>:
test   %rdi,%rdi
je     1120 <strinit+0x10>
movb   $0x0,(%rdi)
movsbl %dl,%edx
jmp    1030 <fillstrx@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @strinit(i8* %0, i32 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8 %2, i8* %7
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %3
store i8* null, i8** %4
br label %18
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 0, i8* %13
%14 = load i8*, i8** %5
%15 = load i32, i32* %6
%16 = load i8, i8* %7
%17 = call i8* @fillstrx(i8* %14, i32 %15, i8 signext %16)
store i8* %17, i8** %4
br label %18
18: ; preds = %11, %10
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define i8* @strinit(i8* %0, i32 %1, i8 signext %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
store i8 0, i8* %0
%6 = tail call i8* @fillstrx(i8* %0, i32 %1, i8 signext %2)
br label %7
7: ; preds = %3, %5
%8 = phi i8* [ %6, %5 ], [ null, %3 ]
ret i8* %8
}
/* Variables and functions */
int write_block(int, int /*<<< orphan*/, int /*<<< orphan*/,
                int /*<<< orphan*/);
int right(void) { return write_block(100, 0, 0, 0); }


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_block@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
mov    $0x64,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <write_block@plt>

LLVM IR (-O0):
define i32 @right() {
%1 = call i32 @write_block(i32 100, i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @right() {
%1 = tail call i32 @write_block(i32 100, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ refresh();
int refresh_screen() {
  refresh();
  return 0;
  return -1;
}


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

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

LLVM IR (-O0):
define i32 @refresh_screen() {
%1 = call i32 (...) @refresh()
ret i32 0
}

LLVM IR (-O2):
define i32 @refresh_screen() {
%1 = tail call i32 (...) @refresh()
ret i32 0
}
f(int func()) { return func(); }


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

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
jmp    *%rdi

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

LLVM IR (-O2):
define i32 @f(i32 (...)* nocapture %0) {
%2 = tail call i32 (...) %0()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ stk500v2_ok();
void stk500v2_set_parameter(void) {
  ;
  stk500v2_ok();
}


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

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

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

LLVM IR (-O2):
define void @stk500v2_set_parameter() {
%1 = tail call i32 (...) @stk500v2_ok()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void vwarnx(const char *fmt, va_list ap) {
  vfprintf(stderr, fmt, ap);
  putc('\n', stderr);
}


x86 assembly (clang, -O0):
<vwarnx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vwarnx>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2eb3(%rip),%rbx
mov    (%rbx),%edi
call   1040 <vfprintf@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @vwarnx(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
%9 = load i32, i32* @stderr
%10 = call i32 @putc(i8 signext 10, i32 %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @vwarnx(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
%5 = load i32, i32* @stderr
%6 = tail call i32 @putc(i8 signext 10, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __p3dfft_MOD_p3dfft_get_blocksizes(int *, int *, int *,
                                                      int *);
void p3dfft_get_blocksizes(int *nbl_x, int *nbl_y, int *nb1, int *nb) {
  __p3dfft_MOD_p3dfft_get_blocksizes(nbl_x, nbl_y, nb1, nb);
}


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

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

LLVM IR (-O0):
define void @p3dfft_get_blocksizes(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 @__p3dfft_MOD_p3dfft_get_blocksizes(i32* %9, i32* %10, i32* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @p3dfft_get_blocksizes(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @__p3dfft_MOD_p3dfft_get_blocksizes(i32* %0, i32* %1, i32* %2, i32* %3)
ret void
}
int A_is_valid(c)
int c;
{ return (A_is_ok(c) && !A_is_special(c)); }


x86 assembly (clang, -O0):
<A_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <A_is_ok@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
je     115a <A_is_valid+0x3a>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <A_is_special@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A_is_valid>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <A_is_ok@plt>
test   %eax,%eax
je     1142 <A_is_valid+0x22>
mov    %ebp,%edi
xor    %eax,%eax
call   1040 <A_is_special@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @A_is_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @A_is_ok to i32 (i32, ...)*)(i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 (i32, ...) bitcast (i32 (...)* @A_is_special to i32 (i32, ...)*)(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @A_is_valid(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @A_is_ok to i32 (i32, ...)*)(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @A_is_special to i32 (i32, ...)*)(i32 %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}