xunge/DecIR huggingface dataset:
/* Variables and functions */
long double exp2l(long double);
double midi2freq(double midi, double a_freq) {
  return (double)((long double)a_freq *
                  exp2l((long double)(midi - 69.0) / (long double)12.0));
}


x86 assembly (clang, -O0):
<midi2freq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
fldl   -0x10(%rbp)
fstpt  -0x2c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
flds   0xec1(%rip)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <exp2l@plt>
fldt   -0x2c(%rbp)
fmulp  %st,%st(1)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midi2freq>:
sub    $0x28,%rsp
movsd  %xmm1,0x20(%rsp)
addsd  0xede(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
fldl   0x18(%rsp)
fdivs  0xed6(%rip)
fstpt  (%rsp)
call   1030 <exp2l@plt>
fmull  0x20(%rsp)
fstpl  0x10(%rsp)
movsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @midi2freq(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fpext double %5 to x86_fp80
%7 = load double, double* %3
%8 = fsub double %7, 6.900000e+01
%9 = fpext double %8 to x86_fp80
%10 = fdiv x86_fp80 %9, 0xK4002C000000000000000
%11 = call x86_fp80 @exp2l(x86_fp80 %10)
%12 = fmul x86_fp80 %6, %11
%13 = fptrunc x86_fp80 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @midi2freq(double %0, double %1) {
%3 = fpext double %1 to x86_fp80
%4 = fadd double %0, -6.900000e+01
%5 = fpext double %4 to x86_fp80
%6 = fdiv x86_fp80 %5, 0xK4002C000000000000000
%7 = tail call x86_fp80 @exp2l(x86_fp80 %6)
%8 = fmul x86_fp80 %7, %3
%9 = fptrunc x86_fp80 %8 to double
ret double %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int ts(int, int);
uint32_t inode_to_block(uint32_t inode_num) {
  uint32_t track, sector;
  track = (inode_num >> 16) & 0xff;
  sector = (inode_num >> 8) & 0xff;
  return ts(track, sector);
}


x86 assembly (clang, -O0):
<inode_to_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <ts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inode_to_block>:
mov    %edi,%eax
movzbl %ah,%esi
shr    $0x10,%eax
movzbl %al,%edi
jmp    1030 <ts@plt>

LLVM IR (-O0):
define i32 @inode_to_block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 16
%7 = and i32 %6, 255
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = ashr i32 %8, 8
%10 = and i32 %9, 255
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @ts(i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @inode_to_block(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 255
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = tail call i32 @ts(i32 %3, i32 %5)
ret i32 %6
}
unsigned int sa1100_pcmcia_cmd_time(unsigned int cpu_clock_khz,
                                    unsigned int pcmcia_mecr_bs) {
  return (((10000000 * 2) / cpu_clock_khz) * (3 * (pcmcia_mecr_bs + 1))) / 10;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1312d00,%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   $0x3,%ecx,%ecx
imul   %ecx,%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x1312d00,%eax
xor    %edx,%edx
div    %edi
lea    (%rsi,%rsi,2),%ecx
add    $0x3,%ecx
imul   %ecx,%eax
mov    $0xcccccccd,%ecx
imul   %rcx,%rax
shr    $0x23,%rax
ret

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

LLVM IR (-O2):
define i32 @sa1100_pcmcia_cmd_time(i32 %0, i32 %1) {
%3 = udiv i32 20000000, %0
%4 = mul i32 %1, 3
%5 = add i32 %4, 3
%6 = mul i32 %3, %5
%7 = udiv i32 %6, 10
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ put16(unsigned short);
int /*<<< orphan*/ put8(int);
void or_ax_imm16(unsigned short imm16) {
  put8(0x66);
  put8(0x0D);
  put16(imm16);
}


x86 assembly (clang, -O0):
<or_ax_imm16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0xd,%edi
call   1030 <put8@plt>
movzwl -0x2(%rbp),%edi
call   1040 <put16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_ax_imm16>:
push   %rbx
mov    %edi,%ebx
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0xd,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put16@plt>

LLVM IR (-O0):
define void @or_ax_imm16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @put8(i32 102)
%4 = call i32 @put8(i32 13)
%5 = load i16, i16* %2
%6 = call i32 @put16(i16 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @or_ax_imm16(i16 zeroext %0) {
%2 = tail call i32 @put8(i32 102)
%3 = tail call i32 @put8(i32 13)
%4 = tail call i32 @put16(i16 zeroext %0)
ret void
}
/* Variables and functions */
int htonl(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int ipcount = 0x01020304;
  int ipnet = htonl(ipcount);
  printf("old is :%#x\n", ipcount);
  printf("new is :%#x\n", ipnet);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1020304,%edi
call   1040 <htonl@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
mov    $0x1020304,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"old is :%#x\0A\00"
@.str.1 = [13 x i8] c"new is :%#x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 16909060, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @htonl(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"old is :%#x\0A\00"
@.str.1 = [13 x i8] c"new is :%#x\0A\00"
define i32 @main() {
%1 = tail call i32 @htonl(i32 16909060)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 16909060)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
void XBell() {}


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

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

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

LLVM IR (-O2):
define void @XBell() {
ret void
}
void DIRECTORYSTRING_new(void) {}


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

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

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

LLVM IR (-O2):
define void @DIRECTORYSTRING_new() {
ret void
}
void set_flag(unsigned int *p_flag, unsigned int opt) { *p_flag |= opt; }


x86 assembly (clang, -O0):
<set_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_flag>:
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @set_flag(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = or i32 %7, %5
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @set_flag(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = or i32 %3, %1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_help();
void cmd_help(void) { display_help(); }


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

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

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

LLVM IR (-O2):
define void @cmd_help() {
%1 = tail call i32 (...) @display_help()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double sqrt(double);
main() {
  int i = 9;
  double r = 0;
  r = sqrt((double)i / 2);
  printf("La raíz cuadrada es %g\n", r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x9,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"La ra\C3\ADz cuadrada es %g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 9, i32* %1
store double 0.000000e+00, double* %2
%3 = load i32, i32* %1
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 2.000000e+00
%6 = call double @sqrt(double %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"La ra\C3\ADz cuadrada es %g\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 0x4000F876CCDF6CD9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int ft_put_error(char *str) {
  int i;
  i = -1;
  while (str && str[++i])
    ;
  write(2, str, i);
  return (0);
}


x86 assembly (clang, -O0):
<ft_put_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1150 <ft_put_error+0x40>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1160 <ft_put_error+0x50>
jmp    1165 <ft_put_error+0x55>
jmp    1123 <ft_put_error+0x13>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x2,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_put_error>:
push   %rax
mov    %rdi,%rsi
mov    $0xffffffff,%edx
test   %rdi,%rdi
je     113c <ft_put_error+0x2c>
mov    %rsi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%edx
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1130 <ft_put_error+0x20>
mov    $0x2,%edi
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ft_put_error(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ -1, %1 ]
%5 = add nsw i64 %4, 1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %5 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ -1, %1 ], [ %10, %9 ]
%13 = tail call i32 @write(i32 2, i8* %0, i32 %12)
ret i32 0
}
/* Variables and functions */
int add(int, int);
int div(int, int);
int mult(int, int);
int /*<<< orphan*/ printf(char *, int);
int subt(int, int);
int main() {
  int result;
  result = add(6, 9);
  result = subt(result, 9);
  result = mult(result, 4);
  result = div(result, 5);
  printf("The result is %d.\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
mov    $0x9,%esi
call   1040 <add@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x9,%esi
call   1030 <subt@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
call   1060 <mult@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   1070 <div@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe55(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
mov    $0x9,%esi
call   1040 <add@plt>
mov    %eax,%edi
mov    $0x9,%esi
call   1030 <subt@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1060 <mult@plt>
mov    %eax,%edi
mov    $0x5,%esi
call   1070 <div@plt>
lea    0xe75(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"The result is %d.\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 6, i32 9)
%2 = tail call i32 @subt(i32 %1, i32 9)
%3 = tail call i32 @mult(i32 %2, i32 4)
%4 = tail call i32 @div(i32 %3, i32 5)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int test_imm_0Bint16_mem(short *val) {
  return ((*val) & (-0x0B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Bint16_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, -11
%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_0Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -11
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_mgmtframectrl_usage(void) {
  printf("\nUsage : mgmtframectrl [MASK]\n");
  printf("         empty - Get management frame control mask\n");
  printf("         MASK  - Set management frame control mask\n");
}


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

x86 assembly (clang, -O2):
<print_mgmtframectrl_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf21(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\0AUsage : mgmtframectrl [MASK]\0A\00"
@.str.1 = [52 x i8] c" empty - Get management frame control mask\0A\00"
@.str.2 = [52 x i8] c" MASK - Set management frame control mask\0A\00"
define void @print_mgmtframectrl_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"\0AUsage : mgmtframectrl [MASK]\00"
@str.3 = [51 x i8] c" empty - Get management frame control mask\00"
@str.4 = [51 x i8] c" MASK - Set management frame control mask\00"
define void @print_mgmtframectrl_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.4, i64 0, i64 0))
ret void
}
unsigned long NO_FLIP_ULONG(unsigned long pVar) { return pVar; }


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

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

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

LLVM IR (-O2):
define i64 @NO_FLIP_ULONG(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
char *heapdupstr(char const *);
char *heapdup(const char *s) {
  if (!s)
    die("HEAP dup(NULL)");
  return heapdupstr(s);
}


x86 assembly (clang, -O0):
<heapdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <heapdup+0x23>
lea    0xec2(%rip),%rdi
call   1030 <die@plt>
mov    -0x8(%rbp),%rdi
call   1040 <heapdupstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heapdup>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1135 <heapdup+0x15>
lea    0xed0(%rip),%rdi
call   1030 <die@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <heapdupstr@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"HEAP dup(NULL)\00"
define i8* @heapdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = call i8* @heapdupstr(i8* %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [15 x i8] c"HEAP dup(NULL)\00"
define i8* @heapdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @heapdupstr(i8* %0)
ret i8* %6
}
/* Variables and functions */
int cal_binary_search(void const *, void const *, size_t, size_t,
                      int (*)(void *, void const *, void const *), void *,
                      size_t *);
int calpriv_fbt_search_b_search(void *ctx, const void *key, const void *ptr,
                                size_t count, size_t size,
                                int (*cmp)(void *, const void *, const void *),
                                void *cmp_ctx, size_t *pos_out) {
  (void)ctx;
  return cal_binary_search(key, ptr, count, size, cmp, cmp_ctx, pos_out);
}


x86 assembly (clang, -O0):
<calpriv_fbt_search_b_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <cal_binary_search@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calpriv_fbt_search_b_search>:
push   %rax
mov    %r9,%rax
mov    %rsi,%rdi
mov    0x10(%rsp),%r9
mov    0x18(%rsp),%rsi
mov    %rsi,(%rsp)
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %rax,%r8
call   1030 <cal_binary_search@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @calpriv_fbt_search_b_search(i8* %0, i8* %1, i8* %2, i64 %3, i64 %4, i32 (i8*, i8*, i8*)* %5, i8* %6, i64* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32 (i8*, i8*, i8*)*
%15 = alloca i8*
%16 = alloca i64*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store i32 (i8*, i8*, i8*)* %5, i32 (i8*, i8*, i8*)** %14
store i8* %6, i8** %15
store i64* %7, i64** %16
%17 = load i8*, i8** %9
%18 = load i8*, i8** %10
%19 = load i8*, i8** %11
%20 = load i64, i64* %12
%21 = load i64, i64* %13
%22 = load i32 (i8*, i8*, i8*)*, i32 (i8*, i8*, i8*)** %14
%23 = load i8*, i8** %15
%24 = load i64*, i64** %16
%25 = call i32 @cal_binary_search(i8* %18, i8* %19, i64 %20, i64 %21, i32 (i8*, i8*, i8*)* %22, i8* %23, i64* %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @calpriv_fbt_search_b_search(i8* nocapture readnone %0, i8* %1, i8* %2, i64 %3, i64 %4, i32 (i8*, i8*, i8*)* %5, i8* %6, i64* %7) {
%9 = tail call i32 @cal_binary_search(i8* %1, i8* %2, i64 %3, i64 %4, i32 (i8*, i8*, i8*)* %5, i8* %6, i64* %7)
ret i32 %9
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  printf("Enter a number to find a factorial: ");
  scanf("%d", &n);
  printf("The factorial of %d is %d", n, fact(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fact@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <fact@plt>
lea    0xebf(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Enter a number to find a factorial: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"The factorial of %d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @fact(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Enter a number to find a factorial: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"The factorial of %d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fact(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
void release_ds_buffers(void) {}


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

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

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

LLVM IR (-O2):
define void @release_ds_buffers() {
ret void
}
void WideTimer5B_Handler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @WideTimer5B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned which_bit(const unsigned x) {
  const unsigned y = x & 7u;
  return (y - (y >> 2)) | ((x - 1) & 4u);
}


x86 assembly (clang, -O0):
<which_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    $0x2,%ecx
sub    %ecx,%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    $0x4,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<which_bit>:
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
mov    %ecx,%edx
shr    $0x2,%edx
sub    %edx,%ecx
and    $0x4,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @which_bit(i32 %0) {
%2 = and i32 %0, 7
%3 = lshr i32 %2, 2
%4 = sub nsw i32 %2, %3
%5 = add i32 %0, 7
%6 = and i32 %5, 4
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ deasplay_hal_cursor_visibility(int);
void display_enable_cursor(bool visible) {
  deasplay_hal_cursor_visibility(visible);
}


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

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

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

LLVM IR (-O2):
define void @display_enable_cursor(i32 %0) {
%2 = tail call i32 @deasplay_hal_cursor_visibility(i32 %0)
ret void
}
void ciidF(int x) { char *y = x; }


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

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

LLVM IR (-O0):
define void @ciidF(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
ret void
}

LLVM IR (-O2):
define void @ciidF(i32 %0) {
ret void
}
void cleanFilename(char *filename) {
  unsigned int i;
  for (i = 0;; i++) {
    if (filename[i] == '\r' || filename[i] == ' ') {
      filename[i] = '\0';
      return;
    } else if (filename[i] == '\0') {
      return;
    }
  }
}


x86 assembly (clang, -O0):
<cleanFilename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
je     1137 <cleanFilename+0x37>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1147 <cleanFilename+0x47>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
jmp    1178 <cleanFilename+0x78>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1160 <cleanFilename+0x60>
jmp    1178 <cleanFilename+0x78>
jmp    1165 <cleanFilename+0x65>
jmp    116a <cleanFilename+0x6a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <cleanFilename+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanFilename>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
je     112d <cleanFilename+0x2d>
cmp    $0x20,%dl
je     1129 <cleanFilename+0x29>
cmp    $0xd,%dl
je     1129 <cleanFilename+0x29>
add    $0x1,%eax
jmp    1110 <cleanFilename+0x10>
movb   $0x0,(%rdi,%rcx,1)
ret

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

LLVM IR (-O2):
define void @cleanFilename(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i32 [ 0, %1 ], [ %11, %10 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
switch i8 %6, label %10 [
i8 13, label %7
i8 32, label %7
i8 0, label %12
]
7: ; preds = %2, %2
%8 = zext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
br label %12
10: ; preds = %2
%11 = add i32 %3, 1
br label %2
12: ; preds = %2, %7
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int main() {
  volatile unsigned char *dataDirection_B = (unsigned char *)0b00100100;
  volatile unsigned char *portB = (unsigned char *)0b00100101;
  *dataDirection_B |= 0b00100000;
  while (1) {
    *portB ^= 0b00100000;
    uint16_t temp, newtemp;
    for (temp = 0; temp < 1000; temp++)
      for (newtemp = 0; newtemp < 1000; newtemp++) {
      }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x24,%eax
mov    %rax,-0x10(%rbp)
mov    $0x25,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
movzbl %cl,%ecx
or     $0x20,%ecx
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
movzbl %cl,%ecx
xor    $0x20,%ecx
mov    %cl,(%rax)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3e8,-0x1c(%rbp)
jge    1187 <main+0x87>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3e8,-0x20(%rbp)
jge    1174 <main+0x74>
jmp    1166 <main+0x66>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1154 <main+0x54>
jmp    1179 <main+0x79>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1140 <main+0x40>
jmp    112b <main+0x2b>

x86 assembly (clang, -O2):
<main>:
orb    $0x20,0x24
20
nopl   0x0(%rax,%rax,1)
xorb   $0x20,0x25
20
jmp    1110 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i8* inttoptr (i64 36 to i8*), i8** %2
store i8* inttoptr (i64 37 to i8*), i8** %3
%6 = load i8*, i8** %2
%7 = load volatile i8, i8* %6
%8 = zext i8 %7 to i32
%9 = or i32 %8, 32
%10 = trunc i32 %9 to i8
store volatile i8 %10, i8* %6
br label %11
11: ; preds = %0, %32
%12 = load i8*, i8** %3
%13 = load volatile i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %14, 32
%16 = trunc i32 %15 to i8
store volatile i8 %16, i8* %12
store i32 0, i32* %4
br label %17
17: ; preds = %29, %11
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 1000
br i1 %19, label %20, label %32
20: ; preds = %17
store i32 0, i32* %5
br label %21
21: ; preds = %25, %20
%22 = load i32, i32* %5
%23 = icmp slt i32 %22, 1000
br i1 %23, label %24, label %28
24: ; preds = %21
br label %25
25: ; preds = %24
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %21
28: ; preds = %21
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %17
32: ; preds = %17
br label %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = load volatile i8, i8* inttoptr (i64 36 to i8*)
%2 = or i8 %1, 32
store volatile i8 %2, i8* inttoptr (i64 36 to i8*)
br label %3
3: ; preds = %3, %0
%4 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%5 = xor i8 %4, 32
store volatile i8 %5, i8* inttoptr (i64 37 to i8*)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_system_from_baserock_get_string() {
  printf("test_system_from_baserock_get_string...");
  printf("Ok\n");
}


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

x86 assembly (clang, -O2):
<test_system_from_baserock_get_string>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [40 x i8] c"test_system_from_baserock_get_string...\00"
@str = [3 x i8] c"Ok\00"
define void @test_system_from_baserock_get_string() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
void *pop(void *arr) { return ((void **)arr)[(((int *)arr)[-1])--]; }


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rdx
mov    -0x4(%rdx),%ecx
mov    %ecx,%esi
add    $0xffffffff,%esi
mov    %esi,-0x4(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
movslq -0x4(%rdi),%rax
lea    -0x1(%rax),%ecx
mov    %ecx,-0x4(%rdi)
mov    (%rdi,%rax,8),%rax
ret

LLVM IR (-O0):
define i8* @pop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i8**
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 -1
%8 = load i32, i32* %7
%9 = add nsw i32 %8, -1
store i32 %9, i32* %7
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8*, i8** %4, i64 %10
%12 = load i8*, i8** %11
ret i8* %12
}

LLVM IR (-O2):
define i8* @pop(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = getelementptr inbounds i8, i8* %0, i64 -4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, -1
store i32 %6, i32* %4
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i8*, i8** %2, i64 %7
%9 = load i8*, i8** %8
ret i8* %9
}
void caam_debugfs_init(struct caam_drv_private *ctrlpriv, struct dentry *root) {
}


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

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

LLVM IR (-O0):
%struct.caam_drv_private = type opaque
%struct.dentry = type opaque
define void @caam_debugfs_init(%struct.caam_drv_private* %0, %struct.dentry* %1) {
%3 = alloca %struct.caam_drv_private*
%4 = alloca %struct.dentry*
store %struct.caam_drv_private* %0, %struct.caam_drv_private** %3
store %struct.dentry* %1, %struct.dentry** %4
ret void
}

LLVM IR (-O2):
%struct.caam_drv_private = type opaque
%struct.dentry = type opaque
define void @caam_debugfs_init(%struct.caam_drv_private* nocapture %0, %struct.dentry* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int cam_p_init(const char *preview_node) {
  int dev_fp = -1;
  dev_fp = open(preview_node, O_RDWR);
  if (dev_fp < 0) {
    perror(preview_node);
    return -1;
  }
  return dev_fp;
}


x86 assembly (clang, -O0):
<cam_p_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1167 <cam_p_init+0x47>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <cam_p_init+0x4d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cam_p_init>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
test   %eax,%eax
js     1138 <cam_p_init+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDWR = global i32 0
define i32 @cam_p_init(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 -1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDWR
%7 = call i32 @open(i8* %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @perror(i8* %11)
store i32 -1, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@O_RDWR = global i32 0
define i32 @cam_p_init(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ %3, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ time_clock_date_words();
int /*<<< orphan*/ time_clock_digital();
void time_update(void) {
  time_clock_digital();
  time_clock_date_words();
}


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

x86 assembly (clang, -O2):
<time_update>:
push   %rax
xor    %eax,%eax
call   1040 <time_clock_digital@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <time_clock_date_words@plt>

LLVM IR (-O0):
define void @time_update() {
%1 = call i32 (...) @time_clock_digital()
%2 = call i32 (...) @time_clock_date_words()
ret void
}

LLVM IR (-O2):
define void @time_update() {
%1 = tail call i32 (...) @time_clock_digital()
%2 = tail call i32 (...) @time_clock_date_words()
ret void
}
void insert_wat_namdbin(char *label, double *x, double *y, double *z) {}


x86 assembly (clang, -O0):
<insert_wat_namdbin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @insert_wat_namdbin(i8* %0, double* %1, double* %2, double* %3) {
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store i8* %0, i8** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
ret void
}

LLVM IR (-O2):
define void @insert_wat_namdbin(i8* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int, int, int, int, int, int, int, int, int);
main() { g(1, 2, 3, 4, 5, 6, 7, 8, 9); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x9,0x10(%rsp)
call   1030 <g@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
push   $0x9
push   $0x8
push   $0x7
call   1030 <g@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @g(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void my_putchar(char c) { write(1, &c, 1); }


x86 assembly (clang, -O0):
<my_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}
void *quantum_error_handler(void *f(int)) {
  static void *errfunc = 0;
  if (f)
    errfunc = f;
  return errfunc;
}


x86 assembly (clang, -O0):
<quantum_error_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111e <quantum_error_handler+0x1e>
mov    -0x8(%rbp),%rax
mov    %rax,0x2f0a(%rip)
mov    0x2f03(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quantum_error_handler>:
test   %rdi,%rdi
je     1110 <quantum_error_handler+0x10>
mov    %rdi,%rax
mov    %rdi,0x2f19(%rip)
ret
mov    0x2f11(%rip),%rax
ret

LLVM IR (-O0):
@quantum_error_handler.errfunc = internal global i8* null
define i8* @quantum_error_handler(i8* (i32)* %0) {
%2 = alloca i8* (i32)*
store i8* (i32)* %0, i8* (i32)** %2
%3 = load i8* (i32)*, i8* (i32)** %2
%4 = icmp ne i8* (i32)* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8* (i32)*, i8* (i32)** %2
%7 = bitcast i8* (i32)* %6 to i8*
store i8* %7, i8** @quantum_error_handler.errfunc
br label %8
8: ; preds = %5, %1
%9 = load i8*, i8** @quantum_error_handler.errfunc
ret i8* %9
}

LLVM IR (-O2):
@quantum_error_handler.errfunc = internal unnamed_addr global i8* null
define i8* @quantum_error_handler(i8* (i32)* %0) {
%2 = icmp eq i8* (i32)* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = load i8*, i8** @quantum_error_handler.errfunc
br label %7
5: ; preds = %1
store i8* (i32)* %0, i8* (i32)** bitcast (i8** @quantum_error_handler.errfunc to i8* (i32)**)
%6 = bitcast i8* (i32)* %0 to i8*
br label %7
7: ; preds = %3, %5
%8 = phi i8* [ %4, %3 ], [ %6, %5 ]
ret i8* %8
}
/* Type definitions */
struct volperm_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int volperm_cmdline_parser_required(struct volperm_args_info *args_info,
                                    const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<volperm_cmdline_parser_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.volperm_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @volperm_cmdline_parser_required(%struct.volperm_args_info* %0, i8* %1) {
%3 = alloca %struct.volperm_args_info*
%4 = alloca i8*
store %struct.volperm_args_info* %0, %struct.volperm_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.volperm_args_info*, %struct.volperm_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.volperm_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @volperm_cmdline_parser_required(%struct.volperm_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int *, int, int);
void ts_packet_init_null(uint8_t *ts_packet) {
  memset(ts_packet, 0xff, 188);
  ts_packet[0] = 0x47;
  ts_packet[1] = 0x1f;
  ts_packet[2] = 0xff;
  ts_packet[3] = 0x00;
}


x86 assembly (clang, -O0):
<ts_packet_init_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xff,%esi
mov    $0xbc,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
movl   $0x47,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1f,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0xff,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0xc(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_packet_init_null>:
push   %rbx
mov    %rdi,%rbx
mov    $0xff,%esi
mov    $0xbc,%edx
call   1030 <memset@plt>
movaps 0xed6(%rip),%xmm0
movups %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @ts_packet_init_null(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @memset(i32* %3, i32 255, i32 188)
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 71, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 31, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
store i32 255, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 3
store i32 0, i32* %12
ret void
}

LLVM IR (-O2):
define void @ts_packet_init_null(i32* %0) {
%2 = tail call i32 @memset(i32* %0, i32 255, i32 188)
%3 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 71, i32 31, i32 255, i32 0>, <4 x i32>* %3
ret void
}