xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ time_t;
struct timeval {
  scalar_t__ tv_sec;
};

/* Variables and functions */
int gettimeofday_virtual(struct timeval *, int /*<<< orphan*/);
time_t time_virtual(time_t *p) {
  struct timeval tv;
  time_t ret;
  if (gettimeofday_virtual(&tv, 0) == -1)
    ret = (time_t)-1;
  else
    ret = tv.tv_sec;
  if (p)
    *p = ret;
  return ret;
}


x86 assembly (clang, -O0):
<time_virtual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday_virtual@plt>
cmp    $0xffffffff,%eax
jne    113d <time_virtual+0x2d>
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
jmp    1145 <time_virtual+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115b <time_virtual+0x4b>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_virtual>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday_virtual@plt>
mov    %eax,%ecx
mov    $0xffffffffffffffff,%rax
cmp    $0xffffffff,%ecx
je     1137 <time_virtual+0x27>
mov    0x8(%rsp),%rax
test   %rbx,%rbx
je     113f <time_virtual+0x2f>
mov    %rax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i64 @time_virtual(i64* writeonly %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday_virtual(%struct.timeval* %2, i32 0)
%5 = icmp eq i32 %4, -1
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = select i1 %5, i64 -1, i64 %7
%9 = icmp eq i64* %0, null
br i1 %9, label %11, label %10
10: ; preds = %1
store i64 %8, i64* %0
br label %11
11: ; preds = %10, %1
ret i64 %8
}
int test_imm_72uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x72 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_72uint64_highword_reg>:
movabs $0x7200000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_72uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 489626271744
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void fn_test4(void) {
  int a = 0;
  a++;
}


x86 assembly (clang, -O0):
<fn_test4>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fn_test4() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
ret void
}

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

/* Variables and functions */
void mp2vpic_set_codingtype(uint8_t *p_mp2vpic, uint8_t i_codingtype) {
  p_mp2vpic[5] &= ~0x38;
  p_mp2vpic[5] |= (i_codingtype << 3) & 0x38;
}


x86 assembly (clang, -O0):
<mp2vpic_set_codingtype>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
and    $0xffffffc7,%ecx
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x3,%ecx
and    $0x38,%ecx
mov    -0x8(%rbp),%rax
or     0x14(%rax),%ecx
mov    %ecx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpic_set_codingtype>:
mov    0x14(%rdi),%eax
and    $0xffffffc7,%eax
and    $0x7,%esi
lea    (%rax,%rsi,8),%eax
mov    %eax,0x14(%rdi)
ret

LLVM IR (-O0):
define void @mp2vpic_set_codingtype(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 5
%7 = load i32, i32* %6
%8 = and i32 %7, -57
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = shl i32 %9, 3
%11 = and i32 %10, 56
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 5
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @mp2vpic_set_codingtype(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 5
%4 = load i32, i32* %3
%5 = and i32 %4, -57
%6 = shl i32 %1, 3
%7 = and i32 %6, 56
%8 = or i32 %5, %7
store i32 %8, i32* %3
ret void
}
void swap_dws(void *wrb, int len) {}


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

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

LLVM IR (-O0):
define void @swap_dws(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @swap_dws(i8* nocapture %0, i32 %1) {
ret void
}
leng(s) char *s;
{
  int l;
  for (l = 0; s[l]; l++)
    ;
  return (l);
}


x86 assembly (clang, -O0):
<leng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1134 <leng+0x34>
jmp    1126 <leng+0x26>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <leng+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

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


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <f+0x9>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1119 <f+0x9>

x86 assembly (clang, -O2):
<f>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1120 <f+0x10>

LLVM IR (-O0):
define void @f() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @assert(i32 0)
br label %1
}

LLVM IR (-O2):
define void @f() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @assert(i32 0)
br label %1
}
int return_1(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @return_1() {
ret i32 1
}

LLVM IR (-O2):
define i32 @return_1() {
ret i32 1
}
void bug1(void) {
  int *p = 1000;
  *p = 10;
  printf("%s: %d\n", __FUNCTION__, *p);
}


x86 assembly (clang, -O0):
<bug1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3e8,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xec8(%rip),%rdi
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bug1>:
movl   $0xa,0x3e8
lea    0xede(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0xa,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %d\0A\00"
@__FUNCTION__.bug1 = [5 x i8] c"bug1\00"
define void @bug1() {
%1 = alloca i32*
store i32* inttoptr (i64 1000 to i32*), i32** %1
%2 = load i32*, i32** %1
store i32 10, i32* %2
%3 = load i32*, i32** %1
%4 = load i32, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.bug1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %d\0A\00"
@__FUNCTION__.bug1 = [5 x i8] c"bug1\00"
define void @bug1() {
store i32 10, i32* inttoptr (i64 1000 to i32*)
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.bug1, i64 0, i64 0), i32 10)
ret void
}
/* Variables and functions */
size_t strlen2(const char *s, size_t maxlen) {
  size_t len = 0;
  while (s[len] && len < maxlen)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<strlen2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     113c <strlen2+0x3c>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    114c <strlen2+0x4c>
jmp    115d <strlen2+0x5d>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strlen2+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen2>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,(%rdi,%rcx,1)
je     1122 <strlen2+0x22>
cmp    %rsi,%rcx
mov    %rax,%rcx
jb     1110 <strlen2+0x10>
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @strlen2(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %19, %2
%7 = load i8*, i8** %3
%8 = load i64, i64* %5
%9 = getelementptr inbounds i8, i8* %7, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %6
%14 = load i64, i64* %5
%15 = load i64, i64* %4
%16 = icmp ult i64 %14, %15
br label %17
17: ; preds = %13, %6
%18 = phi i1 [ false, %6 ], [ %16, %13 ]
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = load i64, i64* %5
%21 = add i64 %20, 1
store i64 %21, i64* %5
br label %6
22: ; preds = %17
%23 = load i64, i64* %5
ret i64 %23
}

LLVM IR (-O2):
define i64 @strlen2(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %10, %3 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
%8 = icmp ult i64 %4, %1
%9 = select i1 %7, i1 %8, i1 false
%10 = add nuw i64 %4, 1
br i1 %9, label %3, label %11
11: ; preds = %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G1_f(char *s) {
  debug("G1_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G1_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G1_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf04(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"G1_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G1_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [45 x i8] c"G1_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G1_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int exiterr(const char *s) {
  perror(s);
  exit(-1);
}


x86 assembly (clang, -O0):
<exiterr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exiterr>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @exiterr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @exiterr(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int suma, licznik, start, stop;
  suma = 0;
  start = 1;
  stop = 20;
  for (licznik = start; licznik <= stop; licznik++) {
    suma = suma + licznik;
  }
  printf("Suma liczb naturalnych od %d do %d wynosi %d \n", start, stop, suma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     115d <main+0x4d>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [47 x i8] c"Suma liczb naturalnych od %d do %d wynosi %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 1, i32 20, i32 210)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Report(char *);
int astGFlush(void) {
  Report("astGFlush");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"astGFlush\00"
define i32 @astGFlush() {
%1 = tail call i32 @Report(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
void rx_free(const void *rx) {
  if (rx) {
    regfree((regex_t *)rx);
    free((void *)rx);
  }
}


x86 assembly (clang, -O0):
<rx_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <rx_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <regfree@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rx_free>:
test   %rdi,%rdi
je     1137 <rx_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <regfree@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @rx_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @regfree(i32* %4)
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_error(char const *);
void error(const char *msg) {
  print_error(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print_error@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <print_error@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_error(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = tail call i32 @print_error(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int IntToBcd11(int aa, char xx[]) {
  if (aa > 256 * 256)
    return (-1);
  xx[0] = aa / 256;
  xx[1] = aa % 256;
  return (0);
}


x86 assembly (clang, -O0):
<IntToBcd11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x10000,-0x8(%rbp)
jle    1124 <IntToBcd11+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    1152 <IntToBcd11+0x52>
mov    -0x8(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntToBcd11>:
mov    $0xffffffff,%eax
cmp    $0x10000,%edi
jg     1120 <IntToBcd11+0x20>
lea    0xff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
mov    %ah,(%rsi)
mov    %dil,0x1(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @IntToBcd11(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 65536
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = sdiv i32 %0, 256
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = trunc i32 %0 to i8
%8 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %7, i8* %8
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %10
}
int ft_trim(char c) {
  if (c == ' ' || c == '\t' || c == '\f' || c == '\v' || c == '\r' || c == '\n')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_trim>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1158 <ft_trim+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1158 <ft_trim+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xc,%eax
je     1158 <ft_trim+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xb,%eax
je     1158 <ft_trim+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
je     1158 <ft_trim+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    1164 <ft_trim+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <ft_trim+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_trim>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%cl
jae    110e <ft_trim+0xe>
ret
cmp    $0x20,%dil
je     110d <ft_trim+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_trim(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 13, label %3
i8 12, label %3
i8 11, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
struct ev_loop *__attribute__((unused)) ev_default_loop_uc_(void) {
  extern struct ev_loop *ev_default_loop_ptr;
  return ev_default_loop_ptr;
}


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

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

LLVM IR (-O0):
%struct.ev_loop = type opaque
@ev_default_loop_ptr = external global %struct.ev_loop*
define %struct.ev_loop* @ev_default_loop_uc_() {
%1 = load %struct.ev_loop*, %struct.ev_loop** @ev_default_loop_ptr
ret %struct.ev_loop* %1
}

LLVM IR (-O2):
%struct.ev_loop = type opaque
@ev_default_loop_ptr = external global %struct.ev_loop*
define %struct.ev_loop* @ev_default_loop_uc_() {
%1 = load %struct.ev_loop*, %struct.ev_loop** @ev_default_loop_ptr
ret %struct.ev_loop* %1
}
/* Variables and functions */
int gethostname(char *, size_t);
int c_gethostname(char *name, size_t len) { return gethostname(name, len); }


x86 assembly (clang, -O0):
<c_gethostname>:
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 <gethostname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_gethostname>:
jmp    1030 <gethostname@plt>

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

LLVM IR (-O2):
define i32 @c_gethostname(i8* %0, i64 %1) {
%3 = tail call i32 @gethostname(i8* %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
int getfloat(float *);
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float test;
  int status;
  status = getfloat(&test);
  printf("status: %d\n", status);
  printf("value: %f\n\n", test);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <getfloat@plt>
mov    %eax,-0xc(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <getfloat@plt>
cvtsi2ss %eax,%xmm0
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"status: %d\0A\00"
@.str.1 = [12 x i8] c"value: %f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @getfloat(float* %2)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to float
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %6)
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"status: %d\0A\00"
@.str.1 = [12 x i8] c"value: %f\0A\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @getfloat(float* %1)
%4 = sitofp i32 %3 to float
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %4)
%6 = load float, float* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %6)
ret i32 0
}
void Em_EEPROM_Stop(void) {}


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

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

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

LLVM IR (-O2):
define void @Em_EEPROM_Stop() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_dobldobl_Laurent_size_limit(int k, int *szl) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(605, &k, szl, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_dobldobl_Laurent_size_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x25d,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_dobldobl_Laurent_size_limit>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x25d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_dobldobl_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 605, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_dobldobl_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 605, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Variables and functions */
bool nrf53_errata_19(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_19() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ pawns_with_west_adj_neighbors(int);
void pawns_with_west_adj_neighbors_test(void **state) {
  assert_int_equal(0x0000000010000000ul,
                   pawns_with_west_adj_neighbors(0x0000000018000000ul));
}


x86 assembly (clang, -O0):
<pawns_with_west_adj_neighbors_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x18000000,%edi
call   1030 <pawns_with_west_adj_neighbors@plt>
mov    %eax,%esi
mov    $0x10000000,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pawns_with_west_adj_neighbors_test>:
push   %rax
mov    $0x18000000,%edi
call   1030 <pawns_with_west_adj_neighbors@plt>
mov    $0x10000000,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @pawns_with_west_adj_neighbors_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @pawns_with_west_adj_neighbors(i32 402653184)
%4 = call i32 @assert_int_equal(i32 268435456, i32 %3)
ret void
}

LLVM IR (-O2):
define void @pawns_with_west_adj_neighbors_test(i8** nocapture readnone %0) {
%2 = tail call i32 @pawns_with_west_adj_neighbors(i32 402653184)
%3 = tail call i32 @assert_int_equal(i32 268435456, i32 %2)
ret void
}
int SequentialSearch(int a[], int Value) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SequentialSearch(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
int triple_is_branch_type(struct compile_state *, struct triple *, int);
int triple_is_ret(struct compile_state *state, struct triple *ins) {
  return triple_is_branch_type(state, ins, 0x060);
}


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

x86 assembly (clang, -O2):
<triple_is_ret>:
mov    $0x60,%edx
jmp    1030 <triple_is_branch_type@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define i32 @triple_is_ret(%struct.compile_state* %0, %struct.triple* %1) {
%3 = alloca %struct.compile_state*
%4 = alloca %struct.triple*
store %struct.compile_state* %0, %struct.compile_state** %3
store %struct.triple* %1, %struct.triple** %4
%5 = load %struct.compile_state*, %struct.compile_state** %3
%6 = load %struct.triple*, %struct.triple** %4
%7 = call i32 @triple_is_branch_type(%struct.compile_state* %5, %struct.triple* %6, i32 96)
ret i32 %7
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define i32 @triple_is_ret(%struct.compile_state* %0, %struct.triple* %1) {
%3 = tail call i32 @triple_is_branch_type(%struct.compile_state* %0, %struct.triple* %1, i32 96)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char **argv) { exit(0); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@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 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
void X509_REQ_set_pubkey(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_set_pubkey() {
ret void
}
/* Type definitions */
typedef int u_int8_t;
typedef int u_int16_t;

/* Variables and functions */
int calc_crc_ccitt(int *, int);
void append_crc_ccitt(u_int8_t *buffer, int len) {
  u_int16_t crc = calc_crc_ccitt(buffer, len);
  buffer[len] = crc;
  buffer[len + 1] = crc >> 8;
}


x86 assembly (clang, -O0):
<append_crc_ccitt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <calc_crc_ccitt@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%edx
sar    $0x8,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_crc_ccitt>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <calc_crc_ccitt@plt>
movslq %ebp,%rcx
mov    %eax,(%rbx,%rcx,4)
sar    $0x8,%eax
mov    %eax,0x4(%rbx,%rcx,4)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @append_crc_ccitt(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* %4
%8 = call i32 @calc_crc_ccitt(i32* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 %9, i32* %13
%14 = load i32, i32* %5
%15 = ashr i32 %14, 8
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %16, i64 %19
store i32 %15, i32* %20
ret void
}

LLVM IR (-O2):
define void @append_crc_ccitt(i32* %0, i32 %1) {
%3 = tail call i32 @calc_crc_ccitt(i32* %0, i32 %1)
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %3, i32* %5
%6 = ashr i32 %3, 8
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %6, i32* %9
ret void
}
void g_key_file_remove_key() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct libusb_bos_descriptor *);
void libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos) {
  if (bos == NULL)
    return;
  free(bos);
}


x86 assembly (clang, -O0):
<libusb_free_bos_descriptor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <libusb_free_bos_descriptor+0x1c>
jmp    1135 <libusb_free_bos_descriptor+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libusb_free_bos_descriptor>:
test   %rdi,%rdi
je     111a <libusb_free_bos_descriptor+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.libusb_bos_descriptor = type { i32 }
define void @libusb_free_bos_descriptor(%struct.libusb_bos_descriptor* %0) {
%2 = alloca %struct.libusb_bos_descriptor*
store %struct.libusb_bos_descriptor* %0, %struct.libusb_bos_descriptor** %2
%3 = load %struct.libusb_bos_descriptor*, %struct.libusb_bos_descriptor** %2
%4 = icmp eq %struct.libusb_bos_descriptor* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.libusb_bos_descriptor*, %struct.libusb_bos_descriptor** %2
%8 = call i32 @free(%struct.libusb_bos_descriptor* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.libusb_bos_descriptor = type { i32 }
define void @libusb_free_bos_descriptor(%struct.libusb_bos_descriptor* %0) {
%2 = icmp eq %struct.libusb_bos_descriptor* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.libusb_bos_descriptor* %0)
br label %5
5: ; preds = %1, %3
ret void
}
int test_imm_31uint32_mem(unsigned int *val) {
  return ((*val) & (0x31 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_31uint32_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, 49
%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_31uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 49
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int get_seed_rng(int *);
int fget_seed_rng(int **genptr) { return get_seed_rng(*genptr); }


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

x86 assembly (clang, -O2):
<fget_seed_rng>:
mov    (%rdi),%rdi
jmp    1030 <get_seed_rng@plt>

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

LLVM IR (-O2):
define i32 @fget_seed_rng(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @get_seed_rng(i32* %2)
ret i32 %3
}
/* Variables and functions */
scalar_t__ pow(int, unsigned short);
short int ipv4_get_num_subnets(unsigned short int pfxlen, unsigned int *num) {
  *num = (unsigned int)pow(2, pfxlen);
  if (pfxlen == 32)
    *num = 0xFFFFFFFF;
  return 0;
}


x86 assembly (clang, -O0):
<ipv4_get_num_subnets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
movzwl -0x2(%rbp),%esi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movzwl -0x2(%rbp),%eax
cmp    $0x20,%eax
jne    1150 <ipv4_get_num_subnets+0x40>
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
xor    %eax,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_get_num_subnets>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x2,%edi
mov    %ebp,%esi
call   1030 <pow@plt>
cmp    $0x20,%bp
mov    $0xffffffff,%ecx
cmovne %eax,%ecx
mov    %ecx,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i16 @ipv4_get_num_subnets(i16 zeroext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
store i16 %0, i16* %3
store i32* %1, i32** %4
%5 = load i16, i16* %3
%6 = call i64 @pow(i32 2, i16 zeroext %5)
%7 = trunc i64 %6 to i32
%8 = load i32*, i32** %4
store i32 %7, i32* %8
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32*, i32** %4
store i32 -1, i32* %13
br label %14
14: ; preds = %12, %2
ret i16 0
}

LLVM IR (-O2):
define signext i16 @ipv4_get_num_subnets(i16 zeroext %0, i32* nocapture writeonly %1) {
%3 = tail call i64 @pow(i32 2, i16 zeroext %0)
%4 = trunc i64 %3 to i32
%5 = icmp eq i16 %0, 32
%6 = select i1 %5, i32 -1, i32 %4
store i32 %6, i32* %1
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ forget_token(unsigned char *, int);
void forget_symbol(unsigned char *symbol, int len) {
  int i;
  for (i = 0; i < len - 1; i++)
    forget_token(symbol + i, len - i);
}


x86 assembly (clang, -O0):
<forget_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    115b <forget_symbol+0x4b>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
call   1030 <forget_token@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <forget_symbol+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forget_symbol>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1149 <forget_symbol+0x39>
mov    %esi,%r14d
mov    %rdi,%rbx
lea    -0x1(%r14),%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <forget_token@plt>
add    $0xffffffff,%r14d
add    $0x1,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <forget_symbol+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @forget_symbol(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = trunc i64 %8 to i32
%11 = sub nsw i32 %1, %10
%12 = tail call i32 @forget_token(i8* %9, i32 %11)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 2 + 2 + 4;
  printf("%d\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
char *foo() { return "abc"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char *xstrndup(char const *, int /*<<< orphan*/);
char *xstrdup(const char *str) { return xstrndup(str, 0); }


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

x86 assembly (clang, -O2):
<xstrdup>:
xor    %esi,%esi
jmp    1030 <xstrndup@plt>

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

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i8* @xstrndup(i8* %0, i32 0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int ex_put_partial_nodal_var(int, int, int, int /*<<< orphan*/,
                             int /*<<< orphan*/, void const *);
int ex_put_n_nodal_var(int exoid, int time_step, int nodal_var_index,
                       int64_t start_node, int64_t num_nodes,
                       const void *nodal_var_vals) {
  return ex_put_partial_nodal_var(exoid, time_step, nodal_var_index, start_node,
                                  num_nodes, nodal_var_vals);
}


x86 assembly (clang, -O0):
<ex_put_n_nodal_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1030 <ex_put_partial_nodal_var@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ex_put_n_nodal_var>:
jmp    1030 <ex_put_partial_nodal_var@plt>

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

LLVM IR (-O2):
define i32 @ex_put_n_nodal_var(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5) {
%7 = tail call i32 @ex_put_partial_nodal_var(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5)
ret i32 %7
}