xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CheckedCommand(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                  char *, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int GetTextSize(FILE *p_cmd, FILE *p_res, int i_overlay) {
  int i_size;
  CheckedCommand(p_cmd, p_res, "GetTextSize %d\n", i_overlay);
  fscanf(p_res, "%d", &i_size);
  return i_size;
}


x86 assembly (clang, -O0):
<GetTextSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
lea    0xebb(%rip),%rdx
call   1040 <CheckedCommand@plt>
mov    -0x10(%rbp),%rdi
lea    0xebb(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <fscanf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTextSize>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ecx
mov    %rsi,%rbx
lea    0xecf(%rip),%rdx
call   1040 <CheckedCommand@plt>
lea    0xed3(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <fscanf@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"GetTextSize %d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @GetTextSize(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 @CheckedCommand(i32* %0, i32* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @fscanf(i32* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%8 = load i32, i32* %4
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ kprintf(char *, unsigned int);
int partC(int);
int partB(int k) {
  int l = 101;
  kprintf("In b, local var l is at 0x%x\r\n", (unsigned int)&l);
  kprintf("In b, param k is at 0x%x\r\n", (unsigned int)&k);
  return partC(l);
}


x86 assembly (clang, -O0):
<partB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x65,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1040 <kprintf@plt>
lea    -0x4(%rbp),%rax
mov    %eax,%esi
lea    0xece(%rip),%rdi
call   1040 <kprintf@plt>
mov    -0x8(%rbp),%edi
call   1030 <partC@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<partB>:
push   %rax
mov    %edi,0x4(%rsp)
movl   $0x65,(%rsp)
mov    %rsp,%rsi
lea    0xeca(%rip),%rdi
call   1040 <kprintf@plt>
lea    0x4(%rsp),%rsi
lea    0xed8(%rip),%rdi
call   1040 <kprintf@plt>
mov    (%rsp),%edi
call   1030 <partC@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"In b, local var l is at 0x%x\0D\0A\00"
@.str.1 = [27 x i8] c"In b, param k is at 0x%x\0D\0A\00"
define i32 @partB(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 101, i32* %3
%4 = ptrtoint i32* %3 to i32
%5 = call i32 @kprintf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = ptrtoint i32* %2 to i32
%7 = call i32 @kprintf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @partC(i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [31 x i8] c"In b, local var l is at 0x%x\0D\0A\00"
@.str.1 = [27 x i8] c"In b, param k is at 0x%x\0D\0A\00"
define i32 @partB(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
store i32 101, i32* %3
%5 = ptrtoint i32* %3 to i64
%6 = trunc i64 %5 to i32
%7 = call i32 @kprintf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = ptrtoint i32* %2 to i64
%9 = trunc i64 %8 to i32
%10 = call i32 @kprintf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @partC(i32 %11)
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fen_board(char *);
void init_board() {
  fen_board("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\00"
define void @init_board() {
%1 = call i32 @fen_board(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\00"
define void @init_board() {
%1 = tail call i32 @fen_board(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}
int breakpoint3(void) {
  return breakpoint2(__builtin_frame_address(0));
  asm volatile("pc = $\n\t.codetextlabel .Lbp3\n\t>>4;\n\trp = fp|1; break "
               "mainloop;\n\t.codetextlabeldef .Lbp3");
  asmjs_breakpoint();
  return 0;
}


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

x86 assembly (clang, -O2):
<breakpoint3>:
push   %rbp
mov    %rsp,%rbp
mov    %rbp,%rdi
xor    %eax,%eax
pop    %rbp
jmp    1030 <breakpoint2@plt>

LLVM IR (-O0):
define i32 @breakpoint3() {
%1 = call i8* @llvm.frameaddress.p0i8(i32 0)
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @breakpoint2 to i32 (i8*, ...)*)(i8* %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @breakpoint3() {
%1 = tail call i8* @llvm.frameaddress.p0i8(i32 0)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @breakpoint2 to i32 (i8*, ...)*)(i8* %1)
ret i32 %2
}
int juniper_fpga_num_partitions(int devNo) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @juniper_fpga_num_partitions(i32 %0) {
ret i32 4
}
double theLawOfBode(int i) {
  int b[8] = {1, 3, 6, 12, 24, 48, 96, 192};
  if (i > 1)
    return (4.0 + b[i - 1]) / 10.0;
  else
    return (0.5);
}


x86 assembly (clang, -O0):
<theLawOfBode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    0xf12(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xf0f(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xf0c(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xf09(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    116d <theLawOfBode+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
cvtsi2sdl -0x30(%rbp,%rax,4),%xmm1
movsd  0xebd(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xea9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <theLawOfBode+0x7a>
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<theLawOfBode>:
cmp    $0x2,%edi
jl     1125 <theLawOfBode+0x25>
add    $0xffffffff,%edi
lea    0xf11(%rip),%rax
cvtsi2sdl (%rax,%rdi,4),%xmm0
addsd  0xeec(%rip),%xmm0
divsd  0xeec(%rip),%xmm0
ret
movsd  0xed3(%rip),%xmm0
ret

LLVM IR (-O0):
@__const.theLawOfBode.b = [8 x i32] [i32 1, i32 3, i32 6, i32 12, i32 24, i32 48, i32 96, i32 192]
define double @theLawOfBode(i32 %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca [8 x i32]
store i32 %0, i32* %3
%5 = bitcast [8 x i32]* %4 to i8*
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = sitofp i32 %13 to double
%15 = fadd double 4.000000e+00, %14
%16 = fdiv double %15, 1.000000e+01
store double %16, double* %2
br label %18
17: ; preds = %1
store double 5.000000e-01, double* %2
br label %18
18: ; preds = %17, %8
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
@__const.theLawOfBode.b = [8 x i32] [i32 1, i32 3, i32 6, i32 12, i32 24, i32 48, i32 96, i32 192]
define double @theLawOfBode(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [8 x i32], [8 x i32]* @__const.theLawOfBode.b, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = fadd double %8, 4.000000e+00
%10 = fdiv double %9, 1.000000e+01
br label %11
11: ; preds = %1, %3
%12 = phi double [ %10, %3 ], [ 5.000000e-01, %1 ]
ret double %12
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
double *make1Darray(int len) {
  double *array = (double *)malloc(len * sizeof(double));
  if (array == NULL) {
    printf("make1Darray failed in malloc");
  }
  return array;
}


x86 assembly (clang, -O0):
<make1Darray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <make1Darray+0x35>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make1Darray>:
push   %rbx
shl    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113d <make1Darray+0x1d>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"make1Darray failed in malloc\00"
define double* @make1Darray(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to double*
store double* %9, double** %3
%10 = load double*, double** %3
%11 = icmp eq double* %10, null
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %1
%15 = load double*, double** %3
ret double* %15
}

LLVM IR (-O2):
@.str = [29 x i8] c"make1Darray failed in malloc\00"
define double* @make1Darray(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = inttoptr i64 %3 to double*
ret double* %8
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ out;

/* Variables and functions */
uint32_t TO_LE32(uint32_t in) {
  uint32_t out = 0;
  unsigned char *pout = (unsigned char *)&out;
  int i;
  for (i = 0; i < sizeof(out); ++i, in >>= 8)
    pout[i] = in & 0xff;
  return out;
}


x86 assembly (clang, -O0):
<TO_LE32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x4,%rax
jae    1157 <TO_LE32+0x57>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    111d <TO_LE32+0x1d>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TO_LE32>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @TO_LE32(i32 %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ RunAllTests(int);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (argc > 1 && !strcmp(argv[1], "long"))
    RunAllTests(1);
  else
    RunAllTests(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    116c <main+0x4c>
mov    $0x1,%edi
call   1030 <RunAllTests@plt>
jmp    1173 <main+0x53>
xor    %edi,%edi
call   1030 <RunAllTests@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     113a <main+0x1a>
mov    0x8(%rsi),%rdi
lea    0xecf(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     113e <main+0x1e>
xor    %edi,%edi
jmp    1143 <main+0x23>
mov    $0x1,%edi
call   1030 <RunAllTests@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"long\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @strcmp(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %8
%15 = call i32 @RunAllTests(i32 1)
br label %18
16: ; preds = %8, %2
%17 = call i32 @RunAllTests(i32 0)
br label %18
18: ; preds = %16, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"long\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %4, %2
br label %10
10: ; preds = %4, %9
%11 = phi i32 [ 0, %9 ], [ 1, %4 ]
%12 = tail call i32 @RunAllTests(i32 %11)
ret i32 0
}
/* Variables and functions */
int get_bits(size_t);
unsigned get_exp_golomb_bits() {
  size_t leading_zeros = 0;
  while (get_bits(1) == 0)
    leading_zeros++;
  return (1 << leading_zeros) - 1 + get_bits(leading_zeros);
}


x86 assembly (clang, -O0):
<get_exp_golomb_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <get_bits@plt>
cmp    $0x0,%eax
jne    1144 <get_exp_golomb_bits+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <get_exp_golomb_bits+0x10>
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_bits@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_exp_golomb_bits>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <get_bits@plt>
add    $0x1,%rbx
test   %eax,%eax
je     1120 <get_exp_golomb_bits+0x10>
mov    $0xffffffff,%ebp
mov    %ebx,%ecx
shl    %cl,%ebp
not    %ebp
mov    %rbx,%rdi
call   1030 <get_bits@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_exp_golomb_bits() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %5, %0
%3 = call i32 @get_bits(i64 1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i64, i64* %1
%7 = add i64 %6, 1
store i64 %7, i64* %1
br label %2
8: ; preds = %2
%9 = load i64, i64* %1
%10 = trunc i64 %9 to i32
%11 = shl i32 1, %10
%12 = sub nsw i32 %11, 1
%13 = load i64, i64* %1
%14 = call i32 @get_bits(i64 %13)
%15 = add nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_exp_golomb_bits() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @get_bits(i64 1)
%4 = icmp eq i32 %3, 0
%5 = add i64 %2, 1
br i1 %4, label %1, label %6
6: ; preds = %1
%7 = trunc i64 %2 to i32
%8 = shl nsw i32 -1, %7
%9 = xor i32 %8, -1
%10 = tail call i32 @get_bits(i64 %2)
%11 = add nsw i32 %10, %9
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ foo(int);
int main(void) {
  if (sizeof(int) == sizeof(short))
    return 0;
  foo(-1);
  if (sizeof(short) > 1)
    bar(-1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1040 <foo@plt>
mov    $0xffffffff,%edi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 -1)
%2 = tail call i32 @bar(i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void free_ivector(int *v, long nl, long nh) { free(v + nl - 1); }


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

x86 assembly (clang, -O2):
<free_ivector>:
lea    (%rdi,%rsi,4),%rdi
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i32, i32* %7, i64 %8
%10 = getelementptr inbounds i32, i32* %9, i64 -1
%11 = call i32 @free(i32* %10)
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = getelementptr inbounds i32, i32* %4, i64 -1
%6 = tail call i32 @free(i32* %5)
ret void
}
void caller_2_1_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_2_2_1_1_1() {
ret void
}
void c_pomp_parallel_end_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_parallel_end_(%struct.ompregdescr* nocapture %0) {
ret void
}
__attribute__((always_)) void IOPinClear(int PortNo, int PinNo) {}


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

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

LLVM IR (-O0):
define void @IOPinClear(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @IOPinClear(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
char *my_malloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
scalar_t__ strlen(char *);
char *fullpath(char *s, char *q) {
  char *rv = my_malloc(strlen(s) + strlen(q) + 2);
  sprintf(rv, "%s/%s", s, q);
  return rv;
}


x86 assembly (clang, -O0):
<fullpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x2,%rdi
call   1030 <my_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe83(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fullpath>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x2,%rdi
call   1030 <my_malloc@plt>
mov    %rax,%rbx
lea    0xe9b(%rip),%rsi
mov    %rax,%rdi
mov    %r12,%rdx
mov    %r14,%rcx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @fullpath(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 2
%12 = call i8* @my_malloc(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %14, i8* %15)
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @fullpath(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 2
%6 = add i64 %5, %4
%7 = tail call i8* @my_malloc(i64 %6)
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %7
}
_Complex float test_csqrtf(_Complex float x) { return __builtin_csqrtf(x); }


x86 assembly (clang, -O0):
<test_csqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <csqrtf@plt>
movlpd %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define <2 x float> @test_csqrtf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%12 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %8, float* %11
store float %10, float* %12
%13 = bitcast { float, float }* %4 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = call <2 x float> @csqrtf(<2 x float> %14)
%16 = bitcast { float, float }* %5 to <2 x float>*
store <2 x float> %15, <2 x float>* %16
%17 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%18 = load float, float* %17
%19 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%22 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %18, float* %21
store float %20, float* %22
%23 = bitcast { float, float }* %2 to <2 x float>*
%24 = load <2 x float>, <2 x float>* %23
ret <2 x float> %24
}

LLVM IR (-O2):
define <2 x float> @test_csqrtf(<2 x float> %0) {
%2 = tail call <2 x float> @csqrtf(<2 x float> %0)
ret <2 x float> %2
}
int start_book_refresh(struct feed_group *const group) {
  if (group) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<start_book_refresh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1118 <start_book_refresh+0x18>
jmp    1118 <start_book_refresh+0x18>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.feed_group = type opaque
define i32 @start_book_refresh(%struct.feed_group* %0) {
%2 = alloca %struct.feed_group*
store %struct.feed_group* %0, %struct.feed_group** %2
%3 = load %struct.feed_group*, %struct.feed_group** %2
%4 = icmp ne %struct.feed_group* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret i32 0
}

LLVM IR (-O2):
%struct.feed_group = type opaque
define i32 @start_book_refresh(%struct.feed_group* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int func2();
int main() {
  if (func2() != 4) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <func2@plt>
cmp    $0x4,%eax
je     113b <main+0x1b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <func2@plt>
cmp    $0x4,%eax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func2()
%2 = icmp eq i32 %1, 4
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
int openReadDirect(char *, int);
int mcfioC_OpenReadMapped(char *filename) {
  return openReadDirect(filename, 3);
}


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

x86 assembly (clang, -O2):
<mcfioC_OpenReadMapped>:
mov    $0x3,%esi
jmp    1030 <openReadDirect@plt>

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

LLVM IR (-O2):
define i32 @mcfioC_OpenReadMapped(i8* %0) {
%2 = tail call i32 @openReadDirect(i8* %0, i32 3)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *emalloc(size_t nbytes) {
  void *newmem;
  if ((newmem = malloc(nbytes)) == NULL) {
    fprintf(stderr, "Err: memory allocation failed\n");
    exit(EXIT_FAILURE);
  }
  return newmem;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1176 <emalloc+0x46>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <emalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Err: memory allocation failed\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @emalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Err: memory allocation failed\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @emalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned int x = 0xDEADBEEF;
  unsigned int y = 0xDABBAD00;
  assert((x | y) == 0xDEBFBFEF);
  assert((x & y) == 0xDAA9AC00);
  assert((x ^ y) == 0x041613EF);
  assert(~x == 0x21524110);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xdeadbeef,-0x8(%rbp)
movl   $0xdabbad00,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
cmp    $0xdebfbfef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0xdaa9ac00,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
cmp    $0x41613ef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x21524110,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -559038737, i32* %2
store i32 -625234688, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = or i32 %4, %5
%7 = icmp eq i32 %6, -557858833
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = and i32 %10, %11
%13 = icmp eq i32 %12, -626414592
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = xor i32 %16, %17
%19 = icmp eq i32 %18, 68555759
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load i32, i32* %2
%23 = xor i32 %22, -1
%24 = icmp eq i32 %23, 559038736
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
float powf(float, double);
float gamma_709_b(float a) {
  return (a <= 0.081) ? a / 4.5 : powf((a + 0.099) / 1.099, 1.0 / 0.45);
}


x86 assembly (clang, -O0):
<gamma_709_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1157 <gamma_709_b+0x47>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1192 <gamma_709_b+0x82>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe84(%rip),%xmm1
call   1030 <powf@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_709_b>:
push   %rax
cvtss2sd %xmm0,%xmm0
movsd  0xee3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    114a <gamma_709_b+0x3a>
addsd  0xee5(%rip),%xmm0
divsd  0xee5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xee1(%rip),%xmm1
call   1030 <powf@plt>
cvtss2sd %xmm0,%xmm0
jmp    1152 <gamma_709_b+0x42>
divsd  0xeb6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gamma_709_b(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ole double %4, 8.100000e-02
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fdiv double %8, 4.500000e+00
br label %18
10: ; preds = %1
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fadd double %12, 9.900000e-02
%14 = fdiv double %13, 1.099000e+00
%15 = fptrunc double %14 to float
%16 = call float @powf(float %15, double 0x4001C71C71C71C72)
%17 = fpext float %16 to double
br label %18
18: ; preds = %10, %6
%19 = phi double [ %9, %6 ], [ %17, %10 ]
%20 = fptrunc double %19 to float
ret float %20
}

LLVM IR (-O2):
define float @gamma_709_b(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt double %2, 8.100000e-02
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = fdiv double %2, 4.500000e+00
br label %12
6: ; preds = %1
%7 = fadd double %2, 9.900000e-02
%8 = fdiv double %7, 1.099000e+00
%9 = fptrunc double %8 to float
%10 = tail call float @powf(float %9, double 0x4001C71C71C71C72)
%11 = fpext float %10 to double
br label %12
12: ; preds = %6, %4
%13 = phi double [ %5, %4 ], [ %11, %6 ]
%14 = fptrunc double %13 to float
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void vetFree(int **V) { free(*V); }


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

x86 assembly (clang, -O2):
<vetFree>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @vetFree(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @free(i32* %2)
ret void
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_args_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_args(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_args_rec(lexbuf, 2);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <Cyc_args_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_args>:
mov    $0x2,%esi
jmp    1030 <Cyc_args_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_args(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_args_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 2)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_args(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_args_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int via_vt823x_gpio_set(int, int);
int /*<<< orphan*/ w836xx_memw_enable(int);
int board_msi_kt4v(void) {
  int ret;
  ret = via_vt823x_gpio_set(12, 1);
  w836xx_memw_enable(0x2E);
  return ret;
}


x86 assembly (clang, -O0):
<board_msi_kt4v>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <via_vt823x_gpio_set@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2e,%edi
call   1030 <w836xx_memw_enable@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_msi_kt4v>:
push   %rbx
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <via_vt823x_gpio_set@plt>
mov    %eax,%ebx
mov    $0x2e,%edi
call   1030 <w836xx_memw_enable@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @board_msi_kt4v() {
%1 = alloca i32
%2 = call i32 @via_vt823x_gpio_set(i32 12, i32 1)
store i32 %2, i32* %1
%3 = call i32 @w836xx_memw_enable(i32 46)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @board_msi_kt4v() {
%1 = tail call i32 @via_vt823x_gpio_set(i32 12, i32 1)
%2 = tail call i32 @w836xx_memw_enable(i32 46)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void word_print_cb(const char *text) { printf("Word: \"%s\"\n", text); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Word: \22%s\22\0A\00"
define void @word_print_cb(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void DMSG(unsigned int level, const char *format, ...) {}


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

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

LLVM IR (-O0):
define void @DMSG(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @DMSG(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcasecmp(char const *, char const *);
int keyval_match(const char *key1, const char *key2) {
  return !strcasecmp(key1, key2);
}


x86 assembly (clang, -O0):
<keyval_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @keyval_match(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcasecmp(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @keyval_match(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ gt_ht_finalize3_u32(int /*<<< orphan*/, int /*<<< orphan*/,
                                       int /*<<< orphan*/);
uint32_t gt_ht_finalize2_u32(uint32_t a, uint32_t b) {
  return gt_ht_finalize3_u32(a, b, 0);
}


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

x86 assembly (clang, -O2):
<gt_ht_finalize2_u32>:
xor    %edx,%edx
jmp    1030 <gt_ht_finalize3_u32@plt>

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

LLVM IR (-O2):
define i32 @gt_ht_finalize2_u32(i32 %0, i32 %1) {
%3 = tail call i32 @gt_ht_finalize3_u32(i32 %0, i32 %1, i32 0)
ret i32 %3
}
int CentreY(int y, char *str) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CentreY(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
int srAr(int arg1, int arg2) { return (arg1 + arg2) / 2; }


x86 assembly (clang, -O0):
<srAr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<srAr>:
lea    (%rdi,%rsi,1),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @srAr(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 = add nsw i32 %5, %6
%8 = sdiv i32 %7, 2
ret i32 %8
}

LLVM IR (-O2):
define i32 @srAr(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}
void setbit(unsigned int *map, int bit) {
  unsigned int v = map[bit / (sizeof(unsigned int) * 8)];
  int m = 1 << (bit % (sizeof(unsigned int) * 8));
  map[bit / (sizeof(unsigned int) * 8)] = v | m;
}


x86 assembly (clang, -O0):
<setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x5,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
movslq -0xc(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edx
or     -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x5,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbit>:
movslq %esi,%rcx
mov    %rcx,%rax
mov    $0x1,%edx
shl    %cl,%edx
shr    $0x5,%rax
or     %edx,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @setbit(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = lshr i64 %3, 5
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = and i32 %1, 31
%8 = shl nuw i32 1, %7
%9 = or i32 %6, %8
store i32 %9, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ drv_FW8888_send_cmd(int);
void __attribute__((unused)) drv_FW8888_home(void) {
  drv_FW8888_send_cmd(0x02);
}


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

x86 assembly (clang, -O2):
<drv_FW8888_home>:
mov    $0x2,%edi
jmp    1030 <drv_FW8888_send_cmd@plt>

LLVM IR (-O0):
define void @drv_FW8888_home() {
%1 = call i32 @drv_FW8888_send_cmd(i32 2)
ret void
}

LLVM IR (-O2):
define void @drv_FW8888_home() {
%1 = tail call i32 @drv_FW8888_send_cmd(i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/ const, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_set1_epi32(int);
int /*<<< orphan*/ _mm_srai_epi32(int /*<<< orphan*/ const, int);
__m128i dct_const_round_shift_sse2(const __m128i in) {
  const __m128i t = _mm_add_epi32(in, _mm_set1_epi32((1 << (14 - 1))));
  return _mm_srai_epi32(t, 14);
}


x86 assembly (clang, -O0):
<dct_const_round_shift_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x2000,%edi
call   1050 <_mm_set1_epi32@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0xe,%esi
call   1040 <_mm_srai_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dct_const_round_shift_sse2>:
push   %rbx
mov    %edi,%ebx
mov    $0x2000,%edi
call   1050 <_mm_set1_epi32@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%edi
mov    $0xe,%esi
pop    %rbx
jmp    1040 <_mm_srai_epi32@plt>

LLVM IR (-O0):
define i32 @dct_const_round_shift_sse2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @_mm_set1_epi32(i32 8192)
%6 = call i32 @_mm_add_epi32(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @_mm_srai_epi32(i32 %7, i32 14)
ret i32 %8
}

LLVM IR (-O2):
define i32 @dct_const_round_shift_sse2(i32 %0) {
%2 = tail call i32 @_mm_set1_epi32(i32 8192)
%3 = tail call i32 @_mm_add_epi32(i32 %0, i32 %2)
%4 = tail call i32 @_mm_srai_epi32(i32 %3, i32 14)
ret i32 %4
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t EPINonBlockingReadAvail(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(ui32Base + 0x0000006C))));
}


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

x86 assembly (clang, -O2):
<EPINonBlockingReadAvail>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x6c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @EPINonBlockingReadAvail(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 108
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @EPINonBlockingReadAvail(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 108
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}