xunge/DecIR huggingface dataset:
/* Type definitions */
struct shmid_ds {
  int dummy;
};

/* Variables and functions */
int main(void) {
  struct shmid_ds ds = {};
  (void)ds;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.shmid_ds = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.shmid_ds
store i32 0, i32* %1
%3 = bitcast %struct.shmid_ds* %2 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void test12() {
  switch (1) {
  case 2: {
    int a;
    a = 42;
  }
  case 1:
    break;
  case 42:;
    int x;
    x = 4;
    break;
  }
}


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

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

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

LLVM IR (-O2):
define void @test12() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ REPORT(char const *);
int /*<<< orphan*/ abort();
void FATAL(const char *x) {
  REPORT(x);
  abort();
}


x86 assembly (clang, -O0):
<FATAL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <REPORT@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<FATAL>:
push   %rax
call   1040 <REPORT@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @FATAL(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @REPORT(i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @FATAL(i8* %0) {
%2 = tail call i32 @REPORT(i8* %0)
%3 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef scalar_t__ int_least64_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_int_least64_t(int_least64_t const k1,
                                               int_least64_t const k2) {
  return k1 < k2;
}


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

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

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

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int_least64_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int getBps(int SR, int bitLength, int numberOfChannels) {
  return SR * bitLength * numberOfChannels;
}


x86 assembly (clang, -O0):
<getBps>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBps>:
mov    %edi,%eax
imul   %esi,%eax
imul   %edx,%eax
ret

LLVM IR (-O0):
define i32 @getBps(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* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = mul nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @getBps(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = mul nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap2(int *, int *);
int main(int argc, char **argv) {
  int u;
  int t;
  u = 17;
  t = -96;
  printf("before swap2: u = %d , t = %d \n", u, t);
  swap2(&u, &t);
  printf("after  swap2: u = %d , t = %d \n", u, t);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x11,-0x14(%rbp)
movl   $0xffffffa0,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <swap2@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x11,0x4(%rsp)
movl   $0xffffffa0,(%rsp)
lea    0xec9(%rip),%rdi
mov    $0x11,%esi
mov    $0xffffffa0,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap2@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"before swap2: u = %d , t = %d \0A\00"
@.str.1 = [32 x i8] c"after swap2: u = %d , t = %d \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 17, i32* %6
store i32 -96, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* %7
%10 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
%11 = call i32 @swap2(i32* %6, i32* %7)
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}

LLVM IR (-O2):
@.str = [32 x i8] c"before swap2: u = %d , t = %d \0A\00"
@.str.1 = [32 x i8] c"after swap2: u = %d , t = %d \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 17, i32* %3
store i32 -96, i32* %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 17, i32 -96)
%8 = call i32 @swap2(i32* %3, i32* %4)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}
void adis16201_unconfigure_ring(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @adis16201_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x33() {
  Assert_real((ispunct(51) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              260, ("ispunct should be 0 for 3"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 3\00"
define void @t_ispunct_0x33() {
%1 = tail call i64 @ispunct(i32 51)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 260, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asin(double);
double ephRadToDeg(int /*<<< orphan*/);
double ephASin(double x) { return ephRadToDeg(asin(x)); }


x86 assembly (clang, -O0):
<ephASin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <asin@plt>
mov    %eax,%edi
call   1030 <ephRadToDeg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ephASin>:
push   %rax
call   1040 <asin@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ephRadToDeg@plt>

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

LLVM IR (-O2):
define double @ephASin(double %0) {
%2 = tail call i32 @asin(double %0)
%3 = tail call double @ephRadToDeg(i32 %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ hardware_init();
int main(void) {
  hardware_init();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <hardware_init@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <hardware_init@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @hardware_init()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hardware_init()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int binomial(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, k;
  printf("Enter n and k :");
  scanf("%d %d", &n, &k);
  printf("%d", binomial(n, k));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Enter n and k :\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @binomial(i32 %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter n and k :\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @binomial(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
int fun3() { ; }


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

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

LLVM IR (-O0):
define i32 @fun3() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @fun3() {
ret i32 undef
}
/* Variables and functions */
void *xmalloc(unsigned int);
void *zfilter_alloc(void __attribute__((__unused__)) * opaque,
                    unsigned int items, unsigned int size) {
  return (xmalloc(items * size));
}


x86 assembly (clang, -O0):
<zfilter_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
imul   -0x10(%rbp),%edi
call   1030 <xmalloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zfilter_alloc>:
mov    %esi,%edi
imul   %edx,%edi
jmp    1030 <xmalloc@plt>

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

LLVM IR (-O2):
define i8* @zfilter_alloc(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = tail call i8* @xmalloc(i32 %4)
ret i8* %5
}
void gtk_tree_view_get_fixed_height_mode() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_fixed_height_mode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abms_system(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *);
void abms_losetup(char *loop, char *image) {
  char lcmd[255];
  sprintf(lcmd, "%s%s %s %s", "/app/os/sys/bin/", "losetup", loop, image);
  abms_system(lcmd);
}


x86 assembly (clang, -O0):
<abms_losetup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
lea    0xeb7(%rip),%rsi
lea    0xebb(%rip),%rdx
lea    0xec5(%rip),%rcx
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <abms_system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abms_losetup>:
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%r9
mov    %rdi,%r8
lea    0xecb(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xed9(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%s%s %s %s\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [8 x i8] c"losetup\00"
define void @abms_losetup(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [255 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%11 = call i32 @abms_system(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s%s %s %s\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [8 x i8] c"losetup\00"
define void @abms_losetup(i8* %0, i8* %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @abms_system(i8* %4)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long time;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
void set_XMotionEvent_time(void *_p, unsigned long _v) {
  ((XMotionEvent *)_p)->time = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XMotionEvent_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XMotionEvent_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void RTCritSectDelete(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCritSectDelete() {
ret void
}
int owLevel(int portnum, int new_level) { return 0; }


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

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

LLVM IR (-O0):
define i32 @owLevel(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 @owLevel(i32 %0, i32 %1) {
ret i32 0
}
char *strcat(char *dest, const char *src) {
  char *rdest = dest;
  while (*dest)
    dest++;
  while ((*dest++ = *src++))
    ;
  return rdest;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1166 <strcat+0x66>
jmp    1137 <strcat+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
unsigned int tune4(unsigned int t) {
  return (t >> 6 | t | t >> (t >> 16)) * 10 + ((t >> 11) & 7);
}


x86 assembly (clang, -O0):
<tune4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x6,%eax
or     -0x4(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
imul   $0xa,%eax,%eax
mov    -0x4(%rbp),%ecx
shr    $0xb,%ecx
and    $0x7,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tune4>:
mov    %edi,%eax
shr    $0x6,%eax
or     %edi,%eax
mov    %edi,%ecx
shr    $0x10,%ecx
mov    %edi,%edx
shr    %cl,%edx
or     %eax,%edx
lea    (%rdx,%rdx,4),%eax
shr    $0xb,%edi
and    $0x7,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @tune4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 6
%5 = load i32, i32* %2
%6 = or i32 %4, %5
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 16
%10 = lshr i32 %7, %9
%11 = or i32 %6, %10
%12 = mul i32 %11, 10
%13 = load i32, i32* %2
%14 = lshr i32 %13, 11
%15 = and i32 %14, 7
%16 = add i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @tune4(i32 %0) {
%2 = lshr i32 %0, 6
%3 = or i32 %2, %0
%4 = lshr i32 %0, 16
%5 = lshr i32 %0, %4
%6 = or i32 %3, %5
%7 = mul i32 %6, 10
%8 = lshr i32 %0, 11
%9 = and i32 %8, 7
%10 = add i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int fibonacci(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdout;
int main() {
  int termo;
  puts("Informe o termo para calcular: ");
  scanf("%d", &termo);
  fprintf(stdout, "O resultado fibonacci para este termo e': %d\n",
          fibonacci(termo));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <fibonacci@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%edx
lea    0xe98(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%ebx
mov    0xc(%rsp),%edi
call   1050 <fibonacci@plt>
lea    0xea8(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Informe o termo para calcular: \00"
@.str.1 = [3 x i8] c"%d\00"
@stdout = global i32 0
@.str.2 = [46 x i8] c"O resultado fibonacci para este termo e': %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* @stdout
%6 = load i32, i32* %2
%7 = call i32 @fibonacci(i32 %6)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Informe o termo para calcular: \00"
@.str.1 = [3 x i8] c"%d\00"
@stdout = global i32 0
@.str.2 = [46 x i8] c"O resultado fibonacci para este termo e': %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* @stdout
%6 = load i32, i32* %1
%7 = call i32 @fibonacci(i32 %6)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
int lowbit(int a) { return a & (-a); }


x86 assembly (clang, -O0):
<lowbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @lowbit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 0, %4
%6 = and i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @lowbit(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
int prn_to_buf(int c, void *buf) {
  char **sptr = (char **)buf;
  char *s = *sptr;
  *s++ = c;
  *sptr = s;
  return (int)c;
}


x86 assembly (clang, -O0):
<prn_to_buf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prn_to_buf>:
mov    %edi,%eax
mov    (%rsi),%rcx
mov    %al,(%rcx)
add    $0x1,%rcx
mov    %rcx,(%rsi)
ret

LLVM IR (-O0):
define i32 @prn_to_buf(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i32, i32* %3
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %6
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %6
store i8 %12, i8* %13
%15 = load i8*, i8** %6
%16 = load i8**, i8*** %5
store i8* %15, i8** %16
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @prn_to_buf(i32 returned %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = trunc i32 %0 to i8
%6 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %5, i8* %4
store i8* %6, i8** %3
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int main() {
  long i = -1L;
  unsigned long long m = (unsigned long long)i;
  printf("%u", m);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xecd(%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    $0xffffffffffffffff,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 -1)
ret i32 0
}
int rtac_waitg(int group, int time) {}


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

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

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

LLVM IR (-O2):
define i32 @rtac_waitg(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int f267(int *);
int f268(int *p) { return f267(p); }


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

x86 assembly (clang, -O2):
<f268>:
jmp    1030 <f267@plt>

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

LLVM IR (-O2):
define i32 @f268(i32* %0) {
%2 = tail call i32 @f267(i32* %0)
ret i32 %2
}
int ff_gcd(int a, int b) {
  if (b)
    return ff_gcd(b, a % b);
  else
    return a;
}


x86 assembly (clang, -O0):
<ff_gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1141 <ff_gcd+0x31>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <ff_gcd@plt>
mov    %eax,-0x4(%rbp)
jmp    1147 <ff_gcd+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <ff_gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <ff_gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ff_gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ foo(int const *);
void test1() {
  const int x[] = {1, 2, 3, 4, 6, 8, 9, 10, 123, 231, 123, 23};
  foo(x);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x30,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
call   1040 <foo@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
sub    $0x38,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <foo@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.test1.x = [12 x i32] [i32 1, i32 2, i32 3, i32 4, i32 6, i32 8, i32 9, i32 10, i32 123, i32 231, i32 123, i32 23]
define void @test1() {
%1 = alloca [12 x i32]
%2 = bitcast [12 x i32]* %1 to i8*
%3 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
ret void
}

LLVM IR (-O2):
@__const.test1.x = [12 x i32] [i32 1, i32 2, i32 3, i32 4, i32 6, i32 8, i32 9, i32 10, i32 123, i32 231, i32 123, i32 23]
define void @test1() {
%1 = alloca [12 x i32]
%2 = bitcast [12 x i32]* %1 to i8*
%3 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getenv(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int getHomeDirectory() {
  do {
    if (0)
      fprintf(stderr, "%s", "getenv $HOME...\n");
  } while (0);
  fprintf(stdout, "%s\n", getenv("HOME"));
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<getHomeDirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
jmp    112d <getHomeDirectory+0xd>
jmp    1132 <getHomeDirectory+0x12>
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    0xebf(%rip),%rdi
call   1030 <getenv@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHomeDirectory>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%ebx
lea    0xed3(%rip),%rdi
call   1030 <getenv@plt>
lea    0xec3(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"HOME\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
define i32 @getHomeDirectory() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = load i32, i32* @stdout
%4 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"HOME\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
define i32 @getHomeDirectory() {
%1 = load i32, i32* @stdout
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ pwrite(int, void *, size_t, int /*<<< orphan*/);
ssize_t do_pwrite(int fd, void *buf, size_t nbytes, off_t offset) {
  return pwrite(fd, buf, nbytes, offset);
}


x86 assembly (clang, -O0):
<do_pwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <pwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pwrite>:
jmp    1030 <pwrite@plt>

LLVM IR (-O0):
define i32 @do_pwrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @pwrite(i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @do_pwrite(i32 %0, i8* nocapture %1, i64 %2, i32 %3) {
%5 = tail call i32 @pwrite(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ nrf_drv_radio802154_swi_timeslot_exit();
void nrf_drv_radio802154_priority_drop_timeslot_exit(void) {
  nrf_drv_radio802154_swi_timeslot_exit();
}


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

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

LLVM IR (-O0):
define void @nrf_drv_radio802154_priority_drop_timeslot_exit() {
%1 = call i32 (...) @nrf_drv_radio802154_swi_timeslot_exit()
ret void
}

LLVM IR (-O2):
define void @nrf_drv_radio802154_priority_drop_timeslot_exit() {
%1 = tail call i32 (...) @nrf_drv_radio802154_swi_timeslot_exit()
ret void
}
void TIM1_TRG_COM_TIM11_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @TIM1_TRG_COM_TIM11_IRQHandler() {
ret void
}
/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ uwsgi_log(char *, ...);
scalar_t__ uwsgi_write_intfile(char *, int);
void uwsgi_write_pidfile(char *pidfile_name) {
  uwsgi_log("writing pidfile to %s\n", pidfile_name);
  if (uwsgi_write_intfile(pidfile_name, (int)getpid())) {
    uwsgi_log("could not write pidfile.\n");
  }
}


x86 assembly (clang, -O0):
<uwsgi_write_pidfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1050 <uwsgi_log@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <uwsgi_write_intfile@plt>
cmp    $0x0,%rax
je     1180 <uwsgi_write_pidfile+0x50>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1050 <uwsgi_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_write_pidfile>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <uwsgi_log@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <uwsgi_write_intfile@plt>
test   %rax,%rax
je     116a <uwsgi_write_pidfile+0x3a>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1050 <uwsgi_log@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"writing pidfile to %s\0A\00"
@.str.1 = [26 x i8] c"could not write pidfile.\0A\00"
define void @uwsgi_write_pidfile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @uwsgi_log(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 (...) @getpid()
%7 = trunc i64 %6 to i32
%8 = call i64 @uwsgi_write_intfile(i8* %5, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 (i8*, ...) @uwsgi_log(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"writing pidfile to %s\0A\00"
@.str.1 = [26 x i8] c"could not write pidfile.\0A\00"
define void @uwsgi_write_pidfile(i8* %0) {
%2 = tail call i32 (i8*, ...) @uwsgi_log(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i64 (...) @getpid()
%4 = trunc i64 %3 to i32
%5 = tail call i64 @uwsgi_write_intfile(i8* %0, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 (i8*, ...) @uwsgi_log(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
double DBL_MIN;
int is_zero_double(double x) { return x < DBL_MIN && x > -DBL_MIN; }


x86 assembly (clang, -O0):
<is_zero_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    0x2ecb(%rip),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jbe    1159 <is_zero_double+0x59>
movsd  -0x8(%rbp),%xmm0
mov    0x2eac(%rip),%rax
movsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_zero_double>:
mov    0x2ed9(%rip),%rax
movsd  (%rax),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
xorpd  0xee6(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
@DBL_MIN = global double 0.000000e+00
define i32 @is_zero_double(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @DBL_MIN
%5 = fcmp olt double %3, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %2
%8 = load double, double* @DBL_MIN
%9 = fneg double %8
%10 = fcmp ogt double %7, %9
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@DBL_MIN = global double 0.000000e+00
define i32 @is_zero_double(double %0) {
%2 = load double, double* @DBL_MIN
%3 = fcmp ogt double %2, %0
%4 = fneg double %2
%5 = fcmp olt double %4, %0
%6 = and i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ glTranslatef(double, double, double);
void glSceneDrawBase() { glTranslatef(20.0, 0.0, 0.0); }


x86 assembly (clang, -O0):
<glSceneDrawBase>:
push   %rbp
mov    %rsp,%rbp
movsd  0xee4(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glTranslatef@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glSceneDrawBase>:
movsd  0xee8(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
jmp    1030 <glTranslatef@plt>

LLVM IR (-O0):
define void @glSceneDrawBase() {
%1 = call i32 @glTranslatef(double 2.000000e+01, double 0.000000e+00, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @glSceneDrawBase() {
%1 = tail call i32 @glTranslatef(double 2.000000e+01, double 0.000000e+00, double 0.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sigalrm_handler(int signum) {
  fprintf(stderr, "Test timed out.\n");
  abort();
}


x86 assembly (clang, -O0):
<sigalrm_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sigalrm_handler>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Test timed out.\0A\00"
define void @sigalrm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Test timed out.\0A\00"
define void @sigalrm_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @abort()
unreachable
}
void skip_whitespace(char **string_line_ptr) {
  char *cur_char_ptr = *string_line_ptr;
  for (; *cur_char_ptr != 0; cur_char_ptr++) {
    if ((*cur_char_ptr != '\t') && (*cur_char_ptr != ' ')) {
      *string_line_ptr = cur_char_ptr;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1169 <skip_whitespace+0x69>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
je     1153 <skip_whitespace+0x53>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1153 <skip_whitespace+0x53>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1169 <skip_whitespace+0x69>
jmp    1158 <skip_whitespace+0x58>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <skip_whitespace+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
mov    (%rdi),%rax
jmp    1114 <skip_whitespace+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x9,%cl
je     1110 <skip_whitespace+0x10>
cmp    $0x20,%cl
je     1110 <skip_whitespace+0x10>
test   %cl,%cl
je     1128 <skip_whitespace+0x28>
mov    %rax,(%rdi)
ret

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

LLVM IR (-O2):
define void @skip_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %7, %1
%4 = phi i8* [ %2, %1 ], [ %8, %7 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %9
i8 9, label %7
i8 32, label %7
]
6: ; preds = %3
store i8* %4, i8** %0
br label %9
7: ; preds = %3, %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
9: ; preds = %3, %6
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ background;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
unsigned long get_XGCValues_background(void *_p) {
  return (unsigned long)((XGCValues *)_p)->background;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XGCValues_background(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XGCValues_background(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fa_free(void *ptr) {
  if (ptr) {
    free(ptr);
    ptr = NULL;
  }
}


x86 assembly (clang, -O0):
<fa_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <fa_free+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fa_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 %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
store i8* null, i8** %2
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @fa_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}