xunge/DecIR huggingface dataset:
_LE(long val, unsigned char *le) {
  le[0] = val;
  le[1] = val >> 8;
  le[2] = val >> 16;
  le[3] = val >> 24;
}


x86 assembly (clang, -O0):
<_LE>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x8,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
sar    $0x10,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
sar    $0x18,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_LE>:
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @_LE(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
store i8 %3, i8* %1
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %0, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %0, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret i32 undef
}
/* Variables and functions */
size_t string_hash(const void *const key) {
  const unsigned char *string_key = key;
  size_t hash = 5381;
  int c;
  while ((c = *string_key++)) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<string_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1152 <string_hash+0x52>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <string_hash+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <string_hash+0x2c>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @string_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = zext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ header_two_func();
int main(void) {
  header_two_func();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <header_two_func@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @header_two_func()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @header_two_func()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpord_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d f4(__m128d x, __m128d y) { return _mm_cmpord_pd(x, y); }


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

x86 assembly (clang, -O2):
<f4>:
jmp    1030 <_mm_cmpord_pd@plt>

LLVM IR (-O0):
define i32 @f4(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* %4
%7 = call i32 @_mm_cmpord_pd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpord_pd(i32 %0, i32 %1)
ret i32 %3
}
char *f(char *s, char *us) {
  char *x = f(us, s);
  return f(x, us);
}


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

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <f@plt>
nop
jmp    1120 <f+0x10>

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

LLVM IR (-O2):
define noalias i8* @f(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i8* @f(i8* %1, i8* %0)
br label %4
4: ; preds = %4, %2
br label %4
}
void domvcur(oy, ox, ny, nx) int oy, ox, ny, nx;
{
  __unsetattr(1);
  if (oy == ny && ox == nx)
    return;
  __mvcur(oy, ox, ny, nx, 1);
}


x86 assembly (clang, -O0):
<domvcur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <__unsetattr@plt>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    115d <domvcur+0x3d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    115d <domvcur+0x3d>
jmp    1176 <domvcur+0x56>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x1,%r8d
mov    $0x0,%al
call   1030 <__mvcur@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<domvcur>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%r15d
mov    %edi,%ebx
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <__unsetattr@plt>
cmp    %ebp,%ebx
jne    1151 <domvcur+0x31>
cmp    %r14d,%r15d
jne    1151 <domvcur+0x31>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <__mvcur@plt>

LLVM IR (-O0):
define void @domvcur(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 (i32, ...) bitcast (i32 (...)* @__unsetattr to i32 (i32, ...)*)(i32 1)
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %4
%14 = load i32, i32* %6
%15 = load i32, i32* %8
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %13
br label %24
18: ; preds = %13, %4
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @__mvcur to i32 (i32, i32, i32, i32, i32, ...)*)(i32 %19, i32 %20, i32 %21, i32 %22, i32 1)
br label %24
24: ; preds = %18, %17
ret void
}

LLVM IR (-O2):
define void @domvcur(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @__unsetattr to i32 (i32, ...)*)(i32 1)
%6 = icmp eq i32 %0, %2
%7 = icmp eq i32 %1, %3
%8 = and i1 %6, %7
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @__mvcur to i32 (i32, i32, i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 %2, i32 %3, i32 1)
br label %11
11: ; preds = %4, %9
ret void
}
void setfpu_(void) {}


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

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

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

LLVM IR (-O2):
define void @setfpu_() {
ret void
}
void fun_3(int *arr, unsigned index) { arr[index] = 10; }


x86 assembly (clang, -O0):
<fun_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movl   $0xa,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_3>:
mov    %esi,%eax
movl   $0xa,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @fun_3(i32* nocapture writeonly %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 10, i32* %4
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ _write(int, int *, int);
void led_reset(int fd) {
  uint8_t buf[] = {0x03, 0x06};
  _write(fd, buf, sizeof(buf));
}


x86 assembly (clang, -O0):
<led_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x8,%edx
call   1030 <_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_reset>:
push   %rax
movabs $0x600000003,%rax
mov    %rax,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <_write@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.led_reset.buf = [2 x i32] [i32 3, i32 6]
define void @led_reset(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i32]
store i32 %0, i32* %2
%4 = bitcast [2 x i32]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%7 = call i32 @_write(i32 %5, i32* %6, i32 8)
ret void
}

LLVM IR (-O2):
define void @led_reset(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 25769803779, i64* %2
%4 = bitcast i64* %2 to i32*
%5 = call i32 @_write(i32 %0, i32* %4, i32 8)
ret void
}
int inLittleEndian() {
  short s = 1;
  return (((char *)&s)[0]) == 1;
}


x86 assembly (clang, -O0):
<inLittleEndian>:
push   %rbp
mov    %rsp,%rbp
movw   $0x1,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @inLittleEndian() {
%1 = alloca i16
store i16 1, i16* %1
%2 = bitcast i16* %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 0
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @inLittleEndian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ modified_print(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "USAGE: %s <string>\n", argv[0]);
    return -1;
  }
  modified_print(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1168 <main+0x48>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117c <main+0x5c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <modified_print@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1030 <modified_print@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"USAGE: %s <string>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 -1, i32* %3
br label %19
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @modified_print(i8* %17)
store i32 0, i32* %3
br label %19
19: ; preds = %14, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"USAGE: %s <string>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %12
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @modified_print(i8* %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ -1, %4 ], [ 0, %8 ]
ret i32 %13
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_Laurent_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(781, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_dobldobl_Laurent_container_to_target_system>:
mov    $0x30d,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_dobldobl_Laurent_container_to_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 781, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_Laurent_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 781, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int GCD(int a, int b) {
  int c;
  while (b != 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}


x86 assembly (clang, -O0):
<GCD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <GCD+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <GCD+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @GCD(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
float get_rn_flt_simple();
float fget_rn_flt_sim(void) { return get_rn_flt_simple(); }


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

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

LLVM IR (-O0):
define float @fget_rn_flt_sim() {
%1 = call float (...) @get_rn_flt_simple()
ret float %1
}

LLVM IR (-O2):
define float @fget_rn_flt_sim() {
%1 = tail call float (...) @get_rn_flt_simple()
ret float %1
}
int main(int argc, char **argv) {
  char option = '/0';
  int sum = 0;
  float product = 1.0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x30,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
movss  0xedb(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 48, i8* %6
store i32 0, i32* %7
store float 1.000000e+00, float* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void XtSetErrorMsgHandler() {}


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

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

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

LLVM IR (-O2):
define void @XtSetErrorMsgHandler() {
ret void
}
/* Variables and functions */
float gb_random_range_float(float, float);
float gb_random01(void) { return gb_random_range_float(0.0f, 1.0f); }


x86 assembly (clang, -O0):
<gb_random01>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  0xee1(%rip),%xmm1
call   1030 <gb_random_range_float@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_random01>:
movss  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
jmp    1030 <gb_random_range_float@plt>

LLVM IR (-O0):
define float @gb_random01() {
%1 = call float @gb_random_range_float(float 0.000000e+00, float 1.000000e+00)
ret float %1
}

LLVM IR (-O2):
define float @gb_random01() {
%1 = tail call float @gb_random_range_float(float 0.000000e+00, float 1.000000e+00)
ret float %1
}
int test_imm_5Cuint8_mem(unsigned char *val) {
  return ((*val) & (0x5C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Cuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 92
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void LEDMatrix_Display_Messages() {}


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

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

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

LLVM IR (-O2):
define void @LEDMatrix_Display_Messages() {
ret void
}
void fc69(int n) {
  {
    typedef int(*b)[n];
  a : {
    typedef int(*c)[n];
    0;
  }
    {
      typedef int(*d)[n];
      goto a;
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc69>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc69+0x7>

x86 assembly (clang, -O2):
<fc69>:
jmp    1100 <fc69>

LLVM IR (-O0):
define void @fc69(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
br label %5
5: ; preds = %5, %1
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %5
10: ; No predecessors!
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc69(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int fork() {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<fork>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @fork() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @fork() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}
/* Variables and functions */
size_t strtoul(char *, char **, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
size_t get_num(char *s) {
  char *endp;
  size_t v = strtoul(s, &endp, 0);
  if (s == endp)
    usage();
  return v;
}


x86 assembly (clang, -O0):
<get_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1154 <get_num+0x34>
mov    $0x0,%al
call   1030 <usage@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %rax,%r14
cmp    %rbx,(%rsp)
jne    1141 <get_num+0x21>
xor    %eax,%eax
call   1030 <usage@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @get_num(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtoul(i8* %5, i8** %3, i32 0)
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = load i8*, i8** %3
%9 = icmp eq i8* %7, %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 (...) @usage()
br label %12
12: ; preds = %10, %1
%13 = load i64, i64* %4
ret i64 %13
}

LLVM IR (-O2):
define i64 @get_num(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtoul(i8* %0, i8** %2, i32 0)
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, %0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (...) @usage()
br label %9
9: ; preds = %7, %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fflush(int /*<<< orphan*/ *);
int fclean(FILE *fp) { return fflush(fp); }


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

x86 assembly (clang, -O2):
<fclean>:
jmp    1030 <fflush@plt>

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

LLVM IR (-O2):
define i32 @fclean(i32* nocapture %0) {
%2 = tail call i32 @fflush(i32* %0)
ret i32 %2
}
int llib_str_tolower(int c) {
  return (((c >= 'A') && (c <= 'Z')) ? c + 32 : c);
}


x86 assembly (clang, -O0):
<llib_str_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1129 <llib_str_tolower+0x29>
cmpl   $0x5a,-0x4(%rbp)
jg     1129 <llib_str_tolower+0x29>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <llib_str_tolower+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @llib_str_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @llib_str_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ merge(int, int, int);
void mergesort(int start, int end) {
  if (start == end)
    return;
  int mid = (start + end) / 2;
  mergesort(start, mid);
  mergesort(mid + 1, end);
  merge(start, mid, end);
}


x86 assembly (clang, -O0):
<mergesort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    113f <mergesort+0x1f>
jmp    1177 <mergesort+0x57>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <mergesort@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1040 <mergesort@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <merge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergesort>:
cmp    %esi,%edi
jne    1125 <mergesort+0x5>
ret
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%r15d
lea    (%r14,%r15,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%esi
call   1040 <mergesort@plt>
lea    0x1(%rbx),%edi
mov    %r14d,%esi
call   1040 <mergesort@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <merge@plt>

LLVM IR (-O0):
define void @mergesort(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
br label %24
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
%14 = sdiv i32 %13, 2
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = load i32, i32* %5
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = call i32 @merge(i32 %20, i32 %21, i32 %22)
br label %24
24: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @mergesort(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %5
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = add nsw i32 %1, %0
%7 = sdiv i32 %6, 2
tail call void @mergesort(i32 %0, i32 %7)
%8 = add nsw i32 %7, 1
tail call void @mergesort(i32 %8, i32 %1)
%9 = tail call i32 @merge(i32 %0, i32 %7, i32 %1)
br label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int *, int);
int main() {
  int arr[] = {1, 2, 3, 4};
  int n = sizeof(arr) / sizeof(arr[0]);
  printf("%d", sum(arr, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <sum@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.arr = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @sum(i32* %3, i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void f1() { int a = {1}; }


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

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

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

LLVM IR (-O2):
define void @f1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_wsrp(char *, void *);
void wsrp_2(void *v) { __builtin_arm_wsrp("0:1:2:3:4", v); }


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

x86 assembly (clang, -O2):
<wsrp_2>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <__builtin_arm_wsrp@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"0:1:2:3:4\00"
define void @wsrp_2(i8* %0) {
%2 = tail call i32 @__builtin_arm_wsrp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int plazamsg_maxlength() { return (40 + 2 + 512 + 2); }


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

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

LLVM IR (-O0):
define i32 @plazamsg_maxlength() {
ret i32 556
}

LLVM IR (-O2):
define i32 @plazamsg_maxlength() {
ret i32 556
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
FILE *fopen(const char *fname, const char *mode) { return (FILE *)-1; }


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

x86 assembly (clang, -O2):
<fopen>:
mov    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i32* @fopen(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32* inttoptr (i64 -1 to i32*)
}
void init_platform_specific(void) {}


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

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

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

LLVM IR (-O2):
define void @init_platform_specific() {
ret void
}
/* Variables and functions */
double ln_get_pluto_earth_dist(double);
double ln_get_pluto_sdiam(double JD) {
  double So = 2.07;
  double dist;
  dist = ln_get_pluto_earth_dist(JD);
  return So / dist;
}


x86 assembly (clang, -O0):
<ln_get_pluto_sdiam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_pluto_earth_dist@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_pluto_sdiam>:
push   %rax
call   1030 <ln_get_pluto_earth_dist@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ln_get_pluto_sdiam(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 2.070000e+00, double* %3
%5 = load double, double* %2
%6 = call double @ln_get_pluto_earth_dist(double %5)
store double %6, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @ln_get_pluto_sdiam(double %0) {
%2 = tail call double @ln_get_pluto_earth_dist(double %0)
%3 = fdiv double 2.070000e+00, %2
ret double %3
}
struct wire_client_netdev *to_client_netdev(struct netdev *netdev) {
  return (struct wire_client_netdev *)netdev;
}


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

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

LLVM IR (-O0):
%struct.wire_client_netdev = type opaque
%struct.netdev = type opaque
define %struct.wire_client_netdev* @to_client_netdev(%struct.netdev* %0) {
%2 = alloca %struct.netdev*
store %struct.netdev* %0, %struct.netdev** %2
%3 = load %struct.netdev*, %struct.netdev** %2
%4 = bitcast %struct.netdev* %3 to %struct.wire_client_netdev*
ret %struct.wire_client_netdev* %4
}

LLVM IR (-O2):
%struct.wire_client_netdev = type opaque
%struct.netdev = type opaque
define %struct.wire_client_netdev* @to_client_netdev(%struct.netdev* readnone %0) {
%2 = bitcast %struct.netdev* %0 to %struct.wire_client_netdev*
ret %struct.wire_client_netdev* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_socket_server_new_ipv4() {
  printf("NOT IMPLEMENTED:"
         "pa_socket_server_new_ipv4"
         "\n");
}


x86 assembly (clang, -O0):
<pa_socket_server_new_ipv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_socket_server_new_ipv4\00"
define i32 @pa_socket_server_new_ipv4() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
unsigned int at_chip_info();
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int);
int at_act_info() {
  unsigned int info = at_chip_info();
  printf("chip signature: 0x%02X, 0x%02X, 0x%02X\n", (info >> 16) & 0xFF,
         (info >> 8) & 0xFF, info & 0xFF);
  return 1;
}


x86 assembly (clang, -O0):
<at_act_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <at_chip_info@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
shr    $0x10,%esi
and    $0xff,%esi
mov    -0x4(%rbp),%edx
shr    $0x8,%edx
and    $0xff,%edx
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<at_act_info>:
push   %rax
xor    %eax,%eax
call   1040 <at_chip_info@plt>
movzbl %ah,%edx
movzbl %al,%ecx
shr    $0x10,%eax
movzbl %al,%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"chip signature: 0x%02X, 0x%02X, 0x%02X\0A\00"
define i32 @at_act_info() {
%1 = alloca i32
%2 = call i32 (...) @at_chip_info()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = lshr i32 %3, 16
%5 = and i32 %4, 255
%6 = load i32, i32* %1
%7 = lshr i32 %6, 8
%8 = and i32 %7, 255
%9 = load i32, i32* %1
%10 = and i32 %9, 255
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %10)
ret i32 1
}

LLVM IR (-O2):
@.str = [40 x i8] c"chip signature: 0x%02X, 0x%02X, 0x%02X\0A\00"
define i32 @at_act_info() {
%1 = tail call i32 (...) @at_chip_info()
%2 = lshr i32 %1, 16
%3 = and i32 %2, 255
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = and i32 %1, 255
%7 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %6)
ret i32 1
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  char *buf = (char *)malloc(100);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1030 <malloc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 100)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 100)
ret i32 0
}
void OnKEYSET_SetValue(double param) {}


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

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

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

LLVM IR (-O2):
define void @OnKEYSET_SetValue(double %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(long);
void Long_seed(long seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<Long_seed>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @Long_seed(i64 %0) {
%2 = tail call i32 @srand(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(int *, int *, int);
void strncpy_good3() {
  int arr1[10];
  int arr2[20];
  strncpy(arr2, arr1, 20);
}


x86 assembly (clang, -O0):
<strncpy_good3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x80(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x14,%edx
call   1030 <strncpy@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_good3>:
sub    $0x88,%rsp
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x14,%edx
call   1030 <strncpy@plt>
add    $0x88,%rsp
ret

LLVM IR (-O0):
define void @strncpy_good3() {
%1 = alloca [10 x i32]
%2 = alloca [20 x i32]
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @strncpy(i32* %3, i32* %4, i32 20)
ret void
}

LLVM IR (-O2):
define void @strncpy_good3() {
%1 = alloca [10 x i32]
%2 = alloca [20 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [20 x i32]* %2 to i8*
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = call i32 @strncpy(i32* %5, i32* %6, i32 20)
ret void
}
unsigned long get_unsigned_long_min() {
  unsigned long min = 0;
  return (min);
}


x86 assembly (clang, -O0):
<get_unsigned_long_min>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @get_unsigned_long_min() {
%1 = alloca i64
store i64 0, i64* %1
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @get_unsigned_long_min() {
ret i64 0
}
OP(dd, f1) { op_f1(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_f1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f1()
ret i32 undef
}
unsigned le_uint16_read(const void *ptr) {
  const unsigned char *ptr8 = (const unsigned char *)ptr;
  return (unsigned)ptr8[0] | (unsigned)ptr8[1] << 8;
}


x86 assembly (clang, -O0):
<le_uint16_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_uint16_read>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @le_uint16_read(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @le_uint16_read(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main(void) {
  int c, n = 0;
  while ((c = getchar()) != EOF) {
    if (c == '\n') {
      n++;
    }
  }
  printf("Cantidad de líneas : %d\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [26 x i8] c"Cantidad de l\C3\ADneas : %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
int audioRead(int reg) {}


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

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

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

LLVM IR (-O2):
define i32 @audioRead(i32 %0) {
ret i32 undef
}