xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
scalar_t__ alloca(int);
int /*<<< orphan*/ test_fun(int *, int);
int main() {
  int array_size = __VERIFIER_nondet_int();
  if (array_size < 1) {
    array_size = 1;
  }
  int *numbers = (int *)alloca(array_size * sizeof(int));
  test_fun(numbers, array_size);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    115a <main+0x2a>
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <test_fun@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0x1,%ebx
cmovg  %eax,%ebx
lea    0x0(,%rbx,4),%edi
call   1030 <alloca@plt>
mov    %rax,%rdi
mov    %ebx,%esi
call   1050 <test_fun@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %2
br label %8
8: ; preds = %7, %0
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @alloca(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %3
%15 = load i32*, i32** %3
%16 = load i32, i32* %2
%17 = call i32 @test_fun(i32* %15, i32 %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, 1
%3 = select i1 %2, i32 %1, i32 1
%4 = shl i32 %3, 2
%5 = tail call i64 @alloca(i32 %4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @test_fun(i32* %6, i32 %3)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t _USBIntNumberGet(uint32_t ui32Base) {
  uint32_t ui32Int;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x00050000))) {
    ui32Int = 60;
  } else if ((((*((volatile uint32_t *)(0x400FE000))) &
               (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x000A0000))) {
    ui32Int = 58;
  } else {
    ui32Int = 0;
  }
  return (ui32Int);
}


x86 assembly (clang, -O0):
<_USBIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x10050000,%eax
jne    112a <_USBIntNumberGet+0x2a>
movl   $0x3c,-0x8(%rbp)
jmp    1159 <_USBIntNumberGet+0x59>
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    114d <_USBIntNumberGet+0x4d>
movl   $0x3a,-0x8(%rbp)
jmp    1154 <_USBIntNumberGet+0x54>
movl   $0x0,-0x8(%rbp)
jmp    1159 <_USBIntNumberGet+0x59>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_USBIntNumberGet>:
mov    $0x70ff0000,%ecx
mov    0x400fe000,%edx
and    %ecx,%edx
mov    $0x3c,%eax
cmp    $0x10050000,%edx
je     1132 <_USBIntNumberGet+0x32>
and    0x400fe000,%ecx
xor    %edx,%edx
cmp    $0x100a0000,%ecx
mov    $0x3a,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @_USBIntNumberGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%5 = and i32 %4, 1895759872
%6 = icmp eq i32 %5, 268763136
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 60, i32* %3
br label %15
8: ; preds = %1
%9 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%10 = and i32 %9, 1895759872
%11 = icmp eq i32 %10, 269090816
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 58, i32* %3
br label %14
13: ; preds = %8
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
br label %15
15: ; preds = %14, %7
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @_USBIntNumberGet(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%3 = and i32 %2, 1895759872
%4 = icmp eq i32 %3, 268763136
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%7 = and i32 %6, 1895759872
%8 = icmp eq i32 %7, 269090816
%9 = select i1 %8, i32 58, i32 0
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 60, %1 ], [ %9, %5 ]
ret i32 %11
}
void foo086() {}


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

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

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

LLVM IR (-O2):
define void @foo086() {
ret void
}
int test_imm_9Aint32_mem(int *val) {
  return ((*val) & (0x9A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Aint32_mem>:
testb  $0x9a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Aint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 154
%6 = icmp ne i32 %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_9Aint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 154
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void Msp430TimerCapComP__5__Compare__default__fired(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__5__Compare__default__fired() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t rotl32(uint32_t x, uint8_t n) { return ((x << n) | (x >> (32 - n))); }


x86 assembly (clang, -O0):
<rotl32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotl32(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotl32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int test_imm_ECint16_reg(short val) {
  return ((val) & (0xEC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ECint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xec,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_ECint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 236
%6 = icmp ne i32 %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_ECint16_reg(i16 signext %0) {
%2 = and i16 %0, 236
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int isprime(unsigned int n) {
  int i;
  for (i = 2; (i * i) <= n; i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     114e <isprime+0x4e>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    113b <isprime+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1155 <isprime+0x55>
jmp    1140 <isprime+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <isprime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
cmp    $0x4,%edi
jae    110b <isprime+0xb>
mov    $0x1,%eax
ret
mov    $0x2,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%eax
xor    %edx,%edx
div    %esi
test   %edx,%edx
je     113c <isprime+0x3c>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jbe    1120 <isprime+0x20>
mov    $0x1,%eax
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @isprime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = icmp ule i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %5
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = urem i32 %12, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 0, i32* %2
br label %22
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %5
21: ; preds = %5
store i32 1, i32* %2
br label %22
22: ; preds = %21, %16
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %11, label %6
3: ; preds = %6
%4 = mul nsw i32 %10, %10
%5 = icmp ugt i32 %4, %0
br i1 %5, label %11, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %10, %3 ], [ 2, %1 ]
%8 = urem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw nsw i32 %7, 1
br i1 %9, label %11, label %3
11: ; preds = %6, %3, %1
%12 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %12
}
/* Type definitions */
struct udev_device {
  int dummy;
};
typedef int /*<<< orphan*/ filename;

/* Variables and functions */
int /*<<< orphan*/ devpath_to_db_path(int /*<<< orphan*/, int /*<<< orphan*/,
                                      char *, int);
int /*<<< orphan*/ udev_device_get_devpath(struct udev_device *);
int /*<<< orphan*/ udev_device_get_udev(struct udev_device *);
int /*<<< orphan*/ unlink(char *);
int udev_device_delete_db(struct udev_device *udev_device) {
  char filename[1024];
  devpath_to_db_path(udev_device_get_udev(udev_device),
                     udev_device_get_devpath(udev_device), filename,
                     sizeof(filename));
  unlink(filename);
  return 0;
}


x86 assembly (clang, -O0):
<udev_device_delete_db>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <udev_device_get_udev@plt>
mov    %eax,-0x414(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <udev_device_get_devpath@plt>
mov    -0x414(%rbp),%edi
mov    %eax,%esi
lea    -0x410(%rbp),%rdx
mov    $0x400,%ecx
call   1050 <devpath_to_db_path@plt>
lea    -0x410(%rbp),%rdi
call   1040 <unlink@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udev_device_delete_db>:
push   %rbp
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
call   1030 <udev_device_get_udev@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <udev_device_get_devpath@plt>
mov    %rsp,%rbx
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rdx
mov    $0x400,%ecx
call   1050 <devpath_to_db_path@plt>
mov    %rbx,%rdi
call   1040 <unlink@plt>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.udev_device = type { i32 }
define i32 @udev_device_delete_db(%struct.udev_device* %0) {
%2 = alloca %struct.udev_device*
%3 = alloca [1024 x i8]
store %struct.udev_device* %0, %struct.udev_device** %2
%4 = load %struct.udev_device*, %struct.udev_device** %2
%5 = call i32 @udev_device_get_udev(%struct.udev_device* %4)
%6 = load %struct.udev_device*, %struct.udev_device** %2
%7 = call i32 @udev_device_get_devpath(%struct.udev_device* %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i32 @devpath_to_db_path(i32 %5, i32 %7, i8* %8, i32 1024)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%11 = call i32 @unlink(i8* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.udev_device = type { i32 }
define i32 @udev_device_delete_db(%struct.udev_device* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @udev_device_get_udev(%struct.udev_device* %0)
%5 = tail call i32 @udev_device_get_devpath(%struct.udev_device* %0)
%6 = call i32 @devpath_to_db_path(i32 %4, i32 %5, i8* %3, i32 1024)
%7 = call i32 @unlink(i8* %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ strstr(char *, char *);
char *securityCheck(char *arg, char *s) {
  if (strstr(arg, ".pass"))
    return "<<<For security reasons, your filename has been blocked>>>";
  return s;
}


x86 assembly (clang, -O0):
<securityCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     114a <securityCheck+0x3a>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <securityCheck+0x42>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<securityCheck>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strstr@plt>
test   %rax,%rax
lea    0xedc(%rip),%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c".pass\00"
@.str.1 = [59 x i8] c"<<<For security reasons, your filename has been blocked>>>\00"
define i8* @securityCheck(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = call i64 @strstr(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %12
10: ; preds = %2
%11 = load i8*, i8** %5
store i8* %11, i8** %3
br label %12
12: ; preds = %10, %9
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [6 x i8] c".pass\00"
@.str.1 = [59 x i8] c"<<<For security reasons, your filename has been blocked>>>\00"
define i8* @securityCheck(i8* %0, i8* readnone %1) {
%3 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0)
ret i8* %5
}
/* Type definitions */
struct colourSystem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gamma_correct(struct colourSystem const *, double *);
void gamma_correct_rgb(const struct colourSystem *cs, double *r, double *g,
                       double *b) {
  gamma_correct(cs, r);
  gamma_correct(cs, g);
  gamma_correct(cs, b);
}


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

x86 assembly (clang, -O2):
<gamma_correct_rgb>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
call   1030 <gamma_correct@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <gamma_correct@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <gamma_correct@plt>

LLVM IR (-O0):
%struct.colourSystem = type { i32 }
define void @gamma_correct_rgb(%struct.colourSystem* %0, double* %1, double* %2, double* %3) {
%5 = alloca %struct.colourSystem*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store %struct.colourSystem* %0, %struct.colourSystem** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load %struct.colourSystem*, %struct.colourSystem** %5
%10 = load double*, double** %6
%11 = call i32 @gamma_correct(%struct.colourSystem* %9, double* %10)
%12 = load %struct.colourSystem*, %struct.colourSystem** %5
%13 = load double*, double** %7
%14 = call i32 @gamma_correct(%struct.colourSystem* %12, double* %13)
%15 = load %struct.colourSystem*, %struct.colourSystem** %5
%16 = load double*, double** %8
%17 = call i32 @gamma_correct(%struct.colourSystem* %15, double* %16)
ret void
}

LLVM IR (-O2):
%struct.colourSystem = type { i32 }
define void @gamma_correct_rgb(%struct.colourSystem* %0, double* %1, double* %2, double* %3) {
%5 = tail call i32 @gamma_correct(%struct.colourSystem* %0, double* %1)
%6 = tail call i32 @gamma_correct(%struct.colourSystem* %0, double* %2)
%7 = tail call i32 @gamma_correct(%struct.colourSystem* %0, double* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ O_CREAT;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char *);
void createFile(mode_t mode) {
  unlink("umask-example.temp");
  int fd = open("umask-example.temp", O_CREAT, mode);
  close(fd);
}


x86 assembly (clang, -O0):
<createFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <unlink@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
mov    -0x4(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createFile>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xec3(%rip),%r14
mov    %r14,%rdi
call   1030 <unlink@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdi
mov    %ebx,%edx
call   1050 <open@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <close@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"umask-example.temp\00"
@O_CREAT = global i32 0
define void @createFile(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @unlink(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @O_CREAT
%6 = load i32, i32* %2
%7 = call i32 @open(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @close(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"umask-example.temp\00"
@O_CREAT = global i32 0
define void @createFile(i32 %0) {
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @O_CREAT
%4 = tail call i32 @open(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %0)
%5 = tail call i32 @close(i32 %4)
ret void
}
/* Variables and functions */
unsigned long CountLeadingZeroes(unsigned long);
unsigned long MSBitPos(unsigned long x) { return 31 - CountLeadingZeroes(x); }


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

x86 assembly (clang, -O2):
<MSBitPos>:
push   %rax
call   1030 <CountLeadingZeroes@plt>
mov    $0x1f,%ecx
sub    %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @MSBitPos(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @CountLeadingZeroes(i64 %3)
%5 = sub i64 31, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @MSBitPos(i64 %0) {
%2 = tail call i64 @CountLeadingZeroes(i64 %0)
%3 = sub i64 31, %2
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
double cputime() {
  clock_t clk = clock();
  return (double)clk / CLOCKS_PER_SEC;
}


x86 assembly (clang, -O0):
<cputime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
mov    0x2eb8(%rip),%rax
divsd  (%rax),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cputime>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @cputime() {
%1 = alloca i64
%2 = call i64 (...) @clock()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = sitofp i64 %3 to double
%5 = load double, double* @CLOCKS_PER_SEC
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @cputime() {
%1 = tail call i64 (...) @clock()
%2 = sitofp i64 %1 to double
%3 = load double, double* @CLOCKS_PER_SEC
%4 = fdiv double %2, %3
ret double %4
}
/* Type definitions */
struct idbm_rec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct idbm_rec *);
void _idbm_recs_free(struct idbm_rec *recs) { free(recs); }


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

x86 assembly (clang, -O2):
<_idbm_recs_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.idbm_rec = type { i32 }
define void @_idbm_recs_free(%struct.idbm_rec* nocapture %0) {
%2 = tail call i32 @free(%struct.idbm_rec* %0)
ret void
}
void RTAvlrU64GetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrU64GetBestFit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test(int param1) {
  int local0;
  local0 = param1;
  if (param1 < -2) {
    local0 = -2;
  }
  if (local0 > 3) {
    local0 = 3;
  }
  printf("MinMax result %d\n", local0);
  return;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
jge    1132 <test+0x22>
movl   $0xfffffffe,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jle    1143 <test+0x33>
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
cmp    $0xffffffff,%edi
mov    $0xfffffffe,%eax
cmovge %edi,%eax
cmp    $0x3,%eax
mov    $0x3,%esi
cmovl  %eax,%esi
lea    0xed3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"MinMax result %d\0A\00"
define void @test(i32 %0) {
%2 = icmp sgt i32 %0, -2
%3 = select i1 %2, i32 %0, i32 -2
%4 = icmp slt i32 %3, 3
%5 = select i1 %4, i32 %3, i32 3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
void swap(int *element1_ptr, int *element2_ptr) {
  int hold = *element1_ptr;
  *element1_ptr = *element2_ptr;
  *element2_ptr = hold;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(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 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ solv_oom(int /*<<< orphan*/, int /*<<< orphan*/);
char *strdup(char const *);
int /*<<< orphan*/ strlen(char const *);
char *solv_strdup(const char *s) {
  char *r;
  if (!s)
    return 0;
  r = strdup(s);
  if (!r)
    solv_oom(0, strlen(s));
  return r;
}


x86 assembly (clang, -O0):
<solv_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <solv_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1186 <solv_strdup+0x56>
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117e <solv_strdup+0x4e>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1040 <solv_oom@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solv_strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <solv_strdup+0x2f>
mov    %rdi,%rbx
call   1050 <strdup@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1162 <solv_strdup+0x32>
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %r14d,%r14d
xor    %edi,%edi
mov    %eax,%esi
call   1040 <solv_oom@plt>
jmp    1162 <solv_strdup+0x32>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @solv_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %17, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i32 @strlen(i8* %14)
%16 = call i32 @solv_oom(i32 0, i32 %15)
br label %17
17: ; preds = %13, %8
%18 = load i8*, i8** %4
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define noalias i8* @solv_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %0)
%8 = tail call i32 @solv_oom(i32 0, i32 %7)
br label %9
9: ; preds = %3, %6, %1
%10 = phi i8* [ null, %1 ], [ null, %6 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
scalar_t__ strlen(char const *);
scalar_t__ zhead_has_fname(char const *);
const char *skip_zhead(const char *p) {
  const char *q = p + 10;
  if (zhead_has_fname(p)) {
    q += strlen(q) + 1;
  }
  return q;
}


x86 assembly (clang, -O0):
<skip_zhead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <zhead_has_fname@plt>
cmp    $0x0,%rax
je     1160 <skip_zhead+0x40>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_zhead>:
push   %rbx
lea    0xa(%rdi),%rbx
call   1040 <zhead_has_fname@plt>
test   %rax,%rax
je     113e <skip_zhead+0x1e>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_zhead(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 10
%3 = tail call i64 @zhead_has_fname(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = tail call i64 @strlen(i8* %2)
%7 = add nsw i64 %6, 1
%8 = getelementptr inbounds i8, i8* %2, i64 %7
br label %9
9: ; preds = %5, %1
%10 = phi i8* [ %8, %5 ], [ %2, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printstr(void *data) { printf("%s\n", (char *)data); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @printstr(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ Xpool_alloc(int);
int /*<<< orphan*/ Xpool_destroy();
int /*<<< orphan*/ Xpool_free(char *);
int /*<<< orphan*/ Xpool_init(int, int);
int main(int argc, char *argv[]) {
  Xpool_init(10, 96);
  char *p = (char *)Xpool_alloc(20);
  Xpool_free(p);
  Xpool_destroy();
  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)
mov    $0xa,%edi
mov    $0x60,%esi
call   1050 <Xpool_init@plt>
mov    $0x14,%edi
call   1030 <Xpool_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <Xpool_free@plt>
mov    $0x0,%al
call   1060 <Xpool_destroy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x60,%esi
call   1050 <Xpool_init@plt>
mov    $0x14,%edi
call   1030 <Xpool_alloc@plt>
mov    %rax,%rdi
call   1040 <Xpool_free@plt>
xor    %eax,%eax
call   1060 <Xpool_destroy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @Xpool_init(i32 10, i32 96)
%8 = call i64 @Xpool_alloc(i32 20)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @Xpool_free(i8* %10)
%12 = call i32 (...) @Xpool_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @Xpool_init(i32 10, i32 96)
%4 = tail call i64 @Xpool_alloc(i32 20)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @Xpool_free(i8* %5)
%7 = tail call i32 (...) @Xpool_destroy()
ret i32 0
}
void read_bigEndian_int(int *dest, unsigned char *source) {
  *dest = ((source[0] << 24 | source[1] << 16 | source[2] << 8 | source[3]));
}


x86 assembly (clang, -O0):
<read_bigEndian_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
shl    $0x18,%ecx
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bigEndian_int>:
mov    (%rsi),%eax
bswap  %eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @read_bigEndian_int(i32* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = shl nuw i32 %4, 24
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i8, i8* %1, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = or i32 %10, %14
%16 = getelementptr inbounds i8, i8* %1, i64 3
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = or i32 %15, %18
store i32 %19, i32* %0
ret void
}
void XWidthMMOfScreen() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ASN1_item_verify() {
ret void
}
/* Variables and functions */
float ANTweenTimingFunctionQuintOut(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionQuintOut(float time, float duration) {
  return ANTweenTimingFunctionQuintOut(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionQuintOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionQuintOut@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionQuintOut>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionQuintOut@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionQuintOut(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionQuintOut(float %0, i32 0, i32 1, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void scope1(void) {
  if (1) {
    int a = 4;
    (void)a;
  }
  if (1) {
    int a = 5;
    printf("%i\n", a);
  }
}


x86 assembly (clang, -O0):
<scope1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scope1>:
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @scope1() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void times_up(int sig) {
  puts("\nTIMES UP!\n");
  raise(SIGINT);
}


x86 assembly (clang, -O0):
<times_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<times_up>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <raise@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\0ATIMES UP!\0A\00"
@SIGINT = global i32 0
define void @times_up(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @SIGINT
%5 = call i32 @raise(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\0ATIMES UP!\0A\00"
@SIGINT = global i32 0
define void @times_up(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @SIGINT
%4 = tail call i32 @raise(i32 %3)
ret void
}
float babylonianSqrt(int n, float S, float x0) {
  if (n <= 0)
    return x0;
  return (babylonianSqrt(n - 1, S, x0) + (S / babylonianSqrt(n - 1, S, x0))) /
         2;
}


x86 assembly (clang, -O0):
<babylonianSqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     113e <babylonianSqrt+0x2e>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119d <babylonianSqrt+0x8d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <babylonianSqrt@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <babylonianSqrt@plt>
movss  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  0xe6c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<babylonianSqrt>:
test   %edi,%edi
jle    113d <babylonianSqrt+0x2d>
push   %rax
add    $0xffffffff,%edi
movss  %xmm0,0x4(%rsp)
call   1030 <babylonianSqrt@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
addss  %xmm0,%xmm1
mulss  0xec7(%rip),%xmm1
add    $0x8,%rsp
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @babylonianSqrt(i32 %0, float %1, float %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca float
%7 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
store float %2, float* %7
%8 = load i32, i32* %5
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load float, float* %7
store float %11, float* %4
br label %27
12: ; preds = %3
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 1
%15 = load float, float* %6
%16 = load float, float* %7
%17 = call float @babylonianSqrt(i32 %14, float %15, float %16)
%18 = load float, float* %6
%19 = load i32, i32* %5
%20 = sub nsw i32 %19, 1
%21 = load float, float* %6
%22 = load float, float* %7
%23 = call float @babylonianSqrt(i32 %20, float %21, float %22)
%24 = fdiv float %18, %23
%25 = fadd float %17, %24
%26 = fdiv float %25, 2.000000e+00
store float %26, float* %4
br label %27
27: ; preds = %12, %10
%28 = load float, float* %4
ret float %28
}

LLVM IR (-O2):
define float @babylonianSqrt(i32 %0, float %1, float %2) {
%4 = icmp slt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %3, %7
%6 = phi float [ %12, %7 ], [ %2, %3 ]
ret float %6
7: ; preds = %3
%8 = add nsw i32 %0, -1
%9 = tail call float @babylonianSqrt(i32 %8, float %1, float %2)
%10 = fdiv float %1, %9
%11 = fadd float %9, %10
%12 = fmul float %11, 5.000000e-01
br label %5
}
void GlutIdle(void) {}


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

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

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

LLVM IR (-O2):
define void @GlutIdle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void fatal_error(char *message) {
  printf("ERROR: %s\n", message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void ECParameters_print(void) {}


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

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

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

LLVM IR (-O2):
define void @ECParameters_print() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int const);
void close_inet6_rx_sock(const int sock_fd) {
  {};
  if (sock_fd != -1) {
    close(sock_fd);
  }
  {};
}


x86 assembly (clang, -O0):
<close_inet6_rx_sock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     112d <close_inet6_rx_sock+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_inet6_rx_sock>:
cmp    $0xffffffff,%edi
je     111a <close_inet6_rx_sock+0xa>
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @close_inet6_rx_sock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @close_inet6_rx_sock(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fft(float *);
int /*<<< orphan*/ imprimeVetor(float *);
int /*<<< orphan*/ inicializaArray(float *);
int /*<<< orphan*/ ordenaBitReverso(float *);
int main(void) {
  float data[32];
  unsigned long count;
  for (count = 0; count < 1; count++) {
    inicializaArray(data);
    ordenaBitReverso(data - 1);
    fft(data - 1);
  }
  imprimeVetor(data);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x98(%rbp)
cmpq   $0x1,-0x98(%rbp)
01
jae    11ae <main+0x6e>
lea    -0x90(%rbp),%rdi
call   1040 <inicializaArray@plt>
lea    -0x90(%rbp),%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <ordenaBitReverso@plt>
lea    -0x90(%rbp),%rdi
add    $0xfffffffffffffffc,%rdi
call   1060 <fft@plt>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
jmp    115d <main+0x1d>
lea    -0x90(%rbp),%rdi
call   1050 <imprimeVetor@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <inicializaArray@plt>
lea    -0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <ordenaBitReverso@plt>
mov    %rbx,%rdi
call   1060 <fft@plt>
mov    %r14,%rdi
call   1050 <imprimeVetor@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x float]
%3 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %3
br label %4
4: ; preds = %16, %0
%5 = load i64, i64* %3
%6 = icmp ult i64 %5, 1
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%9 = call i32 @inicializaArray(float* %8)
%10 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%11 = getelementptr inbounds float, float* %10, i64 -1
%12 = call i32 @ordenaBitReverso(float* %11)
%13 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%14 = getelementptr inbounds float, float* %13, i64 -1
%15 = call i32 @fft(float* %14)
br label %16
16: ; preds = %7
%17 = load i64, i64* %3
%18 = add i64 %17, 1
store i64 %18, i64* %3
br label %4
19: ; preds = %4
%20 = getelementptr inbounds [32 x float], [32 x float]* %2, i64 0, i64 0
%21 = call i32 @imprimeVetor(float* %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32 x float]
%2 = bitcast [32 x float]* %1 to i8*
%3 = getelementptr inbounds [32 x float], [32 x float]* %1, i64 0, i64 0
%4 = call i32 @inicializaArray(float* %3)
%5 = getelementptr inbounds [32 x float], [32 x float]* %1, i64 0, i64 -1
%6 = call i32 @ordenaBitReverso(float* %5)
%7 = call i32 @fft(float* %5)
%8 = call i32 @imprimeVetor(float* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int die(const char msg[]) {
  printf("Fatal error: %s", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Fatal error: %s\00"
@EXIT_FAILURE = global i32 0
define i32 @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"Fatal error: %s\00"
@EXIT_FAILURE = global i32 0
define i32 @die(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}