xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popcomplex16array_(char *x, unsigned int *n) { popNarray(x, (*n * 16)); }


x86 assembly (clang, -O0):
<popcomplex16array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcomplex16array_>:
mov    (%rsi),%esi
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popcomplex16array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 16
%9 = call i32 @popNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popcomplex16array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 4
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t ftoi(const float x) {
  union {
    uint32_t i;
    float f;
  } u;
  u.f = x;
  return u.i;
}


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

x86 assembly (clang, -O2):
<ftoi>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @ftoi(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @ftoi(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
void free_session_expires(struct session_expires *se) {
  if (se)
    sys_free((se),
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/chiforbogdan/opensips/refs/heads/"
             "master/parser/parse_sst.c",
             __FUNCTION__, 69);
}


x86 assembly (clang, -O0):
<free_session_expires>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1145 <free_session_expires+0x35>
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
lea    0xf5c(%rip),%rdx
mov    $0x45,%ecx
mov    $0x0,%al
call   1030 <sys_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_session_expires>:
test   %rdi,%rdi
je     112f <free_session_expires+0x1f>
lea    0xee4(%rip),%rsi
lea    0xf72(%rip),%rdx
mov    $0x45,%ecx
xor    %eax,%eax
jmp    1030 <sys_free@plt>
ret

LLVM IR (-O0):
%struct.session_expires = type opaque
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/chiforbogdan/opensips/refs/heads/master/parser/parse_sst.c\00"
@__FUNCTION__.free_session_expires = [21 x i8] c"free_session_expires\00"
define void @free_session_expires(%struct.session_expires* %0) {
%2 = alloca %struct.session_expires*
store %struct.session_expires* %0, %struct.session_expires** %2
%3 = load %struct.session_expires*, %struct.session_expires** %2
%4 = icmp ne %struct.session_expires* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.session_expires*, %struct.session_expires** %2
%7 = call i32 (%struct.session_expires*, i8*, i8*, i32, ...) bitcast (i32 (...)* @sys_free to i32 (%struct.session_expires*, i8*, i8*, i32, ...)*)(%struct.session_expires* %6, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.free_session_expires, i64 0, i64 0), i32 69)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.session_expires = type opaque
@.str = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/chiforbogdan/opensips/refs/heads/master/parser/parse_sst.c\00"
@__FUNCTION__.free_session_expires = [21 x i8] c"free_session_expires\00"
define void @free_session_expires(%struct.session_expires* %0) {
%2 = icmp eq %struct.session_expires* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (%struct.session_expires*, i8*, i8*, i32, ...) bitcast (i32 (...)* @sys_free to i32 (%struct.session_expires*, i8*, i8*, i32, ...)*)(%struct.session_expires* %0, i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__FUNCTION__.free_session_expires, i64 0, i64 0), i32 69)
br label %5
5: ; preds = %3, %1
ret void
}
char *rand5lvl(void) { return "5th Level Spell"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"5th Level Spell\00"
define i8* @rand5lvl() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"5th Level Spell\00"
define i8* @rand5lvl() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_destroy(int /*<<< orphan*/ *);
int __attribute__((unused)) ___pthread_mutex_destroy(pthread_mutex_t *mutex) {
  return pthread_mutex_destroy(mutex);
}


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

x86 assembly (clang, -O2):
<___pthread_mutex_destroy>:
jmp    1030 <pthread_mutex_destroy@plt>

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

LLVM IR (-O2):
define i32 @___pthread_mutex_destroy(i32* %0) {
%2 = tail call i32 @pthread_mutex_destroy(i32* %0)
ret i32 %2
}
_Noreturn void exit(int status) { _Exit(status); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_Exit@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
call   1030 <_Exit@plt>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
unreachable
}

LLVM IR (-O2):
define void @exit(i32 %0) {
tail call void @_Exit(i32 %0)
unreachable
}
/* Variables and functions */
float sqrtf(int /*<<< orphan*/);
int /*<<< orphan*/ vec3_dot(float *, float *);
float vec3_len(float *a) { return sqrtf(vec3_dot(a, a)); }


x86 assembly (clang, -O0):
<vec3_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <vec3_dot@plt>
mov    %eax,%edi
call   1040 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_len>:
push   %rax
mov    %rdi,%rsi
call   1030 <vec3_dot@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrtf@plt>

LLVM IR (-O0):
define float @vec3_len(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float*, float** %2
%5 = call i32 @vec3_dot(float* %3, float* %4)
%6 = call float @sqrtf(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @vec3_len(float* %0) {
%2 = tail call i32 @vec3_dot(float* %0, float* %0)
%3 = tail call float @sqrtf(i32 %2)
ret float %3
}
unsigned char GetBit(unsigned char x, unsigned char k) {
  return ((x & (0x01 << k)) != 0);
}


x86 assembly (clang, -O0):
<GetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetBit>:
bt     %esi,%edi
setb   %al
ret

LLVM IR (-O0):
define zeroext i8 @GetBit(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 1, %8
%10 = and i32 %6, %9
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @GetBit(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = shl nuw i32 1, %4
%6 = and i32 %5, %3
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i8
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int mprotect(void *, size_t, int);
void Mprotect(const void *addr, size_t len, int prot) {
  int retval;
  retval = mprotect((void *)addr, len, prot);
  if (retval == -1) {
    Sys_failure("mprotect");
  }
}


x86 assembly (clang, -O0):
<Mprotect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <mprotect@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    115c <Mprotect+0x3c>
lea    0xea9(%rip),%rdi
call   1030 <Sys_failure@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mprotect>:
push   %rax
call   1040 <mprotect@plt>
cmp    $0xffffffff,%eax
je     112d <Mprotect+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <Sys_failure@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"mprotect\00"
define void @Mprotect(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @mprotect(i8* %0, i64 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
int main(int argc, const char *argv[]) {
  int p[2] = {1, 2};
  int v = *(p + 1);
  printf("%u %u\n", p, (p + 1));
  char *c = "abcde";
  printf("%u %u\n", c, (c + 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x18(%rbp),%rsi
lea    -0x18(%rbp),%rdx
add    $0x4,%rdx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x28(%rbp),%rdx
add    $0x1,%rdx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x200000001,%rax
mov    %rax,0x8(%rsp)
lea    0xc(%rsp),%rdx
lea    0xed0(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec1(%rip),%rsi
lea    0xebb(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.p = [2 x i32] [i32 1, i32 2]
@.str = [7 x i8] c"%u %u\0A\00"
@.str.1 = [6 x i8] c"abcde\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [2 x i32]* %6 to i8*
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %13, i32* %15)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %8
%17 = load i8*, i8** %8
%18 = load i8*, i8** %8
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%u %u\0A\00"
@.str.1 = [6 x i8] c"abcde\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 8589934593, i64* %3
%5 = bitcast i64* %3 to i32*
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64* %3, i32* %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 1))
ret i32 0
}
/* Variables and functions */
int size_in_tiny(size_t size) { return size <= 256; }


x86 assembly (clang, -O0):
<size_in_tiny>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x100,-0x8(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_in_tiny>:
xor    %eax,%eax
cmp    $0x101,%rdi
setb   %al
ret

LLVM IR (-O0):
define i32 @size_in_tiny(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ule i64 %3, 256
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @size_in_tiny(i64 %0) {
%2 = icmp ult i64 %0, 257
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sysconf(int /*<<< orphan*/);
main() { printf("%ld\n", sysconf(_SC_PAGESIZE)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
@_SC_PAGESIZE = global i32 0
define i32 @main() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i32 @sysconf(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xb2() {
  Assert_real((isalnum(178) == 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_isalnum.c",
              895, ("isalnum should be 0 for 0xb2"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xb2>:
push   %rax
mov    $0xb2,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37f,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb2\00"
define void @t_isalnum_0xb2() {
%1 = call i64 @isalnum(i32 178)
%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 895, i8* getelementptr inbounds ([29 x i8], [29 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb2\00"
define void @t_isalnum_0xb2() {
%1 = tail call i64 @isalnum(i32 178)
%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 895, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(char const *s) {
  int i;
  if (!s)
    return;
  i = -1;
  while (s[++i])
    write(1, &s[i], 1);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <ft_putstr+0x1c>
jmp    1169 <ft_putstr+0x59>
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1169 <ft_putstr+0x59>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    $0x1,%edx
mov    %edx,%edi
call   1030 <write@plt>
jmp    1133 <ft_putstr+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
test   %rdi,%rdi
je     113c <ft_putstr+0x2c>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     113c <ft_putstr+0x2c>
xchg   %ax,%ax
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_putstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %11, %6 ], [ %0, %3 ]
%9 = tail call i32 @write(i32 1, i8* %8, i32 1)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %3, %1
ret void
}
int atexit(void (*function)(void)) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @atexit(void ()* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  double oran = 2.17;
  printf("oran: %f\n", oran);
  printf("degiskenin degerini degistiriyoruz...\n");
  oran = 4.4442;
  printf("oran: %f\n", oran);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xed8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xeab(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
movsd  0xed0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
movsd  0xeba(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"oran: %f\0A\00"
@.str.1 = [39 x i8] c"degiskenin degerini degistiriyoruz...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 2.170000e+00, double* %2
%3 = load double, double* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
store double 4.444200e+00, double* %2
%6 = load double, double* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"oran: %f\0A\00"
@str = [38 x i8] c"degiskenin degerini degistiriyoruz...\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 2.170000e+00)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 4.444200e+00)
ret i32 0
}
int test_imm_0Buint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x0B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Buint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 11
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int *foo(int *p) { return __builtin_assume_aligned(p, 16); }


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

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

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

LLVM IR (-O2):
define i32* @foo(i32* returned %0) {
%2 = bitcast i32* %0 to i8*
ret i32* %0
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *LinkedList_Create(int);
int /*<<< orphan*/ LinkedList_Print(struct node *);
struct node *reverseByRecursion(struct node *);
int main(void) {
  struct node *list = LinkedList_Create(8);
  struct node *head = list;
  LinkedList_Print(head);
  head = reverseByRecursion(head);
  LinkedList_Print(head);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1040 <LinkedList_Create@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <LinkedList_Print@plt>
mov    -0x18(%rbp),%rdi
call   1050 <reverseByRecursion@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <LinkedList_Print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x8,%edi
call   1040 <LinkedList_Create@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <LinkedList_Print@plt>
mov    %rbx,%rdi
call   1050 <reverseByRecursion@plt>
mov    %rax,%rdi
call   1030 <LinkedList_Print@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
%3 = alloca %struct.node*
store i32 0, i32* %1
%4 = call %struct.node* @LinkedList_Create(i32 8)
store %struct.node* %4, %struct.node** %2
%5 = load %struct.node*, %struct.node** %2
store %struct.node* %5, %struct.node** %3
%6 = load %struct.node*, %struct.node** %3
%7 = call i32 @LinkedList_Print(%struct.node* %6)
%8 = load %struct.node*, %struct.node** %3
%9 = call %struct.node* @reverseByRecursion(%struct.node* %8)
store %struct.node* %9, %struct.node** %3
%10 = load %struct.node*, %struct.node** %3
%11 = call i32 @LinkedList_Print(%struct.node* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* @LinkedList_Create(i32 8)
%2 = tail call i32 @LinkedList_Print(%struct.node* %1)
%3 = tail call %struct.node* @reverseByRecursion(%struct.node* %1)
%4 = tail call i32 @LinkedList_Print(%struct.node* %3)
ret i32 0
}
/* Type definitions */
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_resource_post_event(struct wl_resource *, int);
void wl_data_source_send_dnd_finished(struct wl_resource *resource_) {
  wl_resource_post_event(resource_, 4);
}


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

x86 assembly (clang, -O2):
<wl_data_source_send_dnd_finished>:
mov    $0x4,%esi
jmp    1030 <wl_resource_post_event@plt>

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

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
define void @wl_data_source_send_dnd_finished(%struct.wl_resource* %0) {
%2 = tail call i32 @wl_resource_post_event(%struct.wl_resource* %0, i32 4)
ret void
}
int msm_hsusb_rpc_close(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_hsusb_rpc_close() {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *_strdup(const char *string) {
  char *p = NULL;
  if (string) {
    size_t length = strlen(string);
    p = (char *)malloc(length + 1);
    if (p) {
      strcpy(p, string);
    }
  }
  return p;
}


x86 assembly (clang, -O0):
<_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     118a <_strdup+0x5a>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1185 <_strdup+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    118a <_strdup+0x5a>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <_strdup+0x2f>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1162 <_strdup+0x32>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    1162 <_strdup+0x32>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add i64 %4, 1
%6 = tail call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = icmp eq i64 %6, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %11
11: ; preds = %3, %9, %1
%12 = phi i8* [ null, %1 ], [ %7, %9 ], [ %7, %3 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void openWeb() { system("open http://www.kth.se"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"open http://www.kth.se\00"
define void @openWeb() {
%1 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"open http://www.kth.se\00"
define void @openWeb() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int round(int);
int knots2kph(int knots) {
  if (knots < 0)
    return knots;
  return round(knots * 463 / 250.0);
}


x86 assembly (clang, -O0):
<knots2kph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1130 <knots2kph+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <knots2kph+0x43>
imul   $0x1cf,-0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xebd(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <round@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<knots2kph>:
test   %edi,%edi
js     112f <knots2kph+0x1f>
imul   $0x1cf,%edi,%eax
cvtsi2sd %eax,%xmm0
divsd  0xeda(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <round@plt>
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @knots2kph(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %15
8: ; preds = %1
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 463
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 2.500000e+02
%13 = fptosi double %12 to i32
%14 = call i32 @round(i32 %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %8, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @knots2kph(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = mul nsw i32 %0, 463
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 2.500000e+02
%7 = fptosi double %6 to i32
%8 = tail call i32 @round(i32 %7)
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ %0, %1 ]
ret i32 %10
}
int MOD(N, M)
int N;
int M;
{ return N - ((int)N / M) * M; }


x86 assembly (clang, -O0):
<MOD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MOD>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @MOD(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = sub nsw i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @MOD(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
extern size_t find_ind_int64(size_t *v, size_t el, size_t maxlen) {
  size_t i;
  for (i = 0; i < maxlen; i++) {
    if (v[i] == el)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<find_ind_int64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    115f <find_ind_int64+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmp    -0x18(%rbp),%rax
jne    1149 <find_ind_int64+0x49>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <find_ind_int64+0x67>
jmp    114e <find_ind_int64+0x4e>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1118 <find_ind_int64+0x18>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_ind_int64>:
mov    $0xffffffffffffffff,%rax
test   %rdx,%rdx
je     111f <find_ind_int64+0x1f>
xor    %ecx,%ecx
xchg   %ax,%ax
cmp    %rsi,(%rdi,%rcx,8)
je     1120 <find_ind_int64+0x20>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <find_ind_int64+0x10>
ret
mov    %rcx,%rax
ret

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

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


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

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

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

LLVM IR (-O2):
define void @omap_iommu_debugfs_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atmel_atmega328_PB5_clear__E();
void test21_Blink2_pollen__reset__E() { atmel_atmega328_PB5_clear__E(); }


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

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

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

LLVM IR (-O2):
define void @test21_Blink2_pollen__reset__E() {
%1 = tail call i32 (...) @atmel_atmega328_PB5_clear__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_init(void) { printf("\nOpenSHMEM Analyzer\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
void set_XColormapEvent_window(void *_p, unsigned long _v) {
  ((XColormapEvent *)_p)->window = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XColormapEvent_window>:
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_XColormapEvent_window>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XColormapEvent_window(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_XColormapEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int alignment_ok(const void *base, int align) {
  return ((unsigned long)base & (align - 1)) == 0;
}


x86 assembly (clang, -O0):
<alignment_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alignment_ok>:
add    $0xffffffff,%esi
movslq %esi,%rcx
xor    %eax,%eax
test   %rdi,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @alignment_ok(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = and i64 %6, %9
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @alignment_ok(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = add nsw i32 %1, -1
%5 = sext i32 %4 to i64
%6 = and i64 %5, %3
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
RX0I1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[x0]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<RX0I1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x21,(%rax,%rcx,4)
jg     1136 <RX0I1+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <RX0I1+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0I1>:
movslq %edx,%rcx
xor    %eax,%eax
cmpl   $0x22,(%r8,%rcx,4)
setl   %al
ret

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

LLVM IR (-O2):
define i32 @RX0I1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
%9 = load i32, i32* %8
%10 = icmp slt i32 %9, 34
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ reg_addrange(int /*<<< orphan*/, char);
void reg_addranges_d(void) { reg_addrange('0', '9'); }


x86 assembly (clang, -O0):
<reg_addranges_d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x30,%edi
mov    $0x39,%esi
call   1030 <reg_addrange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_addranges_d>:
mov    $0x30,%edi
mov    $0x39,%esi
jmp    1030 <reg_addrange@plt>

LLVM IR (-O0):
define void @reg_addranges_d() {
%1 = call i32 @reg_addrange(i32 48, i8 signext 57)
ret void
}

LLVM IR (-O2):
define void @reg_addranges_d() {
%1 = tail call i32 @reg_addrange(i32 48, i8 signext 57)
ret void
}
/* Variables and functions */
unsigned long compress(unsigned long, short);
unsigned long hash_float_constant_raw_info(float value, short num_bits) {
  return compress((unsigned long)value, num_bits);
}


x86 assembly (clang, -O0):
<hash_float_constant_raw_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
movss  %xmm0,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xecf(%rip),%xmm2
movaps %xmm0,%xmm1
subss  %xmm2,%xmm1
cvttss2si %xmm1,%rax
cvttss2si %xmm0,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
and    %rcx,%rax
or     %rax,%rdi
movswl -0x6(%rbp),%esi
call   1030 <compress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_float_constant_raw_info>:
cvttss2si %xmm0,%rax
mov    %edi,%esi
mov    %rax,%rcx
sar    $0x3f,%rcx
subss  0xeda(%rip),%xmm0
cvttss2si %xmm0,%rdi
and    %rcx,%rdi
or     %rax,%rdi
jmp    1030 <compress@plt>

LLVM IR (-O0):
define i64 @hash_float_constant_raw_info(float %0, i16 signext %1) {
%3 = alloca float
%4 = alloca i16
store float %0, float* %3
store i16 %1, i16* %4
%5 = load float, float* %3
%6 = fptoui float %5 to i64
%7 = load i16, i16* %4
%8 = call i64 @compress(i64 %6, i16 signext %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @hash_float_constant_raw_info(float %0, i16 signext %1) {
%3 = fptoui float %0 to i64
%4 = tail call i64 @compress(i64 %3, i16 signext %1)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ BSPInterface_Initialize();
int /*<<< orphan*/ Controller_Initialize();
int /*<<< orphan*/ Display_Initialize();
int /*<<< orphan*/ LED_Initialize();
int /*<<< orphan*/ ScoreKeeper_Initialize();
void Initialize(void) {
  BSPInterface_Initialize();
  LED_Initialize();
  Display_Initialize();
  Controller_Initialize();
  ScoreKeeper_Initialize();
}


x86 assembly (clang, -O0):
<Initialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <BSPInterface_Initialize@plt>
mov    $0x0,%al
call   1040 <LED_Initialize@plt>
mov    $0x0,%al
call   1060 <Display_Initialize@plt>
mov    $0x0,%al
call   1070 <Controller_Initialize@plt>
mov    $0x0,%al
call   1050 <ScoreKeeper_Initialize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize>:
push   %rax
xor    %eax,%eax
call   1030 <BSPInterface_Initialize@plt>
xor    %eax,%eax
call   1040 <LED_Initialize@plt>
xor    %eax,%eax
call   1060 <Display_Initialize@plt>
xor    %eax,%eax
call   1070 <Controller_Initialize@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <ScoreKeeper_Initialize@plt>

LLVM IR (-O0):
define void @Initialize() {
%1 = call i32 (...) @BSPInterface_Initialize()
%2 = call i32 (...) @LED_Initialize()
%3 = call i32 (...) @Display_Initialize()
%4 = call i32 (...) @Controller_Initialize()
%5 = call i32 (...) @ScoreKeeper_Initialize()
ret void
}

LLVM IR (-O2):
define void @Initialize() {
%1 = tail call i32 (...) @BSPInterface_Initialize()
%2 = tail call i32 (...) @LED_Initialize()
%3 = tail call i32 (...) @Display_Initialize()
%4 = tail call i32 (...) @Controller_Initialize()
%5 = tail call i32 (...) @ScoreKeeper_Initialize()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rk29_sdmmc_set_iomux_mmc2(unsigned int);
void rk29_sdmmc_set_iomux(int device_id, unsigned int bus_width) {
  switch (device_id) {
  case 0:
    break;
  case 1:
    break;
  case 2:
    rk29_sdmmc_set_iomux_mmc2(bus_width);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<rk29_sdmmc_set_iomux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1153 <rk29_sdmmc_set_iomux+0x43>
jmp    1131 <rk29_sdmmc_set_iomux+0x21>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1158 <rk29_sdmmc_set_iomux+0x48>
jmp    1142 <rk29_sdmmc_set_iomux+0x32>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     115d <rk29_sdmmc_set_iomux+0x4d>
jmp    116a <rk29_sdmmc_set_iomux+0x5a>
jmp    116f <rk29_sdmmc_set_iomux+0x5f>
jmp    116f <rk29_sdmmc_set_iomux+0x5f>
mov    -0x8(%rbp),%edi
call   1030 <rk29_sdmmc_set_iomux_mmc2@plt>
jmp    116f <rk29_sdmmc_set_iomux+0x5f>
jmp    116f <rk29_sdmmc_set_iomux+0x5f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rk29_sdmmc_set_iomux>:
cmp    $0x2,%edi
jne    111c <rk29_sdmmc_set_iomux+0xc>
mov    %esi,%edi
jmp    1030 <rk29_sdmmc_set_iomux_mmc2@plt>
ret

LLVM IR (-O0):
define void @rk29_sdmmc_set_iomux(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
switch i32 %5, label %11 [
i32 0, label %6
i32 1, label %7
i32 2, label %8
]
6: ; preds = %2
br label %12
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @rk29_sdmmc_set_iomux_mmc2(i32 %9)
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %8, %7, %6
ret void
}

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