xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int fibo(int);
int main(void) {
  int x = 5;
  int result = fibo(x);
  if (result == 5) {
  ERROR:
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fibo@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    1157 <main+0x37>
jmp    1150 <main+0x30>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <fibo@plt>
cmp    $0x5,%eax
jne    1137 <main+0x17>
xor    %eax,%eax
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibo(i32 5)
%2 = icmp eq i32 %1, 5
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
int h(int x) {
  if (x >= 0 && x <= 3) {
    x = x ^ 1;
    x = x & 3;
  }
  return x;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     112d <h+0x2d>
cmpl   $0x3,-0x4(%rbp)
jg     112d <h+0x2d>
mov    -0x4(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
mov    %edi,%eax
and    $0x3,%eax
xor    $0x1,%eax
cmp    $0x4,%edi
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = and i32 %0, 3
%4 = xor i32 %3, 1
%5 = select i1 %2, i32 %4, i32 %0
ret i32 %5
}
XSetFillStyle() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetFillStyle() {
ret i32 undef
}
void XSetArcMode() {}


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

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

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

LLVM IR (-O2):
define void @XSetArcMode() {
ret void
}
const char *ls_info_git_commit() { return "[not defined]"; }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"[not defined]\00"
define i8* @ls_info_git_commit() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
void *parse_keyboard_layout(char const *, int /*<<< orphan*/);
void *init_keyboard_layout(const char *language) {
  return parse_keyboard_layout(language, 0);
}


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

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

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

LLVM IR (-O2):
define i8* @init_keyboard_layout(i8* %0) {
%2 = tail call i8* @parse_keyboard_layout(i8* %0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void reset_colors() { printf("\x1b[%dm", 0); }


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

x86 assembly (clang, -O2):
<reset_colors>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dm\00"
define void @reset_colors() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dm\00"
define void @reset_colors() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int libisofs_md5(void **, int /*<<< orphan*/ *, int /*<<< orphan*/, char *,
                 int);
int iso_md5_end(void **md5_context, char result[16]) {
  int ret;
  ret = libisofs_md5(md5_context, NULL, 0, result, 2 | (1 << 15));
  if (ret <= 0)
    return 0xE830FFFB;
  return 1;
}


x86 assembly (clang, -O0):
<iso_md5_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
mov    $0x8002,%r8d
call   1030 <libisofs_md5@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jg     1152 <iso_md5_end+0x42>
movl   $0xe830fffb,-0x4(%rbp)
jmp    1159 <iso_md5_end+0x49>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso_md5_end>:
push   %rax
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
mov    $0x8002,%r8d
call   1030 <libisofs_md5@plt>
test   %eax,%eax
mov    $0xe830fffb,%ecx
mov    $0x1,%eax
cmovle %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @iso_md5_end(i8** %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %5
%9 = call i32 @libisofs_md5(i8** %7, i32* null, i32 0, i8* %8, i32 32770)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -399441925, i32* %3
br label %14
13: ; preds = %2
store i32 1, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @iso_md5_end(i8** %0, i8* %1) {
%3 = tail call i32 @libisofs_md5(i8** %0, i32* null, i32 0, i8* %1, i32 32770)
%4 = icmp slt i32 %3, 1
%5 = select i1 %4, i32 -399441925, i32 1
ret i32 %5
}
int isSurrogateLow(unsigned int codePoint) {
  return 0xDC00 <= codePoint && codePoint <= 0xDFFF;
}


x86 assembly (clang, -O0):
<isSurrogateLow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0xdc00,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
ja     1127 <isSurrogateLow+0x27>
cmpl   $0xdfff,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSurrogateLow>:
and    $0xfffffc00,%edi
xor    %eax,%eax
cmp    $0xdc00,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isSurrogateLow(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ule i32 56320, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 57343
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isSurrogateLow(i32 %0) {
%2 = and i32 %0, -1024
%3 = icmp eq i32 %2, 56320
%4 = zext i1 %3 to i32
ret i32 %4
}
char nibble_to_hex(unsigned char nib) {
  return nib < 10 ? '0' + nib : 'a' + nib - 10;
}


x86 assembly (clang, -O0):
<nibble_to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jge    1126 <nibble_to_hex+0x26>
movzbl -0x1(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <nibble_to_hex+0x33>
movzbl -0x1(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_to_hex>:
cmp    $0xa,%dil
mov    $0x30,%ecx
mov    $0x57,%eax
cmovb  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @nibble_to_hex(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = add nsw i32 48, %8
br label %15
10: ; preds = %1
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = add nsw i32 97, %12
%14 = sub nsw i32 %13, 10
br label %15
15: ; preds = %10, %6
%16 = phi i32 [ %9, %6 ], [ %14, %10 ]
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @nibble_to_hex(i8 zeroext %0) {
%2 = icmp ult i8 %0, 10
%3 = select i1 %2, i8 48, i8 87
%4 = add i8 %3, %0
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float velocidade;
  printf("km/h: ");
  scanf("%f", &velocidade);
  printf("m/s: %.2f", velocidade / 3.6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea2(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xeae(%rip),%xmm0
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"km/h: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"m/s: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fdiv double %6, 3.600000e+00
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"km/h: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"m/s: %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fdiv double %6, 3.600000e+00
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AND_();
int /*<<< orphan*/ c64_memZero();
void AND_zp(void) {
  c64_memZero();
  AND_();
}


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

x86 assembly (clang, -O2):
<AND_zp>:
push   %rax
xor    %eax,%eax
call   1030 <c64_memZero@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <AND_@plt>

LLVM IR (-O0):
define void @AND_zp() {
%1 = call i32 (...) @c64_memZero()
%2 = call i32 (...) @AND_()
ret void
}

LLVM IR (-O2):
define void @AND_zp() {
%1 = tail call i32 (...) @c64_memZero()
%2 = tail call i32 (...) @AND_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ f(int *, long *);
int main() {
  union {
    long l;
    int i;
  } a;
  if (f(&a.i, &a.l) != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <f@plt>
cmp    $0x0,%rax
je     114d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
mov    %rdi,%rsi
call   1040 <f@plt>
test   %rax,%rax
jne    1135 <main+0x15>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%union.anon = type { i64 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.anon
store i32 0, i32* %1
%3 = bitcast %union.anon* %2 to i32*
%4 = bitcast %union.anon* %2 to i64*
%5 = call i64 @f(i32* %3, i64* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
%union.anon = type { i64 }
define i32 @main() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i8*
%3 = bitcast %union.anon* %1 to i32*
%4 = getelementptr inbounds %union.anon, %union.anon* %1, i64 0, i32 0
%5 = call i64 @f(i32* %3, i64* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret i32 0
}
/* Variables and functions */
scalar_t__ ui_cancellation_requested();
const char *get_cancellation_suffix(void) {
  return ui_cancellation_requested() ? " (cancelled)" : "";
}


x86 assembly (clang, -O0):
<get_cancellation_suffix>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ui_cancellation_requested@plt>
mov    %rax,%rdx
lea    0xee7(%rip),%rax
lea    0xed4(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cancellation_suffix>:
push   %rax
xor    %eax,%eax
call   1030 <ui_cancellation_requested@plt>
test   %rax,%rax
lea    0xeea(%rip),%rcx
lea    0xed7(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c" (cancelled)\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @get_cancellation_suffix() {
%1 = call i64 (...) @ui_cancellation_requested()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}

LLVM IR (-O2):
@.str = [13 x i8] c" (cancelled)\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @get_cancellation_suffix() {
%1 = tail call i64 (...) @ui_cancellation_requested()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ mcp2515_spi_select();
int /*<<< orphan*/ mcp2515_spi_transfer(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ mcp2515_spi_unselect();
void mcp2515_rx_status(uint8_t *canRxStatus) {
  assert(canRxStatus != NULL);
  mcp2515_spi_select();
  mcp2515_spi_transfer(0xA0, NULL);
  mcp2515_spi_transfer(0, canRxStatus);
  mcp2515_spi_unselect();
}


x86 assembly (clang, -O0):
<mcp2515_rx_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x0,%al
call   1030 <mcp2515_spi_select@plt>
mov    $0xa0,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <mcp2515_spi_transfer@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1050 <mcp2515_spi_transfer@plt>
mov    $0x0,%al
call   1060 <mcp2515_spi_unselect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcp2515_rx_status>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %eax,%eax
call   1030 <mcp2515_spi_select@plt>
mov    $0xa0,%edi
xor    %esi,%esi
call   1050 <mcp2515_spi_transfer@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1050 <mcp2515_spi_transfer@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <mcp2515_spi_unselect@plt>

LLVM IR (-O0):
define void @mcp2515_rx_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 (...) @mcp2515_spi_select()
%8 = call i32 @mcp2515_spi_transfer(i32 160, i32* null)
%9 = load i32*, i32** %2
%10 = call i32 @mcp2515_spi_transfer(i32 0, i32* %9)
%11 = call i32 (...) @mcp2515_spi_unselect()
ret void
}

LLVM IR (-O2):
define void @mcp2515_rx_status(i32* %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 (...) @mcp2515_spi_select()
%6 = tail call i32 @mcp2515_spi_transfer(i32 160, i32* null)
%7 = tail call i32 @mcp2515_spi_transfer(i32 0, i32* %0)
%8 = tail call i32 (...) @mcp2515_spi_unselect()
ret void
}
int islower(int character) { return (character >= 'a' && character <= 'z'); }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int fibonacci(int n) {
  if (n < 2) {
    return n;
  }
  return fibonacci(n - 2) + fibonacci(n - 1);
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <fibonacci+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibonacci+0x43>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1147 <fibonacci+0x37>
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x3(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1130 <fibonacci+0x20>
mov    $0x1,%ebx
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -2
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -1
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 3
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ 1, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int ds_get_boolean(int /*<<< orphan*/, int);
int snmp_get_dump_packet(void) { return ds_get_boolean(0, 4); }


x86 assembly (clang, -O0):
<snmp_get_dump_packet>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <ds_get_boolean@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<snmp_get_dump_packet>:
xor    %edi,%edi
mov    $0x4,%esi
jmp    1030 <ds_get_boolean@plt>

LLVM IR (-O0):
define i32 @snmp_get_dump_packet() {
%1 = call i32 @ds_get_boolean(i32 0, i32 4)
ret i32 %1
}

LLVM IR (-O2):
define i32 @snmp_get_dump_packet() {
%1 = tail call i32 @ds_get_boolean(i32 0, i32 4)
ret i32 %1
}
void test74_Test_20_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test74_Test_20_targetInit__I() {
ret void
}
void DAC_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<DAC_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DAC_IRQHandler+0x9>
jmp    1109 <DAC_IRQHandler+0x9>

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

LLVM IR (-O0):
define void @DAC_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DAC_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int tempFunction(int a, int b) {
  printf("tempFunction is called, a = %d, b = %d /n", a, b);
  return (a + b);
}


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

x86 assembly (clang, -O2):
<tempFunction>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"tempFunction is called, a = %d, b = %d /n\00"
define i32 @tempFunction(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 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
@.str = [42 x i8] c"tempFunction is called, a = %d, b = %d /n\00"
define i32 @tempFunction(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = add nsw i32 %1, %0
ret i32 %4
}
/* Variables and functions */
int samba_init_module();
int init_samba_module(void) { return samba_init_module(); }


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

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

LLVM IR (-O0):
define i32 @init_samba_module() {
%1 = call i32 (...) @samba_init_module()
ret i32 %1
}

LLVM IR (-O2):
define i32 @init_samba_module() {
%1 = tail call i32 (...) @samba_init_module()
ret i32 %1
}
float RTD_vToTemp(float v) {
  float vdiff = (v - 3.3f) * 5;
  return (1.0f / ((1.13 / 2.13) - vdiff / 25.0f) - 2) / 0.00385f;
}


x86 assembly (clang, -O0):
<RTD_vToTemp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xf12(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xf02(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xee8(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed0(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xea8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe94(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTD_vToTemp>:
addss  0xef8(%rip),%xmm0
mulss  0xef4(%rip),%xmm0
divss  0xef0(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xeec(%rip),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xee8(%rip),%xmm1
divsd  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @RTD_vToTemp(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 0x400A666660000000
%6 = fmul float %5, 5.000000e+00
store float %6, float* %3
%7 = load float, float* %3
%8 = fdiv float %7, 2.500000e+01
%9 = fpext float %8 to double
%10 = fsub double 0x3FE0F9FD98A37495, %9
%11 = fdiv double 1.000000e+00, %10
%12 = fsub double %11, 2.000000e+00
%13 = fdiv double %12, 0x3F6F8A0900000000
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @RTD_vToTemp(float %0) {
%2 = fadd float %0, 0xC00A666660000000
%3 = fmul float %2, 5.000000e+00
%4 = fdiv float %3, 2.500000e+01
%5 = fpext float %4 to double
%6 = fsub double 0x3FE0F9FD98A37495, %5
%7 = fdiv double 1.000000e+00, %6
%8 = fadd double %7, -2.000000e+00
%9 = fdiv double %8, 0x3F6F8A0900000000
%10 = fptrunc double %9 to float
ret float %10
}
/* Type definitions */
struct arg_dbl {
  int dummy;
};

/* Variables and functions */
struct arg_dbl *arg_dbln(char const *, char const *, char const *,
                         int /*<<< orphan*/, int, char const *);
struct arg_dbl *arg_dbl0(const char *shortopts, const char *longopts,
                         const char *datatype, const char *glossary) {
  return arg_dbln(shortopts, longopts, datatype, 0, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_dbl0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <arg_dbln@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_dbl0>:
mov    %rcx,%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_dbln@plt>

LLVM IR (-O0):
%struct.arg_dbl = type { i32 }
define %struct.arg_dbl* @arg_dbl0(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call %struct.arg_dbl* @arg_dbln(i8* %9, i8* %10, i8* %11, i32 0, i32 1, i8* %12)
ret %struct.arg_dbl* %13
}

LLVM IR (-O2):
%struct.arg_dbl = type { i32 }
define %struct.arg_dbl* @arg_dbl0(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call %struct.arg_dbl* @arg_dbln(i8* %0, i8* %1, i8* %2, i32 0, i32 1, i8* %3)
ret %struct.arg_dbl* %5
}
void _start() {
  printf("%d\n", uselib("/lib/libdl.so.2"));
  __asm("movl $1,%eax\n"
        "xor %ebx,%ebx\n"
        "int $128\n");
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <uselib@plt>
mov    %eax,%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
xor    %ebx,%ebx
int    $0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1040 <uselib@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%eax
xor    %ebx,%ebx
int    $0x80
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [16 x i8] c"/lib/libdl.so.2\00"
define void @_start() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @uselib to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [16 x i8] c"/lib/libdl.so.2\00"
define void @_start() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @uselib to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
tail call void asm sideeffect "movl $$1,%eax\0Axor %ebx,%ebx\0Aint $$128\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int bor(int a, int b) { return a | b; }


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

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

LLVM IR (-O0):
define i32 @bor(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 = or i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @bor(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int slk_attrset(int /*<<< orphan*/ const);
int __darwin_slk_attrset(const uint32_t c) { return slk_attrset(c); }


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

x86 assembly (clang, -O2):
<__darwin_slk_attrset>:
jmp    1030 <slk_attrset@plt>

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

LLVM IR (-O2):
define i32 @__darwin_slk_attrset(i32 %0) {
%2 = tail call i32 @slk_attrset(i32 %0)
ret i32 %2
}
unsigned char negative(signed char b) {
  unsigned long long x = b;
  x >>= 63;
  return x;
}


x86 assembly (clang, -O0):
<negative>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbq -0x1(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3f,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<negative>:
mov    %edi,%eax
shr    $0x7,%al
ret

LLVM IR (-O0):
define zeroext i8 @negative(i8 signext %0) {
%2 = alloca i8
%3 = alloca i64
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = lshr i64 %6, 63
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = trunc i64 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @negative(i8 signext %0) {
%2 = lshr i8 %0, 7
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ internal_done(int, char **);
int process_ignore(char **x) {
  internal_done(1, x);
  return 0;
}


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

x86 assembly (clang, -O2):
<process_ignore>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <internal_done@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @process_ignore(i8** %0) {
%2 = tail call i32 @internal_done(i32 1, i8** %0)
ret i32 0
}
/* Variables and functions */
int leernumero();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int num = 0;
  num = leernumero();
  printf("El numero que has escrito es: %d\n", num);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [34 x i8] c"El numero que has escrito es: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @leernumero()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void SysTick_Handler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<SysTick_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SysTick_Handler+0x9>
jmp    1109 <SysTick_Handler+0x9>

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

LLVM IR (-O0):
define void @SysTick_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SysTick_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int key_t;

/* Variables and functions */
int ftok(char const *, int);
int semget(int, int /*<<< orphan*/, int /*<<< orphan*/);
int qsem_getid(const char *keyfile, int keyid) {
  int semid;
  key_t semkey = ftok(keyfile, keyid);
  if (semkey == -1)
    return -1;
  if ((semid = semget(semkey, 0, 0)) == -1)
    return -1;
  return semid;
}


x86 assembly (clang, -O0):
<qsem_getid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <ftok@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1154 <qsem_getid+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <qsem_getid+0x5e>
mov    -0x1c(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <semget@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1178 <qsem_getid+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <qsem_getid+0x5e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsem_getid>:
push   %rax
call   1040 <ftok@plt>
cmp    $0xffffffff,%eax
je     1137 <qsem_getid+0x17>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <semget@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @qsem_getid(i8* %0, i32 %1) {
%3 = tail call i32 @ftok(i8* %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @semget(i32 %3, i32 0, i32 0)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ -1, %2 ], [ %6, %5 ]
ret i32 %8
}
/* Type definitions */
struct mdea_array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_number_node_get_array(void *p, struct mdea_array **array,
                               char **error) {
  mdea_error(error, "Expected array, got number");
  return -1;
}


x86 assembly (clang, -O0):
<mdea_number_node_get_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_number_node_get_array>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mdea_array = type { i32 }
@.str = [27 x i8] c"Expected array, got number\00"
define i32 @mdea_number_node_get_array(i8* %0, %struct.mdea_array** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca %struct.mdea_array**
%6 = alloca i8**
store i8* %0, i8** %4
store %struct.mdea_array** %1, %struct.mdea_array*** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
%8 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.mdea_array = type { i32 }
@.str = [27 x i8] c"Expected array, got number\00"
define i32 @mdea_number_node_get_array(i8* nocapture readnone %0, %struct.mdea_array** nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ lexer_tests();
int /*<<< orphan*/ parser_tests();
void grammar_tests() {
  lexer_tests();
  parser_tests();
}


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

x86 assembly (clang, -O2):
<grammar_tests>:
push   %rax
xor    %eax,%eax
call   1040 <lexer_tests@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <parser_tests@plt>

LLVM IR (-O0):
define void @grammar_tests() {
%1 = call i32 (...) @lexer_tests()
%2 = call i32 (...) @parser_tests()
ret void
}

LLVM IR (-O2):
define void @grammar_tests() {
%1 = tail call i32 (...) @lexer_tests()
%2 = tail call i32 (...) @parser_tests()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f7(int a) {
  if (4 / (a & 0xff) == 5)
    link_error();
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    $0x4,%eax
cltd
idiv   %ecx
cmp    $0x5,%eax
jne    113c <f7+0x2c>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = sdiv i32 4, %4
%6 = icmp eq i32 %5, 5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @link_error()
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @f7(i32 %0) {
ret void
}
/* Type definitions */
struct expression {
  int dummy;
};

/* Variables and functions */
int new_pseudo();
int /*<<< orphan*/ printf(char *, int, int, int);
int show_load_gen(int bits, struct expression *expr, int addr) {
  int new = new_pseudo();
  printf("\tld.%d\t\tv%d,[v%d]\n", bits, new, addr);
  return new;
}


x86 assembly (clang, -O0):
<show_load_gen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <new_pseudo@plt>
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_load_gen>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <new_pseudo@plt>
mov    %eax,%ebx
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %r14d,%ecx
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.expression = type { i32 }
@.str = [19 x i8] c"\09ld.%d\09\09v%d,[v%d]\0A\00"
define i32 @show_load_gen(i32 %0, %struct.expression* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.expression*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store %struct.expression* %1, %struct.expression** %5
store i32 %2, i32* %6
%8 = call i32 (...) @new_pseudo()
store i32 %8, i32* %7
%9 = load i32, i32* %4
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
%struct.expression = type { i32 }
@.str = [19 x i8] c"\09ld.%d\09\09v%d,[v%d]\0A\00"
define i32 @show_load_gen(i32 %0, %struct.expression* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @new_pseudo()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4, i32 %2)
ret i32 %4
}
void free_int_matrix(int **m, int nrows) {
  for (int i = 0; i < nrows; i++) {
    free(m[i]);
  }
  free(m);
}


x86 assembly (clang, -O0):
<free_int_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_int_matrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_int_matrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_int_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_int_matrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_int_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_int_matrix(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = bitcast i32** %0 to i8*
tail call void @free(i8* %7)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32*, i32** %0, i64 %9
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int strlen(const char *s) {
  int len;
  for (len = 0; *s; s++, len++)
    ;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113b <strlen+0x3b>
jmp    1121 <strlen+0x21>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @strlen(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 = icmp ne i8 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
br label %9
9: ; preds = %8
%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 @strlen(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
}
void Counter_2_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @Counter_2_SaveConfig() {
ret void
}
/* Variables and functions */
char *strchr(char *, char);
int command_get_argc(char *buffer) {
  int n = 0;
  char *p;
  while (p = strchr(buffer, ' ')) {
    n++;
    buffer = p + 1;
  }
  return n;
}


x86 assembly (clang, -O0):
<command_get_argc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1159 <command_get_argc+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <command_get_argc+0x13>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_get_argc>:
push   %rbx
mov    $0x20,%esi
call   1030 <strchr@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1149 <command_get_argc+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
add    $0x1,%rax
mov    %rax,%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1130 <command_get_argc+0x20>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @command_get_argc(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 32)
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %2, %1 ]
%6 = phi i32 [ %7, %4 ], [ 0, %1 ]
%7 = add nuw nsw i32 %6, 1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = tail call i8* @strchr(i8* dereferenceable(1) %8, i8 signext 32)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}