xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn97() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn97");
  return result;
}


x86 assembly (clang, -O0):
<fn97>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn97>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn97\00"
define i8* @fn97() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn97\00"
define i8* @fn97() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ test43_aux(int /*<<< orphan*/);
void test43(int i) {
  int x;
  for (i = 0; i < 10; i++)
    test43_aux(x++);
}


x86 assembly (clang, -O0):
<test43>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    114a <test43+0x3a>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <test43_aux@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <test43+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test43>:
push   %rax
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
call   1030 <test43_aux@plt>
pop    %rax
jmp    1030 <test43_aux@plt>

LLVM IR (-O0):
define void @test43(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %2
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = call i32 @test43_aux(i32 %8)
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @test43(i32 %0) {
%2 = tail call i32 @test43_aux(i32 undef)
%3 = tail call i32 @test43_aux(i32 undef)
%4 = tail call i32 @test43_aux(i32 undef)
%5 = tail call i32 @test43_aux(i32 undef)
%6 = tail call i32 @test43_aux(i32 undef)
%7 = tail call i32 @test43_aux(i32 undef)
%8 = tail call i32 @test43_aux(i32 undef)
%9 = tail call i32 @test43_aux(i32 undef)
%10 = tail call i32 @test43_aux(i32 undef)
%11 = tail call i32 @test43_aux(i32 undef)
ret void
}
void Xil_Out32(unsigned int *icap, unsigned int off, unsigned int val) {
  icap[off >> 2] = val;
}


x86 assembly (clang, -O0):
<Xil_Out32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x2,%ecx
mov    %ecx,%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xil_Out32>:
and    $0xfffffffc,%esi
mov    %edx,(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @Xil_Out32(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* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = lshr i32 %9, 2
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
store i32 %7, i32* %12
ret void
}

LLVM IR (-O2):
define void @Xil_Out32(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = lshr i32 %1, 2
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %2, i32* %6
ret void
}
/* Type definitions */
struct compat_semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ compat_init_MUTEX_LOCKED(struct compat_semaphore *);
void init_MUTEX_LOCKED(struct compat_semaphore *sem) {
  compat_init_MUTEX_LOCKED(sem);
}


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

x86 assembly (clang, -O2):
<init_MUTEX_LOCKED>:
jmp    1030 <compat_init_MUTEX_LOCKED@plt>

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

LLVM IR (-O2):
%struct.compat_semaphore = type { i32 }
define void @init_MUTEX_LOCKED(%struct.compat_semaphore* %0) {
%2 = tail call i32 @compat_init_MUTEX_LOCKED(%struct.compat_semaphore* %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int getDatacenterId(int);
int getIncrement();
int getMachineId();
int getTimestamp();
uint64_t getSnowflake(int datacenter_id) {
  uint64_t t = getTimestamp();
  uint64_t d = getDatacenterId(datacenter_id);
  uint64_t m = getMachineId();
  uint64_t i = getIncrement();
  return (t << (5 + 5 + 12)) + (d << (5 + 12)) + (m << 12) + i;
}


x86 assembly (clang, -O0):
<getSnowflake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getTimestamp@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <getDatacenterId@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getMachineId@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <getIncrement@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x16,%eax
mov    -0xc(%rbp),%ecx
shl    $0x11,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0xc,%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSnowflake>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getTimestamp@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1060 <getDatacenterId@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getMachineId@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <getIncrement@plt>
shl    $0x16,%r14d
shl    $0x11,%ebx
add    %r14d,%ebx
shl    $0xc,%ebp
add    %ebx,%ebp
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getSnowflake(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = call i32 (...) @getTimestamp()
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = call i32 @getDatacenterId(i32 %8)
store i32 %9, i32* %4
%10 = call i32 (...) @getMachineId()
store i32 %10, i32* %5
%11 = call i32 (...) @getIncrement()
store i32 %11, i32* %6
%12 = load i32, i32* %3
%13 = shl i32 %12, 22
%14 = load i32, i32* %4
%15 = shl i32 %14, 17
%16 = add nsw i32 %13, %15
%17 = load i32, i32* %5
%18 = shl i32 %17, 12
%19 = add nsw i32 %16, %18
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @getSnowflake(i32 %0) {
%2 = tail call i32 (...) @getTimestamp()
%3 = tail call i32 @getDatacenterId(i32 %0)
%4 = tail call i32 (...) @getMachineId()
%5 = tail call i32 (...) @getIncrement()
%6 = shl i32 %2, 22
%7 = shl i32 %3, 17
%8 = add nsw i32 %7, %6
%9 = shl i32 %4, 12
%10 = add nsw i32 %8, %9
%11 = add nsw i32 %10, %5
ret i32 %11
}
void d_fetchuw(const unsigned char **ptr, unsigned short *dest) {
  *dest = (((unsigned short)(*ptr)[0] << 8) | ((unsigned short)(*ptr)[1] << 0));
  *ptr += 2;
}


x86 assembly (clang, -O0):
<d_fetchuw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movzbl (%rax),%eax
movzwl %ax,%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movzbl 0x1(%rcx),%ecx
movzwl %cx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_fetchuw>:
mov    (%rdi),%rax
movzwl (%rax),%ecx
rol    $0x8,%cx
mov    %cx,(%rsi)
add    $0x2,%rax
mov    %rax,(%rdi)
ret

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

LLVM IR (-O2):
define void @d_fetchuw(i8** nocapture %0, i16* nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = zext i8 %4 to i16
%6 = shl nuw i16 %5, 8
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i16
%10 = or i16 %6, %9
store i16 %10, i16* %1
%11 = getelementptr inbounds i8, i8* %3, i64 2
store i8* %11, i8** %0
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int i;
  if (s && f) {
    i = 0;
    while (s[i]) {
      f(i, &s[i]);
      i++;
    }
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1164 <ft_striteri+0x64>
cmpq   $0x0,-0x10(%rbp)
je     1164 <ft_striteri+0x64>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     115f <ft_striteri+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <ft_striteri+0x2d>
jmp    1164 <ft_striteri+0x64>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1133 <ft_striteri+0x33>
mov    %rsi,%r14
test   %rsi,%rsi
je     1133 <ft_striteri+0x33>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1133 <ft_striteri+0x33>
xor    %ebx,%ebx
mov    %r15,%rsi
nop
mov    %ebx,%edi
call   *%r14
add    $0x1,%ebx
lea    (%r15,%rbx,1),%rsi
cmpb   $0x0,(%r15,%rbx,1)
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %6, %9
%10 = phi i8* [ %14, %9 ], [ %0, %6 ]
%11 = phi i32 [ %12, %9 ], [ 0, %6 ]
tail call void %1(i32 %11, i8* %10)
%12 = add i32 %11, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mysterycall(int *);
int /*<<< orphan*/ nomodcall(int *);
int noeffect(int *x, int y) {
  y == *x;
  nomodcall(x);
  mysterycall(x);
  return *x;
}


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

x86 assembly (clang, -O2):
<noeffect>:
push   %rbx
mov    %rdi,%rbx
call   1040 <nomodcall@plt>
mov    %rbx,%rdi
call   1030 <mysterycall@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @noeffect(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = icmp eq i32 %5, %7
%9 = zext i1 %8 to i32
%10 = load i32*, i32** %3
%11 = call i32 @nomodcall(i32* %10)
%12 = load i32*, i32** %3
%13 = call i32 @mysterycall(i32* %12)
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @noeffect(i32* %0, i32 %1) {
%3 = tail call i32 @nomodcall(i32* %0)
%4 = tail call i32 @mysterycall(i32* %0)
%5 = load i32, i32* %0
ret i32 %5
}
double round_double_int(double a) { return (double)(int)a; }


x86 assembly (clang, -O0):
<round_double_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_double_int>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @round_double_int(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @round_double_int(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswspace(int /*<<< orphan*/);
int __iswspace_l(wint_t c, locale_t l) { return iswspace(c); }


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

x86 assembly (clang, -O2):
<__iswspace_l>:
jmp    1030 <iswspace@plt>

LLVM IR (-O0):
define i32 @__iswspace_l(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 = call i32 @iswspace(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__iswspace_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswspace(i32 %0)
ret i32 %3
}
unsigned long ps7GetSiliconVersion() {
  unsigned long mask = 0xF0000000;
  unsigned long *addr = (unsigned long *)0XF8007080;
  unsigned long ps_version = (*addr & mask) >> 28;
  return ps_version;
}


x86 assembly (clang, -O0):
<ps7GetSiliconVersion>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf0000000,%eax
mov    %rax,-0x8(%rbp)
mov    $0xf8007080,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
and    -0x8(%rbp),%rax
shr    $0x1c,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps7GetSiliconVersion>:
mov    $0xf8007080,%eax
mov    (%rax),%eax
shr    $0x1c,%eax
ret

LLVM IR (-O0):
define i64 @ps7GetSiliconVersion() {
%1 = alloca i64
%2 = alloca i64*
%3 = alloca i64
store i64 4026531840, i64* %1
store i64* inttoptr (i64 4160778368 to i64*), i64** %2
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = load i64, i64* %1
%7 = and i64 %5, %6
%8 = lshr i64 %7, 28
store i64 %8, i64* %3
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @ps7GetSiliconVersion() {
%1 = load i64, i64* inttoptr (i64 4160778368 to i64*)
%2 = lshr i64 %1, 28
%3 = and i64 %2, 15
ret i64 %3
}
/* Type definitions */
struct AVD3D11VAContext {
  int dummy;
};

/* Variables and functions */
struct AVD3D11VAContext *av_d3d11va_alloc_context(void) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.AVD3D11VAContext = type { i32 }
define %struct.AVD3D11VAContext* @av_d3d11va_alloc_context() {
ret %struct.AVD3D11VAContext* null
}

LLVM IR (-O2):
%struct.AVD3D11VAContext = type { i32 }
define noalias %struct.AVD3D11VAContext* @av_d3d11va_alloc_context() {
ret %struct.AVD3D11VAContext* null
}
int nn_xreq_ispeer(int socktype) { return socktype == (3 * 16 + 1) ? 1 : 0; }


x86 assembly (clang, -O0):
<nn_xreq_ispeer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x31,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_xreq_ispeer>:
xor    %eax,%eax
cmp    $0x31,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @nn_xreq_ispeer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 49
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @nn_xreq_ispeer(i32 %0) {
%2 = icmp eq i32 %0, 49
%3 = zext i1 %2 to i32
ret i32 %3
}
int GetCompileYear(void) {
  int year = (((("Mar 16 2022"[7] - '0') * 10 + ("Mar 16 2022"[8] - '0')) * 10 +
               ("Mar 16 2022"[9] - '0')) *
                  10 +
              ("Mar 16 2022"[10] - '0'));
  return (year);
}


x86 assembly (clang, -O0):
<GetCompileYear>:
push   %rbp
mov    %rsp,%rbp
movsbl 0xefc(%rip),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
movsbl 0xef0(%rip),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
imul   $0xa,%eax,%eax
movsbl 0xee2(%rip),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
imul   $0xa,%eax,%eax
movsbl 0xed4(%rip),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Mar 16 2022\00"
define i32 @GetCompileYear() {
%1 = alloca i32
%2 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 7)
%3 = sext i8 %2 to i32
%4 = sub nsw i32 %3, 48
%5 = mul nsw i32 %4, 10
%6 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 8)
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 48
%9 = add nsw i32 %5, %8
%10 = mul nsw i32 %9, 10
%11 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 9)
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 48
%14 = add nsw i32 %10, %13
%15 = mul nsw i32 %14, 10
%16 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 10)
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 48
%19 = add nsw i32 %15, %18
store i32 %19, i32* %1
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
define i32 @GetCompileYear() {
ret i32 2022
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int j, a;
  a = 1;
  for (j = 1; j < 11; j++) {
    a = a * j;
  }
  printf("%d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xb,-0x8(%rbp)
jge    114f <main+0x3f>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea7(%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    $0x375f00,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3628800)
ret i32 0
}
char is_hex_char(char c) {
  if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') ||
      (c >= 'A' && c <= 'F'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_hex_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <is_hex_char+0x24>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jle    1158 <is_hex_char+0x58>
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     113e <is_hex_char+0x3e>
movsbl -0x2(%rbp),%eax
cmp    $0x66,%eax
jle    1158 <is_hex_char+0x58>
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1161 <is_hex_char+0x61>
movsbl -0x2(%rbp),%eax
cmp    $0x46,%eax
jg     1161 <is_hex_char+0x61>
movb   $0x1,-0x1(%rbp)
jmp    1165 <is_hex_char+0x65>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex_char>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %cl
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %al
or     %cl,%al
ret

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

LLVM IR (-O2):
define signext i8 @is_hex_char(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i8
ret i8 %8
}
int dummy(int ch) { return ch; }


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

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

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

LLVM IR (-O2):
define i32 @dummy(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int cichlid_rotate_right_64(int, int);
uint64_t sigma1(uint64_t x) {
  return cichlid_rotate_right_64(x, 19) ^ cichlid_rotate_right_64(x, 61) ^
         (x >> 6);
}


x86 assembly (clang, -O0):
<sigma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x13,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3d,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x13,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x3d,%esi
call   1030 <cichlid_rotate_right_64@plt>
sar    $0x6,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sigma1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cichlid_rotate_right_64(i32 %3, i32 19)
%5 = load i32, i32* %2
%6 = call i32 @cichlid_rotate_right_64(i32 %5, i32 61)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 6
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @sigma1(i32 %0) {
%2 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 19)
%3 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 61)
%4 = ashr i32 %0, 6
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Variables and functions */
long sysconf(int);
long dnk_sysconf(int conf) { return sysconf(conf); }


x86 assembly (clang, -O0):
<dnk_sysconf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sysconf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dnk_sysconf>:
jmp    1030 <sysconf@plt>

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

LLVM IR (-O2):
define i64 @dnk_sysconf(i32 %0) {
%2 = tail call i64 @sysconf(i32 %0)
ret i64 %2
}
int f(int n) {
  int m = n + 3, j = 1;
  unsigned i = 0;
  while (n < m) {
    m = m + 1;
    n = n + 2;
  }
  return m;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1141 <f+0x41>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    111e <f+0x1e>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    0x3(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
lea    0x1(%rcx),%eax
add    $0x2,%edi
cmp    %ecx,%edi
jle    1110 <f+0x10>
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add nsw i32 %0, 3
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ %0, %1 ], [ %7, %3 ]
%5 = phi i32 [ %2, %1 ], [ %6, %3 ]
%6 = add nsw i32 %5, 1
%7 = add nsw i32 %4, 2
%8 = icmp sgt i32 %7, %5
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 %6
}
/* Variables and functions */
void *malloc_string(void *);
void *default_key_copy(void *target) { return malloc_string(target); }


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

x86 assembly (clang, -O2):
<default_key_copy>:
jmp    1030 <malloc_string@plt>

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

LLVM IR (-O2):
define i8* @default_key_copy(i8* %0) {
%2 = tail call i8* @malloc_string(i8* %0)
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct rusage {
  TYPE_1__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ RUSAGE_SELF;
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
double scnds_() {
  static struct rusage T;
  getrusage(RUSAGE_SELF, &T);
  return ((double)T.ru_utime.tv_sec + ((double)T.ru_utime.tv_usec) / 1000000.0);
}


x86 assembly (clang, -O0):
<scnds_>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x2f0c(%rip),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq 0x2f06(%rip),%xmm0
cvtsi2sdq 0x2ef5(%rip),%xmm1
movsd  0xebd(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<scnds_>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0x2f0f(%rip),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq 0x2f09(%rip),%xmm1
cvtsi2sdq 0x2ef8(%rip),%xmm0
divsd  0xec0(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@scnds_.T = internal global %struct.rusage zeroinitializer
@RUSAGE_SELF = global i32 0
define double @scnds_() {
%1 = load i32, i32* @RUSAGE_SELF
%2 = call i32 @getrusage(i32 %1, %struct.rusage* @scnds_.T)
%3 = load i64, i64* getelementptr inbounds (%struct.rusage, %struct.rusage* @scnds_.T, i32 0, i32 0, i32 1)
%4 = sitofp i64 %3 to double
%5 = load i64, i64* getelementptr inbounds (%struct.rusage, %struct.rusage* @scnds_.T, i32 0, i32 0, i32 0)
%6 = sitofp i64 %5 to double
%7 = fdiv double %6, 1.000000e+06
%8 = fadd double %4, %7
ret double %8
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64, i64 }
@scnds_.T = internal global %struct.rusage zeroinitializer
@RUSAGE_SELF = global i32 0
define double @scnds_() {
%1 = load i32, i32* @RUSAGE_SELF
%2 = tail call i32 @getrusage(i32 %1, %struct.rusage* @scnds_.T)
%3 = load i64, i64* getelementptr inbounds (%struct.rusage, %struct.rusage* @scnds_.T, i64 0, i32 0, i32 1)
%4 = sitofp i64 %3 to double
%5 = load i64, i64* getelementptr inbounds (%struct.rusage, %struct.rusage* @scnds_.T, i64 0, i32 0, i32 0)
%6 = sitofp i64 %5 to double
%7 = fdiv double %6, 1.000000e+06
%8 = fadd double %7, %4
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a = 5;
  unsigned int b = -3;
  int c;
  a += b;
  if (b > a) {
    printf("Falsch\n");
  } else {
    printf("Hallo 2014er MaTSEs\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xfffffffd,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1153 <main+0x43>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
jmp    115f <main+0x4f>
lea    0xeae(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Falsch\0A\00"
@.str.1 = [21 x i8] c"Hallo 2014er MaTSEs\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 -3, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = add i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = icmp ugt i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %15
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"Falsch\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Free1D(double *);
void Free2D(double **data) {
  Free1D(*data);
  Free1D((double *)data);
}


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

x86 assembly (clang, -O2):
<Free2D>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <Free1D@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <Free1D@plt>

LLVM IR (-O0):
define void @Free2D(double** %0) {
%2 = alloca double**
store double** %0, double*** %2
%3 = load double**, double*** %2
%4 = load double*, double** %3
%5 = call i32 @Free1D(double* %4)
%6 = load double**, double*** %2
%7 = bitcast double** %6 to double*
%8 = call i32 @Free1D(double* %7)
ret void
}

LLVM IR (-O2):
define void @Free2D(double** %0) {
%2 = load double*, double** %0
%3 = tail call i32 @Free1D(double* %2)
%4 = bitcast double** %0 to double*
%5 = tail call i32 @Free1D(double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setRegisterConstant64(int, long);
void setRegisterConstant(int gpr, long value) {
  setRegisterConstant64(gpr, value);
}


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

x86 assembly (clang, -O2):
<setRegisterConstant>:
jmp    1030 <setRegisterConstant64@plt>

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

LLVM IR (-O2):
define void @setRegisterConstant(i32 %0, i64 %1) {
%3 = tail call i32 @setRegisterConstant64(i32 %0, i64 %1)
ret void
}
int stringLength_p(char *string) {
  int index = 0;
  while (*string != '\0') {
    string++;
    index++;
  }
  return index;
}


x86 assembly (clang, -O0):
<stringLength_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <stringLength_p+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <stringLength_p+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringLength_p>:
cmpb   $0x0,(%rdi)
je     111c <stringLength_p+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <stringLength_p+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stringLength_p(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ reuse;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
void enable_reuse_socket(int socket_desc) {
  int reuse = 1;
  setsockopt(socket_desc, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
}


x86 assembly (clang, -O0):
<enable_reuse_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_reuse_socket>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define void @enable_reuse_socket(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_REUSEADDR
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define void @enable_reuse_socket(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_REUSEADDR
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
ret void
}
void M68KDummyDeInit(void) {}


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

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

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

LLVM IR (-O2):
define void @M68KDummyDeInit() {
ret void
}
void source(const double *prim, double *cons, const double *xp,
            const double *xm, double dVdt) {}


x86 assembly (clang, -O0):
<source>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @source(double* %0, double* %1, double* %2, double* %3, double %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store double %4, double* %10
ret void
}

LLVM IR (-O2):
define void @source(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, unsigned char const *, int);
void GLUE_MOVE_PX_STACKPTR_GEN(void *b, int wv) {
  static const unsigned char tab[3][2] = {
      {0x89, 0xe0},
      {0x89, 0xe7},
      {0x89, 0xe1},
  };
  memcpy(b, tab[wv], 2);
}


x86 assembly (clang, -O0):
<GLUE_MOVE_PX_STACKPTR_GEN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
lea    0xed2(%rip),%rsi
shl    $0x1,%rax
add    %rax,%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_MOVE_PX_STACKPTR_GEN>:
movslq %esi,%rax
lea    0xee6(%rip),%rcx
lea    (%rcx,%rax,2),%rsi
mov    $0x2,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@GLUE_MOVE_PX_STACKPTR_GEN.tab = internal constant [3 x [2 x i8]] [[2 x i8] c"\89\E0", [2 x i8] c"\89\E7", [2 x i8] c"\89\E1"]
define void @GLUE_MOVE_PX_STACKPTR_GEN(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 = sext i32 %6 to i64
%8 = getelementptr inbounds [3 x [2 x i8]], [3 x [2 x i8]]* @GLUE_MOVE_PX_STACKPTR_GEN.tab, i64 0, i64 %7
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %8, i64 0, i64 0
%10 = call i32 @memcpy(i8* %5, i8* %9, i32 2)
ret void
}

LLVM IR (-O2):
@GLUE_MOVE_PX_STACKPTR_GEN.tab = internal constant [3 x [2 x i8]] [[2 x i8] c"\89\E0", [2 x i8] c"\89\E7", [2 x i8] c"\89\E1"]
define void @GLUE_MOVE_PX_STACKPTR_GEN(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [3 x [2 x i8]], [3 x [2 x i8]]* @GLUE_MOVE_PX_STACKPTR_GEN.tab, i64 0, i64 %3, i64 0
%5 = tail call i32 @memcpy(i8* %0, i8* %4, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ intervalTimer_getTotalDurationInSeconds(int /*<<< orphan*/,
                                                           double *);
double TimerHardware_GetResponseTime() {
  double responseTime = 0;
  intervalTimer_getTotalDurationInSeconds(0, &responseTime);
  return responseTime;
}


x86 assembly (clang, -O0):
<TimerHardware_GetResponseTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <intervalTimer_getTotalDurationInSeconds@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerHardware_GetResponseTime>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <intervalTimer_getTotalDurationInSeconds@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @TimerHardware_GetResponseTime() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @intervalTimer_getTotalDurationInSeconds(i32 0, double* %1)
%3 = load double, double* %1
ret double %3
}

LLVM IR (-O2):
define double @TimerHardware_GetResponseTime() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = call i32 @intervalTimer_getTotalDurationInSeconds(i32 0, double* %1)
%4 = load double, double* %1
ret double %4
}
void ARGB4444ToARGBRow_Any_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToARGBRow_Any_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void *func2(void *arg) {
  int in = 0;
  in = *((int *)arg);
  while (1) {
    printf("in func2 the num is %d\n", in);
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    113c <func2+0x1c>

x86 assembly (clang, -O2):
<func2>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <func2+0x10>

LLVM IR (-O0):
@.str = [24 x i8] c"in func2 the num is %d\0A\00"
define i8* @func2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
br label %7
7: ; preds = %1, %7
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @sleep(i32 1)
br label %7
}

LLVM IR (-O2):
@.str = [24 x i8] c"in func2 the num is %d\0A\00"
define noalias i8* @func2(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
br label %4
4: ; preds = %4, %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = tail call i32 @sleep(i32 1)
br label %4
}
/* Type definitions */
typedef char wchar_t;
struct _Locale_time {
  int dummy;
};

/* Variables and functions */
const wchar_t *_WLocale_pm_str(struct _Locale_time *ltime
                               __attribute__((__unused__)),
                               wchar_t *buf __attribute__((__unused__)),
                               size_t bufSize __attribute__((__unused__))) {
  return L"PM";
}


x86 assembly (clang, -O0):
<_WLocale_pm_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xee9(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_time = type { i32 }
@.str = [3 x i32] [i32 80, i32 77, i32 0]
define i8* @_WLocale_pm_str(%struct._Locale_time* %0, i8* %1, i64 %2) {
%4 = alloca %struct._Locale_time*
%5 = alloca i8*
%6 = alloca i64
store %struct._Locale_time* %0, %struct._Locale_time** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i8* bitcast ([3 x i32]* @.str to i8*)
}

LLVM IR (-O2):
%struct._Locale_time = type { i32 }
@.str = [3 x i32] [i32 80, i32 77, i32 0]
define i8* @_WLocale_pm_str(%struct._Locale_time* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i8* bitcast ([3 x i32]* @.str to i8*)
}