xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printerror(char *);
void Usage() {
  printerror("argument syntax error\nhw7 primes -n=maxval\nhw7 trialdiv "
             "-n=number -p=primesfile\nhw7 millerrabin -n=number -t=maxitr "
             "-p=primesfile\nhw7 rndsearch -k=numbits -t=maxitr -p=primesfile "
             "-r=rndfile\nhw7 maurer -k=numbits -p=primesfile -r=rndfile\n");
}


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

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

LLVM IR (-O0):
@.str = [238 x i8] c"argument syntax error\0Ahw7 primes -n=maxval\0Ahw7 trialdiv -n=number -p=primesfile\0Ahw7 millerrabin -n=number -t=maxitr -p=primesfile\0Ahw7 rndsearch -k=numbits -t=maxitr -p=primesfile -r=rndfile\0Ahw7 maurer -k=numbits -p=primesfile -r=rndfile\0A\00"
define void @Usage() {
%1 = call i32 @printerror(i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [238 x i8] c"argument syntax error\0Ahw7 primes -n=maxval\0Ahw7 trialdiv -n=number -p=primesfile\0Ahw7 millerrabin -n=number -t=maxitr -p=primesfile\0Ahw7 rndsearch -k=numbits -t=maxitr -p=primesfile -r=rndfile\0Ahw7 maurer -k=numbits -p=primesfile -r=rndfile\0A\00"
define void @Usage() {
%1 = tail call i32 @printerror(i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_dup3;
int syscall(int /*<<< orphan*/, int, int, int);
__attribute__((always_)) int _syscall_dup3(int oldfd, int newfd, int flags) {
  return syscall(__NR_dup3, oldfd, newfd, flags);
}


x86 assembly (clang, -O0):
<_syscall_dup3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_dup3>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_dup3 = global i32 0
define i32 @_syscall_dup3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @__NR_dup3
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @syscall(i32 %7, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@__NR_dup3 = global i32 0
define i32 @_syscall_dup3(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @__NR_dup3
%5 = tail call i32 @syscall(i32 %4, i32 %0, i32 %1, i32 %2)
ret i32 %5
}
int preinit(const char *arg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @preinit(i8* nocapture readnone %0) {
ret i32 0
}
int av_toupper(int c) {
  if (c >= 'a' && c <= 'z')
    c ^= 0x20;
  return c;
}


x86 assembly (clang, -O0):
<av_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1124 <av_toupper+0x24>
cmpl   $0x7a,-0x4(%rbp)
jg     1124 <av_toupper+0x24>
mov    -0x4(%rbp),%eax
xor    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_toupper>:
lea    -0x61(%rdi),%ecx
mov    %edi,%eax
xor    $0x20,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @av_toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = xor i32 %9, 32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @av_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = xor i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
unsigned char *cbor_write_plong(unsigned char *, unsigned int,
                                unsigned long long);
unsigned char *cbor_write_ulong(unsigned char *data, unsigned int size,
                                unsigned long long value) {
  return cbor_write_plong(data, size, value);
}


x86 assembly (clang, -O0):
<cbor_write_ulong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <cbor_write_plong@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbor_write_ulong>:
jmp    1030 <cbor_write_plong@plt>

LLVM IR (-O0):
define i8* @cbor_write_ulong(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i64, i64* %6
%10 = call i8* @cbor_write_plong(i8* %7, i32 %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @cbor_write_ulong(i8* %0, i32 %1, i64 %2) {
%4 = tail call i8* @cbor_write_plong(i8* %0, i32 %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ rd2_1(int, void *);
int signed_range(int, int);
void test_rd2_1(void) {
  {
    void *null = 0;
    void *p = &null;
    rd2_1(0, null);
    rd2_1(1, p);
  }
  {
    void *null = 0;
    rd2_1(1, null);
  }
  {
    void *null = 0;
    rd2_1(signed_range((1), (2)), null);
  }
}


x86 assembly (clang, -O0):
<test_rd2_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <rd2_1@plt>
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1030 <rd2_1@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x1,%edi
call   1030 <rd2_1@plt>
movq   $0x0,-0x20(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <signed_range@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%rsi
call   1030 <rd2_1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rd2_1>:
push   %rax
movq   $0x0,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
call   1030 <rd2_1@plt>
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <rd2_1@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <rd2_1@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <signed_range@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <rd2_1@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_rd2_1() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* null, i8** %1
%5 = bitcast i8** %1 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %1
%7 = call i32 @rd2_1(i32 0, i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 @rd2_1(i32 1, i8* %8)
store i8* null, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @rd2_1(i32 1, i8* %10)
store i8* null, i8** %4
%12 = call i32 @signed_range(i32 1, i32 2)
%13 = load i8*, i8** %4
%14 = call i32 @rd2_1(i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @test_rd2_1() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = tail call i32 @rd2_1(i32 0, i8* null)
%4 = call i32 @rd2_1(i32 1, i8* %2)
%5 = call i32 @rd2_1(i32 1, i8* null)
%6 = call i32 @signed_range(i32 1, i32 2)
%7 = call i32 @rd2_1(i32 %6, i8* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ nums;

/* Variables and functions */
int jump(int *, int);
int printf(char *, int);
int main(int argc, char *argv[]) {
  int nums[] = {0, 1};
  int size = sizeof(nums) / 4;
  int ret = jump(nums, size);
  return printf("%d\n", ret);
}


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    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x2,-0x1c(%rbp)
lea    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <jump@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x100000000,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1040 <jump@plt>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.nums = [2 x i32] [i32 0, i32 1]
@.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 [2 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [2 x i32]* %6 to i8*
store i32 2, i32* %7
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%11 = load i32, i32* %7
%12 = call i32 @jump(i32* %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 4294967296, i64* %3
%5 = bitcast i64* %3 to i32*
%6 = call i32 @jump(i32* %5, i32 2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 %7
}
void SensorSetMirrorFlip_SANYO(unsigned char val) {}


x86 assembly (clang, -O0):
<SensorSetMirrorFlip_SANYO>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SensorSetMirrorFlip_SANYO(i8 zeroext %0) {
ret void
}
const char *table(unsigned char code) {
  static const char *type[] = {"BIOS", "System"};
  return type[code];
}


x86 assembly (clang, -O0):
<table>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,%ecx
lea    0x2f19(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<table>:
mov    %edi,%eax
lea    0xef7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@table.type = internal global [2 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0)]
@.str = [5 x i8] c"BIOS\00"
@.str.1 = [7 x i8] c"System\00"
define i8* @table(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* @table.type, i64 0, i64 %4
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@reltable.table = internal unnamed_addr constant [2 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([2 x i32]* @reltable.table to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([2 x i32]* @reltable.table to i64)) to i32)]
@.str = [5 x i8] c"BIOS\00"
@.str.1 = [7 x i8] c"System\00"
define i8* @table(i8 zeroext %0) {
%2 = zext i8 %0 to i64
%3 = shl i64 %2, 2
%4 = call i8* @llvm.load.relative.i64(i8* bitcast ([2 x i32]* @reltable.table to i8*), i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_warranty() {
  puts("For warranty information:");
  puts("Read sections 15-17 in the LICENSE or");
  puts("download the GPL v3.0 license from:");
  puts("http://www.gnu.org/licenses/gpl-3.0.txt");
}


x86 assembly (clang, -O0):
<print_warranty>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_warranty>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf10(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"For warranty information:\00"
@.str.1 = [38 x i8] c"Read sections 15-17 in the LICENSE or\00"
@.str.2 = [36 x i8] c"download the GPL v3.0 license from:\00"
@.str.3 = [40 x i8] c"http://www.gnu.org/licenses/gpl-3.0.txt\00"
define void @print_warranty() {
%1 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"For warranty information:\00"
@.str.1 = [38 x i8] c"Read sections 15-17 in the LICENSE or\00"
@.str.2 = [36 x i8] c"download the GPL v3.0 license from:\00"
@.str.3 = [40 x i8] c"http://www.gnu.org/licenses/gpl-3.0.txt\00"
define void @print_warranty() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, unsigned int *);
unsigned int get_rng_ceil() {
  unsigned int rng_ceil;
  puts("I assume you are using a Random Number Generator (RNG) that cannot "
       "generate zeroes.");
  puts("What is the largest number your RNG can generate?");
  scanf("%d", &rng_ceil);
  return rng_ceil;
}


x86 assembly (clang, -O0):
<get_rng_ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rng_ceil>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xf46(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [84 x i8] c"I assume you are using a Random Number Generator (RNG) that cannot generate zeroes.\00"
@.str.1 = [50 x i8] c"What is the largest number your RNG can generate?\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @get_rng_ceil() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [84 x i8] c"I assume you are using a Random Number Generator (RNG) that cannot generate zeroes.\00"
@.str.1 = [50 x i8] c"What is the largest number your RNG can generate?\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @get_rng_ceil() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
ret i32 %6
}
void __attribute__((sysv_abi)) hal_halt(void) {}


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

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

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

LLVM IR (-O2):
define void @hal_halt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dajmid(float f) {
  if (f > 0.1)
    printf("Velika greska!");
  else if (f >= 0.01)
    printf("Srednja greska!");
  else
    printf("Mala greska!");
}


x86 assembly (clang, -O0):
<dajmid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1149 <dajmid+0x39>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
jmp    1186 <dajmid+0x76>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeae(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1175 <dajmid+0x65>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <dajmid+0x71>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1186 <dajmid+0x76>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dajmid>:
cvtss2sd %xmm0,%xmm0
ucomisd 0xee4(%rip),%xmm0
lea    0xf0c(%rip),%rax
lea    0xef5(%rip),%rcx
cmovb  %rax,%rcx
ucomisd 0xed2(%rip),%xmm0
lea    0xed3(%rip),%rdi
cmovbe %rcx,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Velika greska!\00"
@.str.1 = [16 x i8] c"Srednja greska!\00"
@.str.2 = [13 x i8] c"Mala greska!\00"
define void @dajmid(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ogt double %4, 1.000000e-01
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %17
8: ; preds = %1
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fcmp oge double %10, 1.000000e-02
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %16
14: ; preds = %8
%15 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
br label %17
17: ; preds = %16, %6
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Velika greska!\00"
@.str.1 = [16 x i8] c"Srednja greska!\00"
@.str.2 = [13 x i8] c"Mala greska!\00"
define void @dajmid(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ogt double %2, 1.000000e-01
%4 = fcmp ult double %2, 1.000000e-02
%5 = select i1 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0)
%6 = select i1 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5
%7 = tail call i32 @printf(i8* dereferenceable(1) %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *p = realloc(ptr, size);
  if (p == NULL)
    error(1, 0, "Out of memory, realloc failed");
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <xrealloc+0x3f>
mov    $0x1,%edi
xor    %esi,%esi
lea    0xea6(%rip),%rdx
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1141 <xrealloc+0x21>
lea    0xecb(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [30 x i8] c"Out of memory, realloc failed\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int game_main(int, char **);
int main(int argc, char **argv) { return game_main(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <game_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <game_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @game_main(i32 %0, i8** %1)
ret i32 %3
}
void foo197() {}


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

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

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

LLVM IR (-O2):
define void @foo197() {
ret void
}
/* Type definitions */
struct msghdr {
  int dummy;
};
struct cmsghdr {
  int dummy;
};

/* Variables and functions */
struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *);
struct cmsghdr *cmsg_firsthdr(struct msghdr *msgh) {
  return CMSG_FIRSTHDR(msgh);
}


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

x86 assembly (clang, -O2):
<cmsg_firsthdr>:
jmp    1030 <CMSG_FIRSTHDR@plt>

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

LLVM IR (-O2):
%struct.cmsghdr = type { i32 }
%struct.msghdr = type { i32 }
define %struct.cmsghdr* @cmsg_firsthdr(%struct.msghdr* %0) {
%2 = tail call %struct.cmsghdr* @CMSG_FIRSTHDR(%struct.msghdr* %0)
ret %struct.cmsghdr* %2
}
float int16ToFloat(signed short sample) {
  return (float)(sample * (0.00003051850947599719f));
}


x86 assembly (clang, -O0):
<int16ToFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xee5(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<int16ToFloat>:
cvtsi2ss %edi,%xmm0
mulss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @int16ToFloat(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = sitofp i32 %4 to float
%6 = fmul float %5, 0x3F00002000000000
ret float %6
}

LLVM IR (-O2):
define float @int16ToFloat(i16 signext %0) {
%2 = sitofp i16 %0 to float
%3 = fmul float %2, 0x3F00002000000000
ret float %3
}
void I422ToRGBARow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGBARow_NEON() {
ret void
}
void HWBISTTestLogicSet(unsigned long ulLogicError) {
  unsigned long ulAllowSave;
  ulAllowSave = (*((volatile unsigned long *)(0x400FB980)));
  (*((volatile unsigned long *)(0x400FB980))) = 0xA5A5A5A5;
  (*((volatile unsigned long *)(0x400FBB00 + 0x00000030))) |=
      (ulLogicError << 12) & 0xFFFFF000;
  (*((volatile unsigned long *)(0x400FB980))) = ulAllowSave;
}


x86 assembly (clang, -O0):
<HWBISTTestLogicSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400fb980,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    $0x400fb980,%eax
mov    $0xa5a5a5a5,%ecx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
shl    $0xc,%rax
movabs $0xfffff000,%rcx
and    %rcx,%rax
mov    $0x400fbb30,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fbb30,%eax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    $0x400fb980,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HWBISTTestLogicSet>:
mov    0x400fb980,%rax
40
mov    $0xa5a5a5a5,%ecx
mov    %rcx,0x400fb980
40
shl    $0xc,%edi
or     %rdi,0x400fbb30
40
mov    %rax,0x400fb980
40
ret

LLVM IR (-O0):
define void @HWBISTTestLogicSet(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074772352 to i64*)
store i64 %4, i64* %3
store volatile i64 2779096485, i64* inttoptr (i64 1074772352 to i64*)
%5 = load i64, i64* %2
%6 = shl i64 %5, 12
%7 = and i64 %6, 4294963200
%8 = load volatile i64, i64* inttoptr (i64 1074772784 to i64*)
%9 = or i64 %8, %7
store volatile i64 %9, i64* inttoptr (i64 1074772784 to i64*)
%10 = load i64, i64* %3
store volatile i64 %10, i64* inttoptr (i64 1074772352 to i64*)
ret void
}

LLVM IR (-O2):
define void @HWBISTTestLogicSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074772352 to i64*)
store volatile i64 2779096485, i64* inttoptr (i64 1074772352 to i64*)
%3 = shl i64 %0, 12
%4 = and i64 %3, 4294963200
%5 = load volatile i64, i64* inttoptr (i64 1074772784 to i64*)
%6 = or i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074772784 to i64*)
store volatile i64 %2, i64* inttoptr (i64 1074772352 to i64*)
ret void
}
unsigned int float12ToInt(unsigned short f12) {
  return (f12 & 0x1ff) << ((f12 >> 9) * 4);
}


x86 assembly (clang, -O0):
<float12ToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0x1ff,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x9,%ecx
shl    $0x2,%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float12ToInt>:
mov    %edi,%ecx
mov    %edi,%eax
and    $0x1ff,%eax
shr    $0x7,%ecx
and    $0xfc,%cl
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @float12ToInt(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 511
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = ashr i32 %7, 9
%9 = mul nsw i32 %8, 4
%10 = shl i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @float12ToInt(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = and i32 %2, 511
%4 = lshr i32 %2, 7
%5 = and i32 %4, 508
%6 = shl i32 %3, %5
ret i32 %6
}
void GOMP_loop_end_nowait(void) {}


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

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

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

LLVM IR (-O2):
define void @GOMP_loop_end_nowait() {
ret void
}
/* Type definitions */
struct qt_atom {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct qt_atom *);
void free_free(struct qt_atom *self) { free(self); }


x86 assembly (clang, -O0):
<free_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):
<free_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.qt_atom = type { i32 }
define void @free_free(%struct.qt_atom* nocapture %0) {
%2 = tail call i32 @free(%struct.qt_atom* %0)
ret void
}
/* Variables and functions */
int SHRT_MAX;
scalar_t__ USHRT_MAX;
int pioneer_buf_to_int(unsigned char *buf) {
  int val = buf[0] + 256 * buf[1];
  if (val > SHRT_MAX)
    val -= USHRT_MAX;
  return val;
}


x86 assembly (clang, -O0):
<pioneer_buf_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
jle    1145 <pioneer_buf_to_int+0x45>
mov    0x2eb0(%rip),%rax
mov    (%rax),%rcx
movslq -0xc(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pioneer_buf_to_int>:
movzwl (%rdi),%eax
mov    0x2ece(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%eax
jle    1119 <pioneer_buf_to_int+0x19>
mov    0x2ed1(%rip),%rcx
mov    (%rcx),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
@SHRT_MAX = global i32 0
@USHRT_MAX = global i64 0
define i32 @pioneer_buf_to_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = mul nsw i32 256, %11
%13 = add nsw i32 %7, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = load i32, i32* @SHRT_MAX
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %23
17: ; preds = %1
%18 = load i64, i64* @USHRT_MAX
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = sub nsw i64 %20, %18
%22 = trunc i64 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %17, %1
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
@SHRT_MAX = global i32 0
@USHRT_MAX = global i64 0
define i32 @pioneer_buf_to_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = load i32, i32* @SHRT_MAX
%10 = icmp sgt i32 %8, %9
%11 = load i64, i64* @USHRT_MAX
%12 = trunc i64 %11 to i32
%13 = select i1 %10, i32 %12, i32 0
%14 = sub i32 %8, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void geral_erro() {
  perror("\nErro no programa");
  printf("Aperte qualquer tecla para continuar...\n\n");
  system("read pause");
}


x86 assembly (clang, -O0):
<geral_erro>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <perror@plt>
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<geral_erro>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <perror@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"\0AErro no programa\00"
@.str.1 = [42 x i8] c"Aperte qualquer tecla para continuar...\0A\0A\00"
@.str.2 = [11 x i8] c"read pause\00"
define void @geral_erro() {
%1 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0AErro no programa\00"
@.str.2 = [11 x i8] c"read pause\00"
@str = [41 x i8] c"Aperte qualquer tecla para continuar...\0A\00"
define void @geral_erro() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void maildir_finish(struct folder *fptr) {}


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

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

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

LLVM IR (-O2):
%struct.folder = type opaque
define void @maildir_finish(%struct.folder* nocapture %0) {
ret void
}
void X509V3_EXT_add_alias(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_add_alias() {
ret void
}
void f(void) {
  int a[100], b[100], c[100];
  int i, j;
#pragma hlt fusion
  {
    for (i = 0; i < 100; i++) {
      a[i] = 0;
    }
    c[3] = 4;
    for (j = 0; j < 100; j++) {
      b[j] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
movl   $0x0,-0x4b4(%rbp)
cmpl   $0x64,-0x4b4(%rbp)
jge    1148 <f+0x48>
movslq -0x4b4(%rbp),%rax
movl   $0x0,-0x190(%rbp,%rax,4)
mov    -0x4b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4b4(%rbp)
jmp    1115 <f+0x15>
movl   $0x4,-0x4a4(%rbp)
movl   $0x0,-0x4b8(%rbp)
cmpl   $0x64,-0x4b8(%rbp)
jge    118f <f+0x8f>
movslq -0x4b8(%rbp),%rax
movl   $0x0,-0x320(%rbp,%rax,4)
mov    -0x4b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4b8(%rbp)
jmp    115c <f+0x5c>
add    $0x440,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca [100 x i32]
%2 = alloca [100 x i32]
%3 = alloca [100 x i32]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %4
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 100
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %11
store i32 0, i32* %12
br label %13
13: ; preds = %9
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %6
16: ; preds = %6
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 3
store i32 4, i32* %17
store i32 0, i32* %5
br label %18
18: ; preds = %25, %16
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 100
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %23
store i32 0, i32* %24
br label %25
25: ; preds = %21
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %18
28: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ carrega_valores(double **, int, int, double *);
double **matriz(int, int);
double **matriz_valores(int l, int c, double *m) {
  double **M = matriz(l, c);
  carrega_valores(M, l, c, m);
  return M;
}


x86 assembly (clang, -O0):
<matriz_valores>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <matriz@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
call   1040 <carrega_valores@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matriz_valores>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%ebx
call   1030 <matriz@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14,%rcx
call   1040 <carrega_valores@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double** @matriz_valores(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca double**
store i32 %0, i32* %4
store i32 %1, i32* %5
store double* %2, double** %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call double** @matriz(i32 %8, i32 %9)
store double** %10, double*** %7
%11 = load double**, double*** %7
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load double*, double** %6
%15 = call i32 @carrega_valores(double** %11, i32 %12, i32 %13, double* %14)
%16 = load double**, double*** %7
ret double** %16
}

LLVM IR (-O2):
define double** @matriz_valores(i32 %0, i32 %1, double* %2) {
%4 = tail call double** @matriz(i32 %0, i32 %1)
%5 = tail call i32 @carrega_valores(double** %4, i32 %0, i32 %1, double* %2)
ret double** %4
}
void PDMR3CritSectEnterEx(void) {}


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ TD_OK;
td_err_e td_thr_event_enable(td_thrhandle_t const *handle, int event) {
  return TD_OK;
}


x86 assembly (clang, -O0):
<td_thr_event_enable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@TD_OK = global i32 0
define i32 @td_thr_event_enable(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @TD_OK
ret i32 %5
}

LLVM IR (-O2):
@TD_OK = global i32 0
define i32 @td_thr_event_enable(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @TD_OK
ret i32 %3
}
/* Variables and functions */
void *mpgdecoder_alloc();
void *default_mpgdecoder_alloc(void) { return mpgdecoder_alloc(); }


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

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

LLVM IR (-O0):
define i8* @default_mpgdecoder_alloc() {
%1 = call i8* (...) @mpgdecoder_alloc()
ret i8* %1
}

LLVM IR (-O2):
define i8* @default_mpgdecoder_alloc() {
%1 = tail call i8* (...) @mpgdecoder_alloc()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ check(long long *, long long *);
int /*<<< orphan*/ init(long long *, long long *);
int /*<<< orphan*/ vec_mult(long long *);
int /*<<< orphan*/ vec_mult_ref(long long *);
int main() {
  long long p1[100000], p2[100000];
  long long v1[100000], v2[100000];
  init(v1, v2);
  vec_mult_ref(p1);
  vec_mult(p2);
  check(p1, p2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30d410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x249f10(%rbp),%rdi
lea    -0x30d410(%rbp),%rsi
call   1030 <init@plt>
lea    -0xc3510(%rbp),%rdi
call   1040 <vec_mult_ref@plt>
lea    -0x186a10(%rbp),%rdi
call   1060 <vec_mult@plt>
lea    -0xc3510(%rbp),%rdi
lea    -0x186a10(%rbp),%rsi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x30d410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x30d408,%rsp
lea    0xc3500(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <init@plt>
lea    0x249f00(%rsp),%r14
mov    %r14,%rdi
call   1040 <vec_mult_ref@plt>
lea    0x186a00(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <vec_mult@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <check@plt>
xor    %eax,%eax
add    $0x30d408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100000 x i64]
%3 = alloca [100000 x i64]
%4 = alloca [100000 x i64]
%5 = alloca [100000 x i64]
store i32 0, i32* %1
%6 = getelementptr inbounds [100000 x i64], [100000 x i64]* %4, i64 0, i64 0
%7 = getelementptr inbounds [100000 x i64], [100000 x i64]* %5, i64 0, i64 0
%8 = call i32 @init(i64* %6, i64* %7)
%9 = getelementptr inbounds [100000 x i64], [100000 x i64]* %2, i64 0, i64 0
%10 = call i32 @vec_mult_ref(i64* %9)
%11 = getelementptr inbounds [100000 x i64], [100000 x i64]* %3, i64 0, i64 0
%12 = call i32 @vec_mult(i64* %11)
%13 = getelementptr inbounds [100000 x i64], [100000 x i64]* %2, i64 0, i64 0
%14 = getelementptr inbounds [100000 x i64], [100000 x i64]* %3, i64 0, i64 0
%15 = call i32 @check(i64* %13, i64* %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100000 x i64]
%2 = alloca [100000 x i64]
%3 = alloca [100000 x i64]
%4 = alloca [100000 x i64]
%5 = bitcast [100000 x i64]* %1 to i8*
%6 = bitcast [100000 x i64]* %2 to i8*
%7 = bitcast [100000 x i64]* %3 to i8*
%8 = bitcast [100000 x i64]* %4 to i8*
%9 = getelementptr inbounds [100000 x i64], [100000 x i64]* %3, i64 0, i64 0
%10 = getelementptr inbounds [100000 x i64], [100000 x i64]* %4, i64 0, i64 0
%11 = call i32 @init(i64* %9, i64* %10)
%12 = getelementptr inbounds [100000 x i64], [100000 x i64]* %1, i64 0, i64 0
%13 = call i32 @vec_mult_ref(i64* %12)
%14 = getelementptr inbounds [100000 x i64], [100000 x i64]* %2, i64 0, i64 0
%15 = call i32 @vec_mult(i64* %14)
%16 = call i32 @check(i64* %12, i64* %14)
ret i32 0
}
int check_subnet_v6(const struct sockaddr_in6 *UNUSED_address
                    __attribute__((unused)),
                    const struct sockaddr_in6 *UNUSED_mask
                    __attribute__((unused)),
                    const struct addrinfo *UNUSED_ai __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sockaddr_in6 = type opaque
%struct.addrinfo = type opaque
define i32 @check_subnet_v6(%struct.sockaddr_in6* %0, %struct.sockaddr_in6* %1, %struct.addrinfo* %2) {
%4 = alloca %struct.sockaddr_in6*
%5 = alloca %struct.sockaddr_in6*
%6 = alloca %struct.addrinfo*
store %struct.sockaddr_in6* %0, %struct.sockaddr_in6** %4
store %struct.sockaddr_in6* %1, %struct.sockaddr_in6** %5
store %struct.addrinfo* %2, %struct.addrinfo** %6
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in6 = type opaque
%struct.addrinfo = type opaque
define i32 @check_subnet_v6(%struct.sockaddr_in6* nocapture readnone %0, %struct.sockaddr_in6* nocapture readnone %1, %struct.addrinfo* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
void *malloc(unsigned long);
void *realloc(char *, unsigned long);
void *Xrealloc(void *old, unsigned long amount) {
  if (amount == 0)
    amount = 1;
  if (!old)
    return malloc(amount);
  return realloc((char *)old, amount);
}


x86 assembly (clang, -O0):
<Xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1143 <Xrealloc+0x23>
movq   $0x1,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1160 <Xrealloc+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <Xrealloc+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xrealloc>:
mov    %rsi,%rax
test   %rsi,%rsi
mov    $0x1,%esi
cmovne %rax,%rsi
test   %rdi,%rdi
je     1139 <Xrealloc+0x19>
jmp    1040 <realloc@plt>
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @Xrealloc(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = select i1 %3, i64 1, i64 %1
%5 = icmp eq i8* %0, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i8* @malloc(i64 %4)
br label %10
8: ; preds = %2
%9 = tail call i8* @realloc(i8* %0, i64 %4)
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ %9, %8 ], [ %7, %6 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void goodG2B() {
  char data;
  data = ' ';
  data = 2;
  {
    char result = data + 1;
    printf("%d\n", result);
  }
}


x86 assembly (clang, -O0):
<goodG2B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x20,-0x1(%rbp)
movb   $0x2,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x2(%rbp)
lea    0xecf(%rip),%rdi
movsbl -0x2(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @goodG2B() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 3)
ret void
}
/* Variables and functions */
size_t chrsw(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ utf8_chrw(char const *);
size_t utf8_chrsw(const char str[]) { return chrsw(str, utf8_chrw(str)); }


x86 assembly (clang, -O0):
<utf8_chrsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <utf8_chrw@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <chrsw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_chrsw>:
push   %rbx
mov    %rdi,%rbx
call   1040 <utf8_chrw@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <chrsw@plt>

LLVM IR (-O0):
define i64 @utf8_chrsw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @utf8_chrw(i8* %4)
%6 = call i64 @chrsw(i8* %3, i32 %5)
ret i64 %6
}

LLVM IR (-O2):
define i64 @utf8_chrsw(i8* %0) {
%2 = tail call i32 @utf8_chrw(i8* %0)
%3 = tail call i64 @chrsw(i8* %0, i32 %2)
ret i64 %3
}
/* Type definitions */
struct stat64 {
  int dummy;
};

/* Variables and functions */
int xbp_lstat64(char const *, struct stat64 *);
int __wrap_lstat64(const char *path, struct stat64 *buf) {
  return xbp_lstat64(path, buf);
}


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

x86 assembly (clang, -O2):
<__wrap_lstat64>:
jmp    1030 <xbp_lstat64@plt>

LLVM IR (-O0):
%struct.stat64 = type { i32 }
define i32 @__wrap_lstat64(i8* %0, %struct.stat64* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat64*
store i8* %0, i8** %3
store %struct.stat64* %1, %struct.stat64** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat64*, %struct.stat64** %4
%7 = call i32 @xbp_lstat64(i8* %5, %struct.stat64* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat64 = type { i32 }
define i32 @__wrap_lstat64(i8* %0, %struct.stat64* %1) {
%3 = tail call i32 @xbp_lstat64(i8* %0, %struct.stat64* %1)
ret i32 %3
}
void enableInterrupts() { __asm__ volatile("sti"); }


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

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

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

LLVM IR (-O2):
define void @enableInterrupts() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}