xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void mp2vseqx_set_bitrate(uint8_t *p_mp2vseqx, uint16_t i_bitrate) {
  p_mp2vseqx[6] &= 0xe0;
  p_mp2vseqx[6] |= (i_bitrate >> 7) & 0x1f;
  p_mp2vseqx[7] = ((i_bitrate << 1) & 0xfe) | 0x1;
}


x86 assembly (clang, -O0):
<mp2vseqx_set_bitrate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
and    $0xe0,%ecx
mov    %ecx,0x18(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x7,%ecx
and    $0x1f,%ecx
mov    -0x8(%rbp),%rax
or     0x18(%rax),%ecx
mov    %ecx,0x18(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
and    $0xfe,%ecx
or     $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqx_set_bitrate>:
mov    $0xe0,%eax
and    0x18(%rdi),%eax
lea    (%rsi,%rsi,1),%ecx
add    $0x1,%ecx
mov    %esi,%edx
shr    $0x7,%edx
and    $0x1f,%edx
or     %eax,%edx
mov    %edx,0x18(%rdi)
movzbl %cl,%eax
mov    %eax,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @mp2vseqx_set_bitrate(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 = getelementptr inbounds i32, i32* %5, i64 6
%7 = load i32, i32* %6
%8 = and i32 %7, 224
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = ashr i32 %9, 7
%11 = and i32 %10, 31
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 6
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
%16 = load i32, i32* %4
%17 = shl i32 %16, 1
%18 = and i32 %17, 254
%19 = or i32 %18, 1
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 7
store i32 %19, i32* %21
ret void
}

LLVM IR (-O2):
define void @mp2vseqx_set_bitrate(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 6
%4 = load i32, i32* %3
%5 = and i32 %4, 224
%6 = lshr i32 %1, 7
%7 = and i32 %6, 31
%8 = or i32 %5, %7
store i32 %8, i32* %3
%9 = shl i32 %1, 1
%10 = and i32 %9, 254
%11 = or i32 %10, 1
%12 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %11, i32* %12
ret void
}
void foo378(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo378(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_PutChar(char);
void LCD_PutStr(const char *s) {
  char ch;
  while ((ch = *s++) != '\0') {
    LCD_PutChar(ch);
  }
}


x86 assembly (clang, -O0):
<LCD_PutStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     114a <LCD_PutStr+0x3a>
movsbl -0x9(%rbp),%edi
call   1030 <LCD_PutChar@plt>
jmp    111c <LCD_PutStr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_PutStr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <LCD_PutStr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <LCD_PutChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <LCD_PutStr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @LCD_PutStr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
store i8 %7, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i8, i8* %3
%12 = call i32 @LCD_PutChar(i8 signext %11)
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @LCD_PutStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @LCD_PutChar(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void spam() { return; }


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

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

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

LLVM IR (-O2):
define void @spam() {
ret void
}
/* Variables and functions */
int change(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int number = 10;
  int result = 0;
  result = change(number);
  printf("\nIn main, result = %d\tnumber = %d", result, number);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <change@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [34 x i8] c"\0AIn main, result = %d\09number = %d\00"
define i32 @main() {
%1 = tail call i32 @change(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %1, i32 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t filter_update(int16_t input) { return input; }


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

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

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

LLVM IR (-O2):
define i32 @filter_update(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ notify_controller_initialized();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_table_default_action(char *, char *, char *);
void init() {
  printf("Set default actions.\n");
  set_table_default_action("t", "ingress.t", "ingress.learn");
  notify_controller_initialized();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0xec8(%rip),%rsi
lea    0xecb(%rip),%rdx
call   1040 <set_table_default_action@plt>
mov    $0x0,%al
call   1050 <notify_controller_initialized@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    0xeb5(%rip),%rsi
lea    0xeb8(%rip),%rdx
call   1040 <set_table_default_action@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <notify_controller_initialized@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Set default actions.\0A\00"
@.str.1 = [2 x i8] c"t\00"
@.str.2 = [10 x i8] c"ingress.t\00"
@.str.3 = [14 x i8] c"ingress.learn\00"
define void @init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @set_table_default_action(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 (...) @notify_controller_initialized()
ret void
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"t\00"
@.str.2 = [10 x i8] c"ingress.t\00"
@.str.3 = [14 x i8] c"ingress.learn\00"
@str = [21 x i8] c"Set default actions.\00"
define void @init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @set_table_default_action(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 (...) @notify_controller_initialized()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage(void) {
  printf("./pri-toolbox ud less|more [number in cm]\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"./pri-toolbox ud less|more [number in cm]\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [42 x i8] c"./pri-toolbox ud less|more [number in cm]\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ pow(int, long);
long getSignedNumber(long number, long bitlength) {
  long mask;
  mask = (long)pow(2, bitlength) - 1;
  if (number & (1 << (bitlength - 1))) {
    return (number | (~mask));
  } else {
    return (number & mask);
  }
}


x86 assembly (clang, -O0):
<getSignedNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x2,%edi
call   1030 <pow@plt>
sub    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     1173 <getSignedNumber+0x63>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    117f <getSignedNumber+0x6f>
mov    -0x10(%rbp),%rax
and    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSignedNumber>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0x2,%edi
call   1030 <pow@plt>
add    $0xff,%bl
mov    $0x1,%edx
mov    %ebx,%ecx
shl    %cl,%edx
movslq %edx,%rcx
mov    %rax,%rdx
neg    %rdx
or     %r14,%rdx
add    $0xffffffffffffffff,%rax
and    %r14,%rax
test   %r14,%rcx
cmovne %rdx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @getSignedNumber(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = call i64 @pow(i32 2, i64 %7)
%9 = sub nsw i64 %8, 1
store i64 %9, i64* %6
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = sub nsw i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = shl i32 1, %13
%15 = sext i32 %14 to i64
%16 = and i64 %10, %15
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i64, i64* %4
%20 = load i64, i64* %6
%21 = xor i64 %20, -1
%22 = or i64 %19, %21
store i64 %22, i64* %3
br label %27
23: ; preds = %2
%24 = load i64, i64* %4
%25 = load i64, i64* %6
%26 = and i64 %24, %25
store i64 %26, i64* %3
br label %27
27: ; preds = %23, %18
%28 = load i64, i64* %3
ret i64 %28
}

LLVM IR (-O2):
define i64 @getSignedNumber(i64 %0, i64 %1) {
%3 = tail call i64 @pow(i32 2, i64 %1)
%4 = trunc i64 %1 to i32
%5 = add i32 %4, -1
%6 = shl nuw i32 1, %5
%7 = sext i32 %6 to i64
%8 = and i64 %7, %0
%9 = icmp eq i64 %8, 0
%10 = sub i64 0, %3
%11 = or i64 %10, %0
%12 = add nsw i64 %3, -1
%13 = and i64 %12, %0
%14 = select i1 %9, i64 %13, i64 %11
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int i;
  int s = 0;
#pragma omp parallel for reduction(+ : s)
  for (i = 0; i < 100; i++) {
    s = s + i;
  }
  if (s != ((100 - 1) * 100) / 2) {
    fprintf(stderr, "s == %d != %d\n", s, ((100 - 1) * 100) / 2);
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1165 <main+0x45>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
cmpl   $0x1356,-0x18(%rbp)
je     1196 <main+0x76>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%edx
lea    0xe7b(%rip),%rsi
mov    $0x1356,%ecx
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"s == %d != %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %6
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
store i32 %14, i32* %7
br label %15
15: ; preds = %11
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %8
18: ; preds = %8
%19 = load i32, i32* %7
%20 = icmp ne i32 %19, 4950
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* @stderr
%23 = load i32, i32* %7
%24 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %23, i32 4950)
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_array(int *array, int length) {
  int i;
  for (i = 0; i < length; i++) {
    printf("%d ", array[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <print_array+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <print_array+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void bnx2x_del_all_napi(struct bnx2x *bp) {}


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

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

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

LLVM IR (-O2):
%struct.bnx2x = type opaque
define void @bnx2x_del_all_napi(%struct.bnx2x* nocapture %0) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *rpl_malloc(size_t n) {
  if (n == 0) {
    n = 1;
  }
  return malloc(n);
}


x86 assembly (clang, -O0):
<rpl_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <rpl_malloc+0x1f>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpl_malloc>:
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @rpl_malloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 1, i64* %2
br label %6
6: ; preds = %5, %1
%7 = load i64, i64* %2
%8 = call i8* @malloc(i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @rpl_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 1, i64 %0
%4 = tail call i8* @malloc(i64 %3)
ret i8* %4
}
int greater(long x, long y) { return x > y; }


x86 assembly (clang, -O0):
<greater>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greater>:
xor    %eax,%eax
cmp    %rsi,%rdi
setg   %al
ret

LLVM IR (-O0):
define i32 @greater(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @greater(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int pathIsDir(char *path) {
  struct stat stats;
  if (stat(path, &stats) != 0) {
    return 0;
  }
  if (S_ISDIR(stats.st_mode)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathIsDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <pathIsDir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1174 <pathIsDir+0x54>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     116d <pathIsDir+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <pathIsDir+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathIsDir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <pathIsDir+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @pathIsDir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISDIR(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 1, i32* %2
br label %16
15: ; preds = %9
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @pathIsDir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
int nBinDigits(long i) {
  int n = 0;
  for (; i != 0; i >>= 1) {
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<nBinDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <nBinDigits+0x34>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <nBinDigits+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nBinDigits>:
xor    %eax,%eax
test   %rdi,%rdi
je     111f <nBinDigits+0x1f>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
sar    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <nBinDigits+0x10>
ret

LLVM IR (-O0):
define i32 @nBinDigits(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %7
%11 = load i64, i64* %2
%12 = ashr i64 %11, 1
store i64 %12, i64* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @nBinDigits(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = ashr i64 %5, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ default_isr_handler();
__attribute__((weak)) void udma_software_isr_handler(void) {
  default_isr_handler();
}


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

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

LLVM IR (-O0):
define weak void @udma_software_isr_handler() {
%1 = call i32 (...) @default_isr_handler()
ret void
}

LLVM IR (-O2):
define weak void @udma_software_isr_handler() {
%1 = tail call i32 (...) @default_isr_handler()
ret void
}
unsigned long long fcn(int n) { return (unsigned long long)1 << n; }


x86 assembly (clang, -O0):
<fcn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcn>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @fcn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = shl i64 1, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @fcn(i32 %0) {
%2 = zext i32 %0 to i64
%3 = shl nuw i64 1, %2
ret i64 %3
}
int roi_set_play(unsigned char *buff, unsigned char no) {
  buff[0] = (141);
  buff[1] = no;
  return 2;
}


x86 assembly (clang, -O0):
<roi_set_play>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x8d,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roi_set_play>:
movb   $0x8d,(%rdi)
mov    %sil,0x1(%rdi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @roi_set_play(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** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 -115, i8* %6
%7 = load i8, i8* %4
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %7, i8* %9
ret i32 2
}

LLVM IR (-O2):
define i32 @roi_set_play(i8* nocapture writeonly %0, i8 zeroext %1) {
store i8 -115, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %1, i8* %3
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x58() {
  Assert_real((isspace(88) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              445, ("isspace should be 0 for X"));
}


x86 assembly (clang, -O0):
<t_isspace_0x58>:
push   %rbp
mov    %rsp,%rbp
mov    $0x58,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1bd,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x58>:
push   %rax
mov    $0x58,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1bd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for X\00"
define void @t_isspace_0x58() {
%1 = call i64 @isspace(i32 88)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for X\00"
define void @t_isspace_0x58() {
%1 = tail call i64 @isspace(i32 88)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
char *memset(char *, char, int);
char *my_strinit(int length) {
  char *str;
  if (!(str = malloc(length)))
    return (NULL);
  return (memset(str, '\0', length));
}


x86 assembly (clang, -O0):
<my_strinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    114e <my_strinit+0x2e>
movq   $0x0,-0x8(%rbp)
jmp    1160 <my_strinit+0x40>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strinit>:
push   %rbx
mov    %edi,%ebx
call   1040 <malloc@plt>
test   %rax,%rax
je     113a <my_strinit+0x1a>
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <memset@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @my_strinit(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i8* @malloc(i32 %5)
store i8* %6, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
store i8* null, i8** %2
br label %13
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i32, i32* %3
%12 = call i8* @memset(i8* %10, i8 signext 0, i32 %11)
store i8* %12, i8** %2
br label %13
13: ; preds = %9, %8
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define i8* @my_strinit(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @memset(i8* %2, i8 signext 0, i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  long x;
  for (x = 0; x < 200000L; x++) {
    printf("123456789012345678901234567890\n");
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x30d40,-0x10(%rbp)
jge    1152 <main+0x42>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x30d40,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@str = [31 x i8] c"123456789012345678901234567890\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%4 = add nuw nsw i64 %2, 1
%5 = icmp eq i64 %4, 200000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
unsigned long jbg_ceil_half(unsigned long, unsigned long);
unsigned long jbg_stripes(unsigned long l0, unsigned long yd, unsigned long d) {
  unsigned long y0 = jbg_ceil_half(yd, d);
  return y0 / l0 + (y0 % l0 != 0);
}


x86 assembly (clang, -O0):
<jbg_stripes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <jbg_ceil_half@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x8(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x8(%rbp)
mov    -0x28(%rbp),%rax
cmp    $0x0,%rdx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jbg_stripes>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <jbg_ceil_half@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     1132 <jbg_stripes+0x22>
xor    %edx,%edx
div    %rbx
jmp    1136 <jbg_stripes+0x26>
xor    %edx,%edx
div    %ebx
cmp    $0x1,%rdx
sbb    $0xffffffffffffffff,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @jbg_stripes(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i64 @jbg_ceil_half(i64 %8, i64 %9)
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = load i64, i64* %4
%13 = udiv i64 %11, %12
%14 = load i64, i64* %7
%15 = load i64, i64* %4
%16 = urem i64 %14, %15
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i32
%19 = sext i32 %18 to i64
%20 = add i64 %13, %19
ret i64 %20
}

LLVM IR (-O2):
define i64 @jbg_stripes(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @jbg_ceil_half(i64 %1, i64 %2)
%5 = udiv i64 %4, %0
%6 = urem i64 %4, %0
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = add i64 %5, %8
ret i64 %9
}
/* Variables and functions */
int power(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  scanf("%d %d", &x, &y);
  printf("%d\n", power(x, y));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @power(i32 %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @power(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ driver();
int /*<<< orphan*/ printf(char *);
main() {
  register int local;
  driver();
  printf("exiting\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <driver@plt>
lea    0xeca(%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 <driver@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [8 x i8] c"exiting\00"
define i32 @main() {
%1 = tail call i32 (...) @driver()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello(void) { (void)printf("Hello, world.\n"); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv16_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ displayButtons();
int /*<<< orphan*/ displayDials();
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glutSwapBuffers();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  displayDials();
  displayButtons();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <glClear@plt>
mov    $0x0,%al
call   1040 <displayDials@plt>
mov    $0x0,%al
call   1030 <displayButtons@plt>
mov    $0x0,%al
call   1060 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <glClear@plt>
xor    %eax,%eax
call   1040 <displayDials@plt>
xor    %eax,%eax
call   1030 <displayButtons@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @displayDials()
%4 = call i32 (...) @displayButtons()
%5 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @displayDials()
%4 = tail call i32 (...) @displayButtons()
%5 = tail call i32 (...) @glutSwapBuffers()
ret void
}
int get_numeric_sysinfo_version(void) { return (0 * 10000) + (2 * 100) + 2; }


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

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

LLVM IR (-O0):
define i32 @get_numeric_sysinfo_version() {
ret i32 202
}

LLVM IR (-O2):
define i32 @get_numeric_sysinfo_version() {
ret i32 202
}
__attribute__((never_patch_for_instrumentation)) int foo() {
  volatile unsigned x = 0;
  volatile unsigned y = 1;
  x += y;
  x *= y;
  while (++x)
    foo();
  return y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1159 <foo+0x49>
call   1030 <foo@plt>
jmp    113d <foo+0x2d>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
movl   $0x0,(%rsp)
movl   $0x1,0x4(%rsp)
mov    0x4(%rsp),%eax
add    %eax,(%rsp)
mov    0x4(%rsp),%eax
imul   (%rsp),%eax
mov    %eax,(%rsp)
addl   $0x1,(%rsp)
je     114b <foo+0x3b>
nopl   0x0(%rax,%rax,1)
call   1030 <foo@plt>
addl   $0x1,(%rsp)
jne    1140 <foo+0x30>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
store volatile i32 0, i32* %1
store volatile i32 1, i32* %2
%3 = load volatile i32, i32* %2
%4 = load volatile i32, i32* %1
%5 = add i32 %4, %3
store volatile i32 %5, i32* %1
%6 = load volatile i32, i32* %2
%7 = load volatile i32, i32* %1
%8 = mul i32 %7, %6
store volatile i32 %8, i32* %1
br label %9
9: ; preds = %13, %0
%10 = load volatile i32, i32* %1
%11 = add i32 %10, 1
store volatile i32 %11, i32* %1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @foo()
br label %9
15: ; preds = %9
%16 = load volatile i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store volatile i32 1, i32* %2
%5 = load volatile i32, i32* %2
%6 = load volatile i32, i32* %1
%7 = add i32 %6, %5
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %2
%9 = load volatile i32, i32* %1
%10 = mul i32 %9, %8
store volatile i32 %10, i32* %1
%11 = load volatile i32, i32* %1
%12 = add i32 %11, 1
store volatile i32 %12, i32* %1
%13 = icmp eq i32 %12, 0
br i1 %13, label %19, label %14
14: ; preds = %0, %14
%15 = tail call i32 @foo()
%16 = load volatile i32, i32* %1
%17 = add i32 %16, 1
store volatile i32 %17, i32* %1
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %14
19: ; preds = %14, %0
%20 = load volatile i32, i32* %2
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello from prog.c\n");
  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)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Hello from prog.c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Hello from prog.c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ kfork(char *);
int do_kfork() { kfork("/bin/u1"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/u1\00"
define i32 @do_kfork() {
%1 = alloca i32
%2 = call i32 @kfork(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/u1\00"
define i32 @do_kfork() {
%1 = tail call i32 @kfork(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void SPI1_EnableRxInt(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI1_EnableRxInt() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpneq_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpneq_ss(__m128 __a, __m128 __b) {
  return _mm_cmpneq_ss(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpneq_ss>:
jmp    1030 <_mm_cmpneq_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpneq_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpneq_ss(i32 %0, i32 %1)
ret i32 %3
}
double vde_chain_nm2_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<vde_chain_nm2_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm2_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @vde_chain_nm2_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @vde_chain_nm2_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
scalar_t__ lc_NAME();
int Ada_lc_NAME() {
  int jresult;
  int result;
  result = (int)lc_NAME();
  jresult = result;
  return jresult;
}


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

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

LLVM IR (-O0):
define i32 @Ada_lc_NAME() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 (...) @lc_NAME()
%4 = trunc i64 %3 to i32
store i32 %4, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %1
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @Ada_lc_NAME() {
%1 = tail call i64 (...) @lc_NAME()
%2 = trunc i64 %1 to i32
ret i32 %2
}
__typeof__(alloca("")) test_alloca_86(void) { return alloca(""); }


x86 assembly (clang, -O0):
<test_alloca_86>:
push   %rbp
mov    %rsp,%rbp
lea    0xf04(%rip),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_alloca_86>:
push   %rbp
mov    %rsp,%rbp
mov    %rsp,%rax
lea    0xf01(%rip),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @test_alloca_86() {
%1 = alloca i8, i64 ptrtoint ([1 x i8]* @.str to i64)
ret i8* %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define noalias i8* @test_alloca_86() {
%1 = alloca i8, i64 ptrtoint ([1 x i8]* @.str to i64)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ do_something_usefull();
int /*<<< orphan*/ doubleindirect();
void doubleindirect2(void) {
  doubleindirect();
  do_something_usefull();
}


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

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

LLVM IR (-O0):
define void @doubleindirect2() {
%1 = call i32 (...) @doubleindirect()
%2 = call i32 (...) @do_something_usefull()
ret void
}

LLVM IR (-O2):
define void @doubleindirect2() {
%1 = tail call i32 (...) @doubleindirect()
%2 = tail call i32 (...) @do_something_usefull()
ret void
}
void foo688() {}


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

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

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

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