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

/* Variables and functions */
uint32_t EMACVLANRxConfigGet(uint32_t ui32Base, uint16_t *pui16Tag) {
  uint32_t ui32Value;
  ;
  ;
  ui32Value = (*((volatile uint32_t *)(ui32Base + 0x0000001C)));
  *pui16Tag = (ui32Value & 0x0000FFFF) >> 0;
  return (ui32Value & ~0x0000FFFF);
}


x86 assembly (clang, -O0):
<EMACVLANRxConfigGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1c,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
and    $0xffff,%ecx
sar    $0x0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
and    $0xffff0000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACVLANRxConfigGet>:
movslq %edi,%rax
mov    0x1c(%rax),%eax
movzwl %ax,%ecx
mov    %ecx,(%rsi)
and    $0xffff0000,%eax
ret

LLVM IR (-O0):
define i32 @EMACVLANRxConfigGet(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 28
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = and i32 %11, 65535
%13 = ashr i32 %12, 0
%14 = load i32*, i32** %4
store i32 %13, i32* %14
%15 = load i32, i32* %5
%16 = and i32 %15, -65536
ret i32 %16
}

LLVM IR (-O2):
define i32 @EMACVLANRxConfigGet(i32 %0, i32* nocapture writeonly %1) {
%3 = add nsw i32 %0, 28
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 65535
store i32 %7, i32* %1
%8 = and i32 %6, -65536
ret i32 %8
}
int median(int n) {
  int i = 0, tmp;
  while (n != 0) {
    tmp = n % 10;
    n = (n - tmp) / 10;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<median>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1145 <median+0x45>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <median+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<median>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <median+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <median+0x10>
ret

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

LLVM IR (-O2):
define i32 @median(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = sdiv i32 %4, 10
%7 = add nuw nsw i32 %5, 1
%8 = add i32 %4, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
int is_ascii_numhex(char in_c) {
  if ((in_c >= 0x30 && in_c <= 0x39) || (in_c >= 0x41 && in_c <= 0x46) ||
      (in_c >= 0x61 && in_c <= 0x66)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_ascii_numhex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <is_ascii_numhex+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1158 <is_ascii_numhex+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     113e <is_ascii_numhex+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jle    1158 <is_ascii_numhex+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1164 <is_ascii_numhex+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     1164 <is_ascii_numhex+0x64>
movl   $0x0,-0x4(%rbp)
jmp    116b <is_ascii_numhex+0x6b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ascii_numhex>:
lea    -0x3a(%rdi),%eax
cmp    $0xf6,%al
setb   %al
and    $0xdf,%dil
add    $0xb9,%dil
cmp    $0xfa,%dil
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_ascii_numhex(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %27, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 70
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 97
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 102
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
store i32 0, i32* %2
br label %29
28: ; preds = %23, %19
store i32 1, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_ascii_numhex(i8 signext %0) {
%2 = add i8 %0, -58
%3 = icmp ult i8 %2, -10
%4 = and i8 %0, -33
%5 = add i8 %4, -71
%6 = icmp ult i8 %5, -6
%7 = and i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
void bzero(void *string, unsigned bytes) {
  char *res = string;
  while (bytes != 0) {
    *res++ = 0;
    bytes--;
  }
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113d <bzero+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <bzero+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
je     1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
int foo(bar)
int *bar;
{ return 3; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture readnone %0) {
ret i32 3
}
void oil_test_get_arg_stride(void) {}


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

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

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

LLVM IR (-O2):
define void @oil_test_get_arg_stride() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_exit(int *);
void EGS_EXIT(int *status) { my_exit(status); }


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

x86 assembly (clang, -O2):
<EGS_EXIT>:
jmp    1030 <my_exit@plt>

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

LLVM IR (-O2):
define void @EGS_EXIT(i32* %0) {
%2 = tail call i32 @my_exit(i32* %0)
ret void
}
int test_imm_9Buint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x9B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Buint64_lowword_reg>:
test   $0x9b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Buint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 155
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int myfunction() { return 0xbaba; }


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

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

LLVM IR (-O0):
define i32 @myfunction() {
ret i32 47802
}

LLVM IR (-O2):
define i32 @myfunction() {
ret i32 47802
}
/* Variables and functions */
int /*<<< orphan*/ f(void *, unsigned int);
void g(void *d, unsigned n) {
  if (n < 5)
    n = 5;
  f(d, n);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jae    1130 <g+0x20>
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
cmp    $0x6,%esi
mov    $0x5,%eax
cmovb  %eax,%esi
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @g(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ult i32 %5, 5
br i1 %6, label %7, label %8
7: ; preds = %2
store i32 5, i32* %4
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @f(i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @g(i8* %0, i32 %1) {
%3 = icmp ugt i32 %1, 5
%4 = select i1 %3, i32 %1, i32 5
%5 = tail call i32 @f(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ ft_strlen(char const *);
scalar_t__ write(int, char const *, int /*<<< orphan*/);
int ft_putstr_fd(char const *s, int fd) {
  if (write(fd, s, ft_strlen(s)) < 0)
    return (EXIT_FAILURE);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
cmp    $0x0,%rax
jge    116f <ft_putstr_fd+0x4f>
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ft_putstr_fd+0x5b>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
test   %rax,%rax
jns    1147 <ft_putstr_fd+0x27>
mov    0x2e9b(%rip),%rax
jmp    114e <ft_putstr_fd+0x2e>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @ft_putstr_fd(i8* %0, i32 %1) {
%3 = tail call i32 @ft_strlen(i8* %0)
%4 = tail call i64 @write(i32 %1, i8* %0, i32 %3)
%5 = icmp slt i64 %4, 0
%6 = load i32, i32* @EXIT_FAILURE
%7 = load i32, i32* @EXIT_SUCCESS
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int x = 3;
  int y = 5;
  int z = 7;
  int t1 = x + y;
  int t2 = z + t1;
  int t3 = x + 4;
  int t4 = y * 48;
  int t5 = t3 + t4;
  int rval = t2 * t5;
  printf("%d\n", rval);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
movl   $0x7,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
imul   $0x30,-0x18(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 3, i32* %5
store i32 5, i32* %6
store i32 7, i32* %7
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = add nsw i32 %14, %15
store i32 %16, i32* %8
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = add nsw i32 %17, %18
store i32 %19, i32* %9
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 4
store i32 %21, i32* %10
%22 = load i32, i32* %6
%23 = mul nsw i32 %22, 48
store i32 %23, i32* %11
%24 = load i32, i32* %10
%25 = load i32, i32* %11
%26 = add nsw i32 %24, %25
store i32 %26, i32* %12
%27 = load i32, i32* %9
%28 = load i32, i32* %12
%29 = mul nsw i32 %27, %28
store i32 %29, i32* %13
%30 = load i32, i32* %13
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3705)
ret i32 0
}
/* Variables and functions */
double pow(double, double);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%g\n", pow(2.0, 32.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  0xec9(%rip),%xmm1
call   1040 <pow@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @pow(double 2.000000e+00, double 3.200000e+01)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 0x41F0000000000000)
ret i32 0
}
int test_imm_74uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x74 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_74uint64_midword_reg>:
test   $0x740000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_74uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 7602176
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double exp2l(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<exp2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @exp2l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @exp2l(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t __hsail_bitextract_s32(int32_t src0, uint32_t src1, uint32_t src2) {
  uint32_t offset = src1 & (sizeof(int32_t) * 8 - 1);
  uint32_t width = src2 & (sizeof(int32_t) * 8 - 1);
  if (width == 0)
    return 0;
  else
    return (src0 << (sizeof(int32_t) * 8 - width - offset)) >>
           (sizeof(int32_t) * 8 - width);
}


x86 assembly (clang, -O0):
<__hsail_bitextract_s32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movslq -0xc(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0x14(%rbp)
movslq -0x10(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1139 <__hsail_bitextract_s32+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1162 <__hsail_bitextract_s32+0x62>
mov    -0x8(%rbp),%eax
movslq -0x18(%rbp),%rdx
mov    $0x20,%ecx
sub    %rdx,%rcx
movslq -0x14(%rbp),%rdx
sub    %rdx,%rcx
shl    %cl,%eax
movslq -0x18(%rbp),%rdx
mov    $0x20,%ecx
sub    %rdx,%rcx
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_bitextract_s32>:
and    $0x1f,%edx
je     111c <__hsail_bitextract_s32+0x1c>
mov    %edi,%eax
and    $0x1f,%esi
mov    $0x20,%ecx
sub    %edx,%ecx
sub    %esi,%ecx
shl    %cl,%eax
neg    %edx
mov    %edx,%ecx
sar    %cl,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @__hsail_bitextract_s32(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, 31
%5 = icmp eq i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = and i32 %1, 31
%8 = sub nuw nsw i32 32, %4
%9 = sub nsw i32 %8, %7
%10 = shl i32 %0, %9
%11 = ashr i32 %10, %8
br label %12
12: ; preds = %3, %6
%13 = phi i32 [ %11, %6 ], [ 0, %3 ]
ret i32 %13
}
int umode(arg)
char *arg;
{ return 0777 ^ mode(arg); }


x86 assembly (clang, -O0):
<umode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <mode@plt>
xor    $0x1ff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umode>:
push   %rax
xor    %eax,%eax
call   1030 <mode@plt>
xor    $0x1ff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @umode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @mode to i32 (i8*, ...)*)(i8* %3)
%5 = xor i32 511, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @umode(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mode to i32 (i8*, ...)*)(i8* %0)
%3 = xor i32 %2, 511
ret i32 %3
}
/* Variables and functions */
int isPalindrome(char *, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  char s[99] = "A mana plana canal: Panama";
  printf("%d\n", isPalindrome(s, 28));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0x63,%edx
call   1040 <memcpy@plt>
lea    -0x80(%rbp),%rdi
mov    $0x1c,%esi
call   1050 <isPalindrome@plt>
mov    %eax,%esi
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x5f(%rsp)
mov    %rsp,%rdi
mov    $0x1c,%esi
call   1040 <isPalindrome@plt>
lea    0xedc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [99 x i8] c"A mana plana canal: Panama\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [99 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [99 x i8]* %6 to i8*
%8 = getelementptr inbounds [99 x i8], [99 x i8]* %6, i64 0, i64 0
%9 = call i32 @isPalindrome(i8* %8, i32 28)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [99 x i8] c"A mana plana canal: Panama\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [99 x i8]
%4 = getelementptr inbounds [99 x i8], [99 x i8]* %3, i64 0, i64 0
%5 = call i32 @isPalindrome(i8* %4, i32 28)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
char *getenv(char *);
char *get_home_directory(void) { return getenv("HOME"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"HOME\00"
define i8* @get_home_directory() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [5 x i8] c"HOME\00"
define i8* @get_home_directory() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ spn_die(char *, unsigned long);
void *spn_malloc(size_t n) {
  void *ptr = malloc(n);
  if (ptr == NULL && n > 0) {
    unsigned long uln = n;
    spn_die("memory allocation of %lu bytes failed", uln);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<spn_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <spn_malloc+0x47>
cmpq   $0x0,-0x8(%rbp)
jbe    1167 <spn_malloc+0x47>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe9e(%rip),%rdi
call   1030 <spn_die@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spn_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1148 <spn_malloc+0x28>
test   %r14,%r14
jne    1148 <spn_malloc+0x28>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <spn_die@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [38 x i8] c"memory allocation of %lu bytes failed\00"
define i8* @spn_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i64, i64* %2
%11 = icmp ugt i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i64, i64* %2
store i64 %13, i64* %4
%14 = load i64, i64* %4
%15 = call i32 @spn_die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %14)
br label %16
16: ; preds = %12, %9, %1
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [38 x i8] c"memory allocation of %lu bytes failed\00"
define noalias i8* @spn_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @spn_die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %8
8: ; preds = %6, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_PW3_PIN() { set_io_bit(0x40, 3); }


x86 assembly (clang, -O0):
<TOSH_SET_PW3_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%edi
mov    $0x3,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_PW3_PIN>:
mov    $0x40,%edi
mov    $0x3,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_PW3_PIN() {
%1 = call i32 @set_io_bit(i32 64, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_PW3_PIN() {
%1 = tail call i32 @set_io_bit(i32 64, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_system(char *);
void printbuddy(void) { my_system("cat /proc/buddyinfo"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"cat /proc/buddyinfo\00"
define void @printbuddy() {
%1 = call i32 @my_system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"cat /proc/buddyinfo\00"
define void @printbuddy() {
%1 = tail call i32 @my_system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
void KnRfunctionWithProblemParameters(p1, p2, c) long p2;
int c;
{}


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

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

LLVM IR (-O0):
define void @KnRfunctionWithProblemParameters(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @KnRfunctionWithProblemParameters(i32 %0, i64 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int same(size_t n, int64_t *__restrict a, int64_t *__restrict b) {
  size_t i;
  for (i = 0; i < n; ++i)
    if (a[i] != b[i])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<same>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1166 <same+0x66>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
je     1150 <same+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116d <same+0x6d>
jmp    1155 <same+0x55>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1118 <same+0x18>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<same>:
mov    $0x1,%eax
test   %rdi,%rdi
je     1123 <same+0x23>
xor    %r8d,%r8d
nopl   (%rax)
mov    (%rsi,%r8,8),%rcx
cmp    (%rdx,%r8,8),%rcx
jne    1124 <same+0x24>
add    $0x1,%r8
cmp    %r8,%rdi
jne    1110 <same+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @same(i64 %0, i64* noalias %1, i64* noalias %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64
store i64 %0, i64* %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i64 0, i64* %8
br label %9
9: ; preds = %25, %3
%10 = load i64, i64* %8
%11 = load i64, i64* %5
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %28
13: ; preds = %9
%14 = load i64*, i64** %6
%15 = load i64, i64* %8
%16 = getelementptr inbounds i64, i64* %14, i64 %15
%17 = load i64, i64* %16
%18 = load i64*, i64** %7
%19 = load i64, i64* %8
%20 = getelementptr inbounds i64, i64* %18, i64 %19
%21 = load i64, i64* %20
%22 = icmp ne i64 %17, %21
br i1 %22, label %23, label %24
23: ; preds = %13
store i32 0, i32* %4
br label %29
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i64, i64* %8
%27 = add i64 %26, 1
store i64 %27, i64* %8
br label %9
28: ; preds = %9
store i32 1, i32* %4
br label %29
29: ; preds = %28, %23
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @same(i64 %0, i64* noalias nocapture %1, i64* noalias nocapture %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %15, label %7
5: ; preds = %7
%6 = icmp eq i64 %14, %0
br i1 %6, label %15, label %7
7: ; preds = %3, %5
%8 = phi i64 [ %14, %5 ], [ 0, %3 ]
%9 = getelementptr inbounds i64, i64* %1, i64 %8
%10 = load i64, i64* %9
%11 = getelementptr inbounds i64, i64* %2, i64 %8
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
%14 = add nuw i64 %8, 1
br i1 %13, label %5, label %15
15: ; preds = %7, %5, %3
%16 = phi i32 [ 1, %3 ], [ 1, %5 ], [ 0, %7 ]
ret i32 %16
}
void processa4(int w[][30]) {}


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

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

LLVM IR (-O0):
define void @processa4([30 x i32]* %0) {
%2 = alloca [30 x i32]*
store [30 x i32]* %0, [30 x i32]** %2
ret void
}

LLVM IR (-O2):
define void @processa4([30 x i32]* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;
typedef int /*<<< orphan*/ __uint32_t;

/* Variables and functions */
size_t __bsd___iconv(int /*<<< orphan*/, char const **, size_t *, char **,
                     size_t *, int /*<<< orphan*/, size_t *);
size_t __iconv(iconv_t a, const char **b, size_t *c, char **d, size_t *e,
               __uint32_t f, size_t *g) {
  return __bsd___iconv(a, b, c, d, e, f, g);
}


x86 assembly (clang, -O0):
<__iconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <__bsd___iconv@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iconv>:
jmp    1030 <__bsd___iconv@plt>

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

LLVM IR (-O2):
define i64 @__iconv(i32 %0, i8** %1, i64* %2, i8** %3, i64* %4, i32 %5, i64* %6) {
%8 = tail call i64 @__bsd___iconv(i32 %0, i8** %1, i64* %2, i8** %3, i64* %4, i32 %5, i64* %6)
ret i64 %8
}
/* Type definitions */
struct pcapifh_linkstate {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ LWIP_ASSERT(char *, int /*<<< orphan*/);
int /*<<< orphan*/ LWIP_UNUSED_ARG(struct pcapifh_linkstate *);
void pcapifh_linkstate_close(struct pcapifh_linkstate *state) {
  LWIP_UNUSED_ARG(state);
  LWIP_ASSERT("not implemented", 0);
}


x86 assembly (clang, -O0):
<pcapifh_linkstate_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <LWIP_UNUSED_ARG@plt>
lea    0xec4(%rip),%rdi
xor    %esi,%esi
call   1030 <LWIP_ASSERT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcapifh_linkstate_close>:
push   %rax
call   1040 <LWIP_UNUSED_ARG@plt>
lea    0xed3(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <LWIP_ASSERT@plt>

LLVM IR (-O0):
%struct.pcapifh_linkstate = type { i32 }
@.str = [16 x i8] c"not implemented\00"
define void @pcapifh_linkstate_close(%struct.pcapifh_linkstate* %0) {
%2 = alloca %struct.pcapifh_linkstate*
store %struct.pcapifh_linkstate* %0, %struct.pcapifh_linkstate** %2
%3 = load %struct.pcapifh_linkstate*, %struct.pcapifh_linkstate** %2
%4 = call i32 @LWIP_UNUSED_ARG(%struct.pcapifh_linkstate* %3)
%5 = call i32 @LWIP_ASSERT(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
%struct.pcapifh_linkstate = type { i32 }
@.str = [16 x i8] c"not implemented\00"
define void @pcapifh_linkstate_close(%struct.pcapifh_linkstate* %0) {
%2 = tail call i32 @LWIP_UNUSED_ARG(%struct.pcapifh_linkstate* %0)
%3 = tail call i32 @LWIP_ASSERT(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void CopyFile(FILE *infile, FILE *outfile) {
  char buffer[100];
  while (fgets(buffer, 100, infile) != NULL) {
    fputs(buffer, outfile);
  }
}


x86 assembly (clang, -O0):
<CopyFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x64,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1161 <CopyFile+0x41>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputs@plt>
jmp    1133 <CopyFile+0x13>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyFile>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsp,%rdi
mov    $0x64,%esi
mov    %r15,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
je     1170 <CopyFile+0x50>
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fputs@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %r15,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
jne    1150 <CopyFile+0x30>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @CopyFile(i32* nocapture %0, i32* nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32* @fgets(i8* %4, i32 100, i32* %0)
%6 = icmp eq i32* %5, null
br i1 %6, label %11, label %7
7: ; preds = %2, %7
%8 = call i32 @fputs(i8* %4, i32* %1)
%9 = call i32* @fgets(i8* %4, i32 100, i32* %0)
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %7
11: ; preds = %7, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int fileexists(const char *path) {
  FILE *in;
  in = fopen(path, "r");
  if (in == NULL)
    return 0;
  fclose(in);
  return 1;
}


x86 assembly (clang, -O0):
<fileexists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <fileexists+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <fileexists+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileexists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <fileexists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @fileexists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
store i32 1, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @fileexists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int platform_isAbsolutePath(const char *path) { return (path[0] == '/'); }


x86 assembly (clang, -O0):
<platform_isAbsolutePath>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_isAbsolutePath>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @platform_isAbsolutePath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @platform_isAbsolutePath(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ ptrdiff_t;

/* Variables and functions */
void *size_to_objp(size_t ptr_rep) {
  unsigned char *ptr;
  ptrdiff_t distance;
  distance = (ptrdiff_t)ptr_rep;
  ptr = (unsigned char *)(((unsigned char *)NULL) + ((ptrdiff_t)distance));
  return ((void *)ptr);
}


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

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

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

LLVM IR (-O2):
define i8* @size_to_objp(i64 %0) {
%2 = inttoptr i64 %0 to i8*
ret i8* %2
}
/* Variables and functions */
char *_zero_arr_plus_char_fn(char *, int, int, char const *, unsigned int);
char *_zero_arr_inplace_plus_post_char_fn(char **x, int orig_i,
                                          const char *filename,
                                          unsigned lineno) {
  char *_zap_res = *x;
  *x = _zero_arr_plus_char_fn(_zap_res, 1, orig_i, filename, lineno);
  return _zap_res;
}


x86 assembly (clang, -O0):
<_zero_arr_inplace_plus_post_char_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%esi
call   1030 <_zero_arr_plus_char_fn@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zero_arr_inplace_plus_post_char_fn>:
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rbx
mov    (%rdi),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <_zero_arr_plus_char_fn@plt>
mov    %rax,(%rbx)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @_zero_arr_inplace_plus_post_char_fn(i8** %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8**, i8*** %5
%11 = load i8*, i8** %10
store i8* %11, i8** %9
%12 = load i8*, i8** %9
%13 = load i32, i32* %6
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i8* @_zero_arr_plus_char_fn(i8* %12, i32 1, i32 %13, i8* %14, i32 %15)
%17 = load i8**, i8*** %5
store i8* %16, i8** %17
%18 = load i8*, i8** %9
ret i8* %18
}

LLVM IR (-O2):
define i8* @_zero_arr_inplace_plus_post_char_fn(i8** nocapture %0, i32 %1, i8* %2, i32 %3) {
%5 = load i8*, i8** %0
%6 = tail call i8* @_zero_arr_plus_char_fn(i8* %5, i32 1, i32 %1, i8* %2, i32 %3)
store i8* %6, i8** %0
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_compression_mode_pg(struct list_head *);
uint8_t clear_ait_compression(struct list_head *l) {
  ;
  return clear_compression_mode_pg(l);
}


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

x86 assembly (clang, -O2):
<clear_ait_compression>:
jmp    1030 <clear_compression_mode_pg@plt>

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

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @clear_ait_compression(%struct.list_head* %0) {
%2 = tail call i32 @clear_compression_mode_pg(%struct.list_head* %0)
ret i32 %2
}
/* Variables and functions */
int ENOMEM;
void *calloc(size_t const, int);
int errno;
void *spx_alloc_mptr(const size_t numbs, int *err) {
  void *p = calloc(numbs, 4);
  if (NULL == p) {
    *err = 0 == errno ? ENOMEM : errno;
  }
  return p;
}


x86 assembly (clang, -O0):
<spx_alloc_mptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1175 <spx_alloc_mptr+0x65>
xor    %eax,%eax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%eax
jne    1160 <spx_alloc_mptr+0x50>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
jmp    116c <spx_alloc_mptr+0x5c>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_alloc_mptr>:
push   %rbx
mov    %rsi,%rbx
mov    $0x4,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1125 <spx_alloc_mptr+0x15>
pop    %rbx
ret
mov    0x2eac(%rip),%rcx
mov    (%rcx),%ecx
test   %ecx,%ecx
jne    113b <spx_alloc_mptr+0x2b>
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i32 0
@ENOMEM = global i32 0
define i8* @spx_alloc_mptr(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i8*
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = load i64, i64* %3
%7 = call i8* @calloc(i64 %6, i32 4)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* null, %8
br i1 %9, label %10, label %20
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = icmp eq i32 0, %11
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* @ENOMEM
br label %17
15: ; preds = %10
%16 = load i32, i32* @errno
br label %17
17: ; preds = %15, %13
%18 = phi i32 [ %14, %13 ], [ %16, %15 ]
%19 = load i32*, i32** %4
store i32 %18, i32* %19
br label %20
20: ; preds = %17, %2
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
@errno = global i32 0
@ENOMEM = global i32 0
define i8* @spx_alloc_mptr(i64 %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @calloc(i64 %0, i32 4)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* @ENOMEM
%9 = select i1 %7, i32 %8, i32 %6
store i32 %9, i32* %1
br label %10
10: ; preds = %5, %2
ret i8* %3
}