xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  if (a > b) {
  }
  printf("%d %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1154 <main+0x34>
jmp    1154 <main+0x34>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %0
br label %9
9: ; preds = %8, %0
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int);
void DoToString(void) { InlineWords(2, 18, 79); }


x86 assembly (clang, -O0):
<DoToString>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x12,%esi
mov    $0x4f,%edx
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoToString>:
mov    $0x2,%edi
mov    $0x12,%esi
mov    $0x4f,%edx
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoToString() {
%1 = call i32 @InlineWords(i32 2, i32 18, i32 79)
ret void
}

LLVM IR (-O2):
define void @DoToString() {
%1 = tail call i32 @InlineWords(i32 2, i32 18, i32 79)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int /*<<< orphan*/);
main() {
  int a = 1;
  printf("%d %d %d", a, ++a, a++);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 2)
ret i32 0
}
unsigned short SExt(unsigned short targ, int n) {
  if (targ >> n - 1 == 0)
    return targ;
  else
    return (0xffff << n) + targ;
}


x86 assembly (clang, -O0):
<SExt>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jne    1130 <SExt+0x30>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1144 <SExt+0x44>
mov    -0x8(%rbp),%ecx
mov    $0xffff,%eax
shl    %cl,%eax
movzwl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SExt>:
lea    -0x1(%rsi),%ecx
mov    %edi,%edx
shr    %cl,%edx
mov    $0xffff,%eax
mov    %esi,%ecx
shl    %cl,%eax
test   %edx,%edx
cmove  %edx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @SExt(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
store i16 %0, i16* %4
store i32 %1, i32* %5
%6 = load i16, i16* %4
%7 = zext i16 %6 to i32
%8 = load i32, i32* %5
%9 = sub nsw i32 %8, 1
%10 = ashr i32 %7, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i16, i16* %4
store i16 %13, i16* %3
br label %21
14: ; preds = %2
%15 = load i32, i32* %5
%16 = shl i32 65535, %15
%17 = load i16, i16* %4
%18 = zext i16 %17 to i32
%19 = add nsw i32 %16, %18
%20 = trunc i32 %19 to i16
store i16 %20, i16* %3
br label %21
21: ; preds = %14, %12
%22 = load i16, i16* %3
ret i16 %22
}

LLVM IR (-O2):
define zeroext i16 @SExt(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = add nsw i32 %1, -1
%5 = lshr i32 %3, %4
%6 = icmp eq i32 %5, 0
%7 = shl i32 65535, %1
%8 = trunc i32 %7 to i16
%9 = select i1 %6, i16 0, i16 %8
%10 = add i16 %9, %0
ret i16 %10
}
/* Variables and functions */
int /*<<< orphan*/ sla_dcs2c(double *, double *, double *);
void csla_dcs2c(double a, double b, double v[3]) { sla_dcs2c(&a, &b, v); }


x86 assembly (clang, -O0):
<csla_dcs2c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <sla_dcs2c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csla_dcs2c>:
sub    $0x18,%rsp
mov    %rdi,%rdx
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <sla_dcs2c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @csla_dcs2c(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = call i32 @sla_dcs2c(double* %4, double* %5, double* %7)
ret void
}

LLVM IR (-O2):
define void @csla_dcs2c(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = call i32 @sla_dcs2c(double* %4, double* %5, double* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
void header(void) { output_line("\t.code"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\09.code\00"
define void @header() {
%1 = call i32 @output_line(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\09.code\00"
define void @header() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__18__IO__selectIOFunc();
void HplMsp430Usart0P__SOMI__selectIOFunc(void) {
  HplMsp430GeneralIOP__18__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart0P__SOMI__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__18__IO__selectIOFunc()
ret void
}
_Complex int foo(int a) { return a < 0; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i64 @foo(i32 %0) {
%2 = alloca { i32, i32 }
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %2, i32 0, i32 0
%8 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %2, i32 0, i32 1
store i32 %6, i32* %7
store i32 0, i32* %8
%9 = bitcast { i32, i32 }* %2 to i64*
%10 = load i64, i64* %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @foo(i32 %0) {
%2 = lshr i32 %0, 31
%3 = zext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ __gnat_convert_addresses(void **, int, char *, int *);
void __gnat_gmem_symbolic(void *addr, char *buf, int *length) {
  void *addresses[] = {addr};
  __gnat_convert_addresses(addresses, 1, buf, length);
}


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

x86 assembly (clang, -O2):
<__gnat_gmem_symbolic>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <__gnat_convert_addresses@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @__gnat_gmem_symbolic(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca [1 x i8*]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = getelementptr inbounds [1 x i8*], [1 x i8*]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
store i8* %9, i8** %8
%10 = getelementptr inbounds [1 x i8*], [1 x i8*]* %7, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i32*, i32** %6
%13 = call i32 @__gnat_convert_addresses(i8** %10, i32 1, i8* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @__gnat_gmem_symbolic(i8* %0, i8* %1, i32* %2) {
%4 = alloca [1 x i8*]
%5 = bitcast [1 x i8*]* %4 to i8*
%6 = getelementptr inbounds [1 x i8*], [1 x i8*]* %4, i64 0, i64 0
store i8* %0, i8** %6
%7 = call i32 @__gnat_convert_addresses(i8** %6, i32 1, i8* %1, i32* %2)
ret void
}
int uadd_ok(unsigned x, unsigned y) { return !(x > (x + y)); }


x86 assembly (clang, -O0):
<uadd_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uadd_ok>:
not    %edi
xor    %eax,%eax
cmp    %esi,%edi
setae  %al
ret

LLVM IR (-O0):
define i32 @uadd_ok(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* %3
%7 = load i32, i32* %4
%8 = add i32 %6, %7
%9 = icmp ugt i32 %5, %8
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @uadd_ok(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = icmp uge i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned int s_len(const char *s) {
  unsigned int len = 0;
  while (s[len])
    ++len;
  return len;
}


x86 assembly (clang, -O0):
<s_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     112e <s_len+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <s_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <s_len+0x10>
ret

LLVM IR (-O0):
define i32 @s_len(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %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 = icmp ne i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %3
%13 = add i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @s_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
void aaa() { foo(1, 2); }


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

x86 assembly (clang, -O2):
<aaa>:
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @aaa() {
%1 = call i32 @foo(i32 1, i32 2)
ret void
}

LLVM IR (-O2):
define void @aaa() {
%1 = tail call i32 @foo(i32 1, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void div_reg32(unsigned long reg32) {
  put8(0xF7);
  put8(0xF0 + reg32);
}


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

x86 assembly (clang, -O2):
<div_reg32>:
push   %rbx
mov    %rdi,%rbx
mov    $0xf7,%edi
call   1030 <put8@plt>
add    $0xf0,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @div_reg32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @put8(i32 247)
%4 = load i64, i64* %2
%5 = add i64 240, %4
%6 = trunc i64 %5 to i32
%7 = call i32 @put8(i32 %6)
ret void
}

LLVM IR (-O2):
define void @div_reg32(i64 %0) {
%2 = tail call i32 @put8(i32 247)
%3 = trunc i64 %0 to i32
%4 = add i32 %3, 240
%5 = tail call i32 @put8(i32 %4)
ret void
}
int pldummy_xwin() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pldummy_xwin() {
ret i32 0
}
unsigned int CharClass_IsControl(char ch) {
  return ch < ' ';
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<CharClass_IsControl>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharClass_IsControl>:
xor    %eax,%eax
cmp    $0x20,%dil
setl   %al
ret

LLVM IR (-O0):
define i32 @CharClass_IsControl(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 32
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @CharClass_IsControl(i8 signext %0) {
%2 = icmp slt i8 %0, 32
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int i = 0, pos_espaco[100], livre = 0;
  char frase[5000];
  scanf("%[^\n]s", frase);
  while (frase[i] != '\0') {
    if (frase[i] == ' ') {
      pos_espaco[livre] = i;
      livre++;
      i++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1530,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x1a4(%rbp)
lea    -0x1530(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1030 <scanf@plt>
movslq -0x8(%rbp),%rax
movsbl -0x1530(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     119e <main+0x8e>
movslq -0x8(%rbp),%rax
movsbl -0x1530(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1199 <main+0x89>
mov    -0x8(%rbp),%ecx
movslq -0x1a4(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x36>
xor    %eax,%eax
add    $0x1530,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1388,%rsp
lea    0xee2(%rip),%rdi
mov    %rsp,%rsi
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x1388,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
define i32 @main() {
%1 = alloca [5000 x i8]
%2 = getelementptr inbounds [5000 x i8], [5000 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int rtl930x_dma_if_rx_ring_size(int i) { return (0x7C60) + ((i / 3) << 2); }


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

x86 assembly (clang, -O2):
<rtl930x_dma_if_rx_ring_size>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    0x7c60(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @rtl930x_dma_if_rx_ring_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 3
%5 = shl i32 %4, 2
%6 = add nsw i32 31840, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @rtl930x_dma_if_rx_ring_size(i32 %0) {
%2 = sdiv i32 %0, 3
%3 = shl i32 %2, 2
%4 = add nsw i32 %3, 31840
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned char error_code;
};
typedef TYPE_1__ XErrorEvent;

/* Variables and functions */
void set_XErrorEvent_error_code(void *_p, unsigned char _v) {
  ((XErrorEvent *)_p)->error_code = (unsigned char)_v;
}


x86 assembly (clang, -O0):
<set_XErrorEvent_error_code>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XErrorEvent_error_code>:
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8 }
define void @set_XErrorEvent_error_code(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i8 %5, i8* %8
ret void
}

LLVM IR (-O2):
define void @set_XErrorEvent_error_code(i8* nocapture writeonly %0, i8 zeroext %1) {
store i8 %1, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ destroy_initial_ruleset();
int /*<<< orphan*/ destroy_module_table();
int /*<<< orphan*/ destroy_ruleset_table();
int /*<<< orphan*/ destroy_system_ruleset();
void destroy_rules() {
  destroy_ruleset_table();
  destroy_module_table();
  destroy_system_ruleset();
  destroy_initial_ruleset();
}


x86 assembly (clang, -O0):
<destroy_rules>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <destroy_ruleset_table@plt>
mov    $0x0,%al
call   1060 <destroy_module_table@plt>
mov    $0x0,%al
call   1050 <destroy_system_ruleset@plt>
mov    $0x0,%al
call   1030 <destroy_initial_ruleset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_rules>:
push   %rax
xor    %eax,%eax
call   1040 <destroy_ruleset_table@plt>
xor    %eax,%eax
call   1060 <destroy_module_table@plt>
xor    %eax,%eax
call   1050 <destroy_system_ruleset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <destroy_initial_ruleset@plt>

LLVM IR (-O0):
define void @destroy_rules() {
%1 = call i32 (...) @destroy_ruleset_table()
%2 = call i32 (...) @destroy_module_table()
%3 = call i32 (...) @destroy_system_ruleset()
%4 = call i32 (...) @destroy_initial_ruleset()
ret void
}

LLVM IR (-O2):
define void @destroy_rules() {
%1 = tail call i32 (...) @destroy_ruleset_table()
%2 = tail call i32 (...) @destroy_module_table()
%3 = tail call i32 (...) @destroy_system_ruleset()
%4 = tail call i32 (...) @destroy_initial_ruleset()
ret void
}
/* Variables and functions */
int getSize(int, int /*<<< orphan*/, char);
int getsizeBlocks(int level, char y) { return getSize(level, 0, y); }


x86 assembly (clang, -O0):
<getsizeBlocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
movsbl -0x5(%rbp),%edx
call   1030 <getSize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsizeBlocks>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <getSize@plt>

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

LLVM IR (-O2):
define i32 @getsizeBlocks(i32 %0, i8 signext %1) {
%3 = tail call i32 @getSize(i32 %0, i32 0, i8 signext %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ w32api_mem_free(void *);
void msvcrt_delete(void *p) {
  ;
  w32api_mem_free(p);
  ;
}


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

x86 assembly (clang, -O2):
<msvcrt_delete>:
jmp    1030 <w32api_mem_free@plt>

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

LLVM IR (-O2):
define void @msvcrt_delete(i8* %0) {
%2 = tail call i32 @w32api_mem_free(i8* %0)
ret void
}
/* Variables and functions */
unsigned int f14(unsigned int);
unsigned int f15(unsigned int a) { return f14(f14(a)); }


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

x86 assembly (clang, -O2):
<f15>:
push   %rax
call   1030 <f14@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f14@plt>

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

LLVM IR (-O2):
define i32 @f15(i32 %0) {
%2 = tail call i32 @f14(i32 %0)
%3 = tail call i32 @f14(i32 %2)
ret i32 %3
}
int vt_kmsg_redirect(int new) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vt_kmsg_redirect(i32 %0) {
ret i32 0
}
/* Variables and functions */
int system(char *);
int exec_shell(void) {
  int ret;
  ret = system("ls -lath");
  return ret;
}


x86 assembly (clang, -O0):
<exec_shell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"ls -lath\00"
define i32 @exec_shell() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [9 x i8] c"ls -lath\00"
define i32 @exec_shell() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
float getBuddyBoxLocalMaxSample(float bufferSample, float localMaxSample) {
  return (bufferSample > localMaxSample) ? bufferSample : localMaxSample;
}


x86 assembly (clang, -O0):
<getBuddyBoxLocalMaxSample>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <getBuddyBoxLocalMaxSample+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <getBuddyBoxLocalMaxSample+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBuddyBoxLocalMaxSample>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @getBuddyBoxLocalMaxSample(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @getBuddyBoxLocalMaxSample(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ fs_path_op(void *, void *, void *, int);
int dir_add(unsigned char *dir) {
  int retval;
  fs_path_op((void *)dir, (void *)0, (void *)&retval, 3);
  return retval;
}


x86 assembly (clang, -O0):
<dir_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x3,%ecx
call   1030 <fs_path_op@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dir_add>:
push   %rax
lea    0x4(%rsp),%rdx
xor    %esi,%esi
mov    $0x3,%ecx
call   1030 <fs_path_op@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dir_add(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i32* %3 to i8*
%6 = call i32 @fs_path_op(i8* %4, i8* null, i8* %5, i32 3)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @dir_add(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fs_path_op(i8* %0, i8* null, i8* %3, i32 3)
%5 = load i32, i32* %2
ret i32 %5
}
char *version_string() { return ("3.8beta1"); }


x86 assembly (clang, -O0):
<version_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<version_string>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"3.8beta1\00"
define i8* @version_string() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"3.8beta1\00"
define i8* @version_string() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Display_Help();
int /*<<< orphan*/ NAR_INIT();
int /*<<< orphan*/ Process_Args(int, char **);
int /*<<< orphan*/ Run_System_Tests();
int /*<<< orphan*/ Run_Unit_Tests();
int /*<<< orphan*/ mysrand(int);
int main(int argc, char *argv[]) {
  mysrand(1337);
  Process_Args(argc, argv);
  if (argc == 1) {
    NAR_INIT();
    Run_Unit_Tests();
    Run_System_Tests();
    Display_Help();
  }
  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)
mov    $0x539,%edi
call   1050 <mysrand@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <Process_Args@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11b2 <main+0x52>
mov    $0x0,%al
call   1040 <NAR_INIT@plt>
mov    $0x0,%al
call   1030 <Run_Unit_Tests@plt>
mov    $0x0,%al
call   1080 <Run_System_Tests@plt>
mov    $0x0,%al
call   1070 <Display_Help@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x539,%edi
call   1050 <mysrand@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <Process_Args@plt>
cmp    $0x1,%ebp
jne    119d <main+0x3d>
xor    %eax,%eax
call   1040 <NAR_INIT@plt>
xor    %eax,%eax
call   1030 <Run_Unit_Tests@plt>
xor    %eax,%eax
call   1080 <Run_System_Tests@plt>
xor    %eax,%eax
call   1070 <Display_Help@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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 = call i32 @mysrand(i32 1337)
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @Process_Args(i32 %7, i8** %8)
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = call i32 (...) @NAR_INIT()
%14 = call i32 (...) @Run_Unit_Tests()
%15 = call i32 (...) @Run_System_Tests()
%16 = call i32 (...) @Display_Help()
br label %17
17: ; preds = %12, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @mysrand(i32 1337)
%4 = tail call i32 @Process_Args(i32 %0, i8** %1)
%5 = icmp eq i32 %0, 1
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i32 (...) @NAR_INIT()
%8 = tail call i32 (...) @Run_Unit_Tests()
%9 = tail call i32 (...) @Run_System_Tests()
%10 = tail call i32 (...) @Display_Help()
br label %11
11: ; preds = %6, %2
ret i32 0
}
const char *db_all_jes_number_report_sql(void) {
  static const char *query = "SELECT * FROM all_jes"
                             "  WHERE JE = %s";
  return query;
}


x86 assembly (clang, -O0):
<db_all_jes_number_report_sql>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f15(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_all_jes_number_report_sql>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@db_all_jes_number_report_sql.query = internal global i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i32 0, i32 0)
@.str = [37 x i8] c"SELECT * FROM all_jes WHERE JE = %s\00"
define i8* @db_all_jes_number_report_sql() {
%1 = load i8*, i8** @db_all_jes_number_report_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [37 x i8] c"SELECT * FROM all_jes WHERE JE = %s\00"
define i8* @db_all_jes_number_report_sql() {
ret i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0)
}
RX0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (p0[x0]) = (p1[x1]); }


x86 assembly (clang, -O0):
<RX0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,2),%dx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0RX1>:
movslq %ecx,%rax
movzwl (%r9,%rax,2),%eax
movslq %edx,%rcx
mov    %ax,(%r8,%rcx,2)
ret

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

LLVM IR (-O2):
define i32 @RX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture writeonly %4, i16* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i16, i16* %5, i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds i16, i16* %4, i64 %10
store i16 %9, i16* %11
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  for (int i = 10; i != 0; i--) {
    if (i % 2)
      continue;
    printf("%d ", i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1166 <main+0x56>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1149 <main+0x39>
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Type definitions */
struct xswitch {
  int dummy;
};
struct msgbuf {
  int dummy;
};
struct flow_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ flow_table_put_entry_index(struct flow_table *,
                                              int /*<<< orphan*/);
struct msgbuf *msg_flow_entry_del(struct flow_table *, int /*<<< orphan*/);
int /*<<< orphan*/ xswitch_send(struct xswitch *, struct msgbuf *);
void fini_entry(struct xswitch *sw, struct flow_table *ft) {
  struct msgbuf *msg;
  msg = msg_flow_entry_del(ft, 0);
  xswitch_send(sw, msg);
  flow_table_put_entry_index(ft, 0);
}


x86 assembly (clang, -O0):
<fini_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1050 <msg_flow_entry_del@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <xswitch_send@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <flow_table_put_entry_index@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fini_entry>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
call   1050 <msg_flow_entry_del@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <xswitch_send@plt>
mov    %rbx,%rdi
xor    %esi,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <flow_table_put_entry_index@plt>

LLVM IR (-O0):
%struct.xswitch = type { i32 }
%struct.flow_table = type { i32 }
%struct.msgbuf = type { i32 }
define void @fini_entry(%struct.xswitch* %0, %struct.flow_table* %1) {
%3 = alloca %struct.xswitch*
%4 = alloca %struct.flow_table*
%5 = alloca %struct.msgbuf*
store %struct.xswitch* %0, %struct.xswitch** %3
store %struct.flow_table* %1, %struct.flow_table** %4
%6 = load %struct.flow_table*, %struct.flow_table** %4
%7 = call %struct.msgbuf* @msg_flow_entry_del(%struct.flow_table* %6, i32 0)
store %struct.msgbuf* %7, %struct.msgbuf** %5
%8 = load %struct.xswitch*, %struct.xswitch** %3
%9 = load %struct.msgbuf*, %struct.msgbuf** %5
%10 = call i32 @xswitch_send(%struct.xswitch* %8, %struct.msgbuf* %9)
%11 = load %struct.flow_table*, %struct.flow_table** %4
%12 = call i32 @flow_table_put_entry_index(%struct.flow_table* %11, i32 0)
ret void
}

LLVM IR (-O2):
%struct.xswitch = type { i32 }
%struct.flow_table = type { i32 }
%struct.msgbuf = type { i32 }
define void @fini_entry(%struct.xswitch* %0, %struct.flow_table* %1) {
%3 = tail call %struct.msgbuf* @msg_flow_entry_del(%struct.flow_table* %1, i32 0)
%4 = tail call i32 @xswitch_send(%struct.xswitch* %0, %struct.msgbuf* %3)
%5 = tail call i32 @flow_table_put_entry_index(%struct.flow_table* %1, i32 0)
ret void
}
/* Variables and functions */
int fsub_();
int langs0__2do() { return fsub_() + 2; }


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

x86 assembly (clang, -O2):
<langs0__2do>:
push   %rax
xor    %eax,%eax
call   1030 <fsub_@plt>
add    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @langs0__2do() {
%1 = call i32 (...) @fsub_()
%2 = add nsw i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @langs0__2do() {
%1 = tail call i32 (...) @fsub_()
%2 = add nsw i32 %1, 2
ret i32 %2
}
/* Variables and functions */
int recv(int, char *, int, int /*<<< orphan*/);
int get_line(int sock, char *buf, int size) {
  int n;
  if ((n = recv(sock, buf, size - 1, 0)) > 0)
    buf[n] = '\0';
  return n;
}


x86 assembly (clang, -O0):
<get_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jle    114e <get_line+0x3e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_line>:
push   %rbx
mov    %rsi,%rbx
add    $0xffffffff,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %eax,%eax
jle    1128 <get_line+0x18>
mov    %eax,%ecx
movb   $0x0,(%rbx,%rcx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @get_line(i32 %0, i8* %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @recv(i32 %0, i8* %1, i32 %4, i32 0)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = zext i32 %5 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %7, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mod2_print() { printf("Hello from mod2\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello from mod2\0A\00"
define void @mod2_print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello from mod2\00"
define void @mod2_print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
int fun1250() { return 1250; }


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

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

LLVM IR (-O0):
define i32 @fun1250() {
ret i32 1250
}

LLVM IR (-O2):
define i32 @fun1250() {
ret i32 1250
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_MAAddMemoryQuarterTrieTreeLeaf();
int main() {
  int nret = 0;
  nret = test_MAAddMemoryQuarterTrieTreeLeaf();
  if (nret) {
    printf("Testing failure\n");
  } else {
    printf("All is ok\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_MAAddMemoryQuarterTrieTreeLeaf@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115b <main+0x3b>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    1167 <main+0x47>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Testing failure\0A\00"
@.str.1 = [11 x i8] c"All is ok\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test_MAAddMemoryQuarterTrieTreeLeaf()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"All is ok\00"
@str.2 = [16 x i8] c"Testing failure\00"
define i32 @main() {
%1 = tail call i32 (...) @test_MAAddMemoryQuarterTrieTreeLeaf()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
char *strcpy(char *pDest, const char *pSrc) {
  char *pDestReturn = pDest;
  while (*pSrc != '\0')
    *pDest++ = *pSrc++;
  *pDest = '\0';
  return (pDestReturn);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114b <strcpy+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

LLVM IR (-O0):
define i8* @strcpy(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
store i8* %6, i8** %5
br label %7
7: ; preds = %12, %2
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %7
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i8, i8* %13
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
store i8 %15, i8* %16
br label %7
18: ; preds = %7
%19 = load i8*, i8** %3
store i8 0, i8* %19
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
/* Variables and functions */
void pnm_init_parse_header(int *restrict state, int *restrict comment,
                           int *restrict type, unsigned int *restrict maxval,
                           size_t *restrict width, size_t *restrict height) {
  *state = *comment = *type = 0;
  *maxval = 0;
  *width = *height = 0;
}


x86 assembly (clang, -O0):
<pnm_init_parse_header>:
push   %rbp
mov    %rsp,%rbp
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    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x30(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnm_init_parse_header>:
movl   $0x0,(%rdx)
movl   $0x0,(%rsi)
movl   $0x0,(%rdi)
movl   $0x0,(%rcx)
movq   $0x0,(%r9)
movq   $0x0,(%r8)
ret

LLVM IR (-O0):
define void @pnm_init_parse_header(i32* noalias %0, i32* noalias %1, i32* noalias %2, i32* noalias %3, i64* noalias %4, i64* noalias %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i64*
%12 = alloca i64*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i64* %4, i64** %11
store i64* %5, i64** %12
%13 = load i32*, i32** %9
store i32 0, i32* %13
%14 = load i32*, i32** %8
store i32 0, i32* %14
%15 = load i32*, i32** %7
store i32 0, i32* %15
%16 = load i32*, i32** %10
store i32 0, i32* %16
%17 = load i64*, i64** %12
store i64 0, i64* %17
%18 = load i64*, i64** %11
store i64 0, i64* %18
ret void
}

LLVM IR (-O2):
define void @pnm_init_parse_header(i32* noalias nocapture writeonly %0, i32* noalias nocapture writeonly %1, i32* noalias nocapture writeonly %2, i32* noalias nocapture writeonly %3, i64* noalias nocapture writeonly %4, i64* noalias nocapture writeonly %5) {
store i32 0, i32* %2
store i32 0, i32* %1
store i32 0, i32* %0
store i32 0, i32* %3
store i64 0, i64* %5
store i64 0, i64* %4
ret void
}