xunge/DecIR huggingface dataset:
const char *event_get_version(void) {
  return "4"
         "."
         "3";
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"4.3\00"
define i8* @event_get_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
void quadratic_prec_mask() {}


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

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

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

LLVM IR (-O2):
define void @quadratic_prec_mask() {
ret void
}
void dummy(void *fp, ...) {}


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

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

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

LLVM IR (-O2):
define void @dummy(i8* nocapture %0, ...) {
ret void
}
__attribute__((no, noclone)) unsigned __int128 t154_2sub(unsigned __int128 y) {
  unsigned __int128 x = (0);
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t154_2sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
setb   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    116e <t154_2sub+0x5e>
jmp    1175 <t154_2sub+0x65>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t154_2sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r14d,%r14d
neg    %rbx
sbb    %rsi,%r14
jae    1129 <t154_2sub+0x19>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t154_2sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 0, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t154_2sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 0, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
void ex_div_by_zero(struct int_regs *r) {
  print("\n!!!!!!!!!!!!!!!!!!!!!!!\n");
  print("PANIC: division by zero\n");
  print("!!!!!!!!!!!!!!!!!!!!!!!\n");
  dump_registers(r);
  for (;;)
    asm volatile("hlt");
}


x86 assembly (clang, -O0):
<ex_div_by_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <dump_registers@plt>
hlt
jmp    1161 <ex_div_by_zero+0x41>

x86 assembly (clang, -O2):
<ex_div_by_zero>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
lea    0xeba(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <dump_registers@plt>
nopl   0x0(%rax,%rax,1)
hlt
jmp    1160 <ex_div_by_zero+0x40>

LLVM IR (-O0):
%struct.int_regs = type opaque
@.str = [26 x i8] c"\0A!!!!!!!!!!!!!!!!!!!!!!!\0A\00"
@.str.1 = [25 x i8] c"PANIC: division by zero\0A\00"
@.str.2 = [25 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!\0A\00"
define void @ex_div_by_zero(%struct.int_regs* %0) {
%2 = alloca %struct.int_regs*
store %struct.int_regs* %0, %struct.int_regs** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%6 = load %struct.int_regs*, %struct.int_regs** %2
%7 = call i32 (%struct.int_regs*, ...) bitcast (i32 (...)* @dump_registers to i32 (%struct.int_regs*, ...)*)(%struct.int_regs* %6)
br label %8
8: ; preds = %8, %1
br label %8
}

LLVM IR (-O2):
%struct.int_regs = type opaque
@.str = [26 x i8] c"\0A!!!!!!!!!!!!!!!!!!!!!!!\0A\00"
@.str.1 = [25 x i8] c"PANIC: division by zero\0A\00"
@.str.2 = [25 x i8] c"!!!!!!!!!!!!!!!!!!!!!!!\0A\00"
define void @ex_div_by_zero(%struct.int_regs* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (%struct.int_regs*, ...) bitcast (i32 (...)* @dump_registers to i32 (%struct.int_regs*, ...)*)(%struct.int_regs* %0)
br label %6
6: ; preds = %6, %1
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %6
}
/* Variables and functions */
char *UTIL_mallocStr(size_t);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *OC_mkSome(char *info) {
  size_t length = strlen(info) + 10;
  char *rtptr = UTIL_mallocStr(length + 1);
  strcpy(rtptr, "(Some ");
  strcat(rtptr, info);
  strcat(rtptr, ")");
  return rtptr;
}


x86 assembly (clang, -O0):
<OC_mkSome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0xa,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OC_mkSome>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
movslq %eax,%rdi
add    $0xb,%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,%rbx
lea    0xe9e(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"(Some \00"
@.str.1 = [2 x i8] c")\00"
define i8* @OC_mkSome(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = add nsw i64 %3, 11
%5 = tail call i8* @UTIL_mallocStr(i64 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @strcat(i8* %5, i8* %0)
%8 = tail call i32 @strcat(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *mytime() {
  time_t t;
  char *s;
  t = time(NULL);
  s = ctime(&t);
  s[strlen(s) - 1] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<mytime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mytime>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mytime() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @mytime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8 0, i8* %8
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ MemCheck_off();
int /*<<< orphan*/ MemCheck_on();
scalar_t__ is_MemCheck_on();
int /*<<< orphan*/ *pop_info();
int CRYPTO_dbg_pop_info(void) {
  int ret = 0;
  if (is_MemCheck_on()) {
    MemCheck_off();
    ret = (pop_info() != NULL);
    MemCheck_on();
  }
  return (ret);
}


x86 assembly (clang, -O0):
<CRYPTO_dbg_pop_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <is_MemCheck_on@plt>
cmp    $0x0,%rax
je     1184 <CRYPTO_dbg_pop_info+0x44>
mov    $0x0,%al
call   1050 <MemCheck_off@plt>
mov    $0x0,%al
call   1030 <pop_info@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <MemCheck_on@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_dbg_pop_info>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <is_MemCheck_on@plt>
test   %rax,%rax
je     116c <CRYPTO_dbg_pop_info+0x2c>
xor    %eax,%eax
call   1050 <MemCheck_off@plt>
xor    %eax,%eax
call   1030 <pop_info@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
xor    %eax,%eax
call   1060 <MemCheck_on@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CRYPTO_dbg_pop_info() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @is_MemCheck_on()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 (...) @MemCheck_off()
%6 = call i32* (...) @pop_info()
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
store i32 %8, i32* %1
%9 = call i32 (...) @MemCheck_on()
br label %10
10: ; preds = %4, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @CRYPTO_dbg_pop_info() {
%1 = tail call i64 (...) @is_MemCheck_on()
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @MemCheck_off()
%5 = tail call i32* (...) @pop_info()
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = tail call i32 (...) @MemCheck_on()
br label %9
9: ; preds = %3, %0
%10 = phi i32 [ %7, %3 ], [ 0, %0 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
char *scanp(char *p) {
  while (isspace((unsigned char)*p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<scanp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <scanp+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <scanp+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanp>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <scanp+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @scanp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 zeroext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @scanp(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
debopn(s) char *s;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @debopn(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int errno;
void store_error(int err) { errno = err; }


x86 assembly (clang, -O0):
<store_error>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2ecf(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_error>:
mov    0x2ed9(%rip),%rax
mov    %edi,(%rax)
ret

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

LLVM IR (-O2):
@errno = global i32 0
define void @store_error(i32 %0) {
store i32 %0, i32* @errno
ret void
}
int fips_error(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fips_error() {
ret i32 0
}
float sqr(int x) { return x * x; }


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

x86 assembly (clang, -O2):
<sqr>:
imul   %edi,%edi
cvtsi2ss %edi,%xmm0
ret

LLVM IR (-O0):
define float @sqr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = sitofp i32 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @sqr(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = sitofp i32 %2 to float
ret float %3
}
char int_to_leds_m$leds$green_toggle(void) {
  char result;
  result = leds$leds$green_toggle();
  return result;
}


x86 assembly (clang, -O0):
<int_to_leds_m$leds$green_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <leds$leds$green_toggle@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_leds_m$leds$green_toggle>:
push   %rax
xor    %eax,%eax
call   1030 <leds$leds$green_toggle@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @"int_to_leds_m$leds$green_toggle"() {
%1 = alloca i8
%2 = call i32 (...) @"leds$leds$green_toggle"()
%3 = trunc i32 %2 to i8
store i8 %3, i8* %1
%4 = load i8, i8* %1
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @"int_to_leds_m$leds$green_toggle"() {
%1 = tail call i32 (...) @"leds$leds$green_toggle"()
%2 = trunc i32 %1 to i8
ret i8 %2
}
void ff_hevc_put_hevc_uni_epel_h32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h32_12_sse4() {
ret void
}
int foo2(unsigned a, unsigned b) { return (a > b); }


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
xor    %eax,%eax
cmp    %esi,%edi
seta   %al
ret

LLVM IR (-O0):
define i32 @foo2(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 = icmp ugt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @foo2(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_get_sample_format() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_get_sample_format"
         "\n");
}


x86 assembly (clang, -O0):
<pa_format_info_get_sample_format>:
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_format_info_get_sample_format>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [49 x i8] c"NOT IMPLEMENTED:pa_format_info_get_sample_format\00"
define i32 @pa_format_info_get_sample_format() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sushi2(int, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", sushi2(100, 6));
  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)
mov    $0x64,%edi
mov    $0x6,%esi
call   1030 <sushi2@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\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 = call i32 @sushi2(i32 100, i32 6)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sushi2(i32 100, i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
double strtod(char const *, char **);
double atof(const char *s) { return (strtod(s, (char **)0)); }


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

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

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

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i8** null)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float valor;
  scanf("%f", &valor);
  printf("%.2f\n", valor + (valor * 0.10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebc(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 1.000000e-01, double %5)
%9 = fptrunc double %8 to float
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.000000e-01, double %5)
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %7)
ret i32 0
}
void main(void) {
  int a = 0;
  a += 1;
  int b = 3;
  b = a + 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int /*<<< orphan*/ S_IRWXU;
int open(char const *, int, int /*<<< orphan*/);
int creat(const char *argpath, mode_t mode) {
  return open(argpath, O_CREAT | O_WRONLY | O_TRUNC, S_IRWXU);
}


x86 assembly (clang, -O0):
<creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    0x2e8d(%rip),%rax
or     (%rax),%esi
mov    0x2eb4(%rip),%rax
or     (%rax),%esi
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat>:
mov    0x2ee1(%rip),%rax
mov    0x2ea2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ec7(%rip),%rax
or     (%rax),%esi
mov    0x2ea6(%rip),%rax
mov    (%rax),%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
@S_IRWXU = global i32 0
define i32 @creat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_CREAT
%7 = load i32, i32* @O_WRONLY
%8 = or i32 %6, %7
%9 = load i32, i32* @O_TRUNC
%10 = or i32 %8, %9
%11 = load i32, i32* @S_IRWXU
%12 = call i32 @open(i8* %5, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_TRUNC = global i32 0
@S_IRWXU = global i32 0
define i32 @creat(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_WRONLY
%5 = or i32 %4, %3
%6 = load i32, i32* @O_TRUNC
%7 = or i32 %5, %6
%8 = load i32, i32* @S_IRWXU
%9 = tail call i32 @open(i8* %0, i32 %7, i32 %8)
ret i32 %9
}
/* Variables and functions */
int exponenciacao(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", exponenciacao(5, 3));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @exponenciacao(i32 5, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int main(void) {
  freopen("log.tmp", "a", stdout);
  printf("hello world.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
lea    0xec1(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1040 <freopen@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1040 <freopen@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"log.tmp\00"
@.str.1 = [2 x i8] c"a\00"
@stdout = global i32 0
@.str.2 = [14 x i8] c"hello world.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"log.tmp\00"
@.str.1 = [2 x i8] c"a\00"
@stdout = global i32 0
@str = [13 x i8] c"hello world.\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
int /*<<< orphan*/ padding(int);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
void vt52cup(int l, int c) {
  char temp[10];
  sprintf(temp, "Y%c%c", l + 31, c + 31);
  esc(temp);
  padding(5);
}


x86 assembly (clang, -O0):
<vt52cup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x4(%rbp),%edx
add    $0x1f,%edx
mov    -0x8(%rbp),%ecx
add    $0x1f,%ecx
lea    0xeab(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x12(%rbp),%rdi
call   1040 <esc@plt>
mov    $0x5,%edi
call   1030 <padding@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vt52cup>:
push   %rbx
sub    $0x10,%rsp
lea    0x1f(%rdi),%edx
lea    0x1f(%rsi),%ecx
lea    0xebe(%rip),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <esc@plt>
mov    $0x5,%edi
call   1030 <padding@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Y%c%c\00"
define void @vt52cup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [10 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 31
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 31
%11 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%13 = call i32 @esc(i8* %12)
%14 = call i32 @padding(i32 5)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Y%c%c\00"
define void @vt52cup(i32 %0, i32 %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = add nsw i32 %0, 31
%6 = add nsw i32 %1, 31
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 @esc(i8* %4)
%9 = call i32 @padding(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int _halt_error(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ sync();
int _halt(void) {
  sync();
  errno = ENOSYS;
  return _halt_error(NULL, 1);
  return 0;
}


x86 assembly (clang, -O0):
<_halt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <sync@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <_halt_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_halt>:
push   %rax
xor    %eax,%eax
call   1040 <sync@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    0x2ea0(%rip),%rcx
mov    %eax,(%rcx)
xor    %edi,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <_halt_error@plt>

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_halt() {
%1 = call i32 (...) @sync()
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
%3 = call i32 @_halt_error(i32* null, i32 1)
ret i32 %3
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_halt() {
%1 = tail call i32 (...) @sync()
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
%3 = tail call i32 @_halt_error(i32* null, i32 1)
ret i32 %3
}
void list_add_leaf_rt_rq(struct rt_rq *rt_rq) {}


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

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

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

LLVM IR (-O2):
%struct.rt_rq = type opaque
define void @list_add_leaf_rt_rq(%struct.rt_rq* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ Lcd_Out(int, int, char *);
int /*<<< orphan*/ UART1_Init(int);
int /*<<< orphan*/ delay_ms(int);
void Config_UART1(void) {
  UART1_Init(9600);
  Delay_ms(100);
  Lcd_Out(1, 1, "Inicia UART1");
  delay_ms(2000);
}


x86 assembly (clang, -O0):
<Config_UART1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2580,%edi
call   1040 <UART1_Init@plt>
mov    $0x64,%edi
call   1060 <Delay_ms@plt>
mov    $0x1,%esi
lea    0xe9c(%rip),%rdx
mov    %esi,%edi
call   1030 <Lcd_Out@plt>
mov    $0x7d0,%edi
call   1050 <delay_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Config_UART1>:
push   %rax
mov    $0x2580,%edi
call   1040 <UART1_Init@plt>
mov    $0x64,%edi
call   1060 <Delay_ms@plt>
lea    0xea4(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <Lcd_Out@plt>
mov    $0x7d0,%edi
pop    %rax
jmp    1050 <delay_ms@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Inicia UART1\00"
define void @Config_UART1() {
%1 = call i32 @UART1_Init(i32 9600)
%2 = call i32 @Delay_ms(i32 100)
%3 = call i32 @Lcd_Out(i32 1, i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @delay_ms(i32 2000)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Inicia UART1\00"
define void @Config_UART1() {
%1 = tail call i32 @UART1_Init(i32 9600)
%2 = tail call i32 @Delay_ms(i32 100)
%3 = tail call i32 @Lcd_Out(i32 1, i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @delay_ms(i32 2000)
ret void
}
/* Type definitions */
struct adc_sample_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WARN(int, char *);
int sci_adc_get_values(struct adc_sample_data *adc) {
  WARN(1, "Not implement\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<sci_adc_get_values>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
call   1030 <WARN@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.adc_sample_data = type { i32 }
@.str = [15 x i8] c"Not implement\0A\00"
define i32 @sci_adc_get_values(%struct.adc_sample_data* %0) {
%2 = alloca %struct.adc_sample_data*
store %struct.adc_sample_data* %0, %struct.adc_sample_data** %2
%3 = call i32 @WARN(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.adc_sample_data = type { i32 }
@.str = [15 x i8] c"Not implement\0A\00"
define i32 @sci_adc_get_values(%struct.adc_sample_data* nocapture readnone %0) {
%2 = tail call i32 @WARN(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *strstr(char *, char *);
int _strpos(char *haystack, char *needle) {
  char *p = strstr(haystack, needle);
  if (p) {
    return p - haystack;
  }
  return -1;
}


x86 assembly (clang, -O0):
<_strpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114f <_strpos+0x3f>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    1156 <_strpos+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strpos>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @_strpos(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = select i1 %4, i32 -1, i32 %8
ret i32 %9
}
/* Type definitions */
struct fsobject {
  int dummy;
};

/* Variables and functions */
struct fsobject *findsub(struct fsobject *, int /*<<< orphan*/, unsigned int);
struct fsobject *findfile_maybe(struct fsobject *rootdir, unsigned id) {
  return findsub(rootdir, 0, id);
}


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

x86 assembly (clang, -O2):
<findfile_maybe>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <findsub@plt>

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

LLVM IR (-O2):
%struct.fsobject = type { i32 }
define %struct.fsobject* @findfile_maybe(%struct.fsobject* %0, i32 %1) {
%3 = tail call %struct.fsobject* @findsub(%struct.fsobject* %0, i32 0, i32 %1)
ret %struct.fsobject* %3
}
unsigned io_tty_rows(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @io_tty_rows() {
ret i32 0
}
/* Type definitions */
struct TLVs {
  int dummy;
};

/* Variables and functions */
int add_next_param(struct TLVs *, int, int /*<<< orphan*/, float *);
int /*<<< orphan*/ get_type_length(int);
int add_next_float32(struct TLVs *params, float next_value) {
  return add_next_param(params, 2, get_type_length(2), &next_value);
}


x86 assembly (clang, -O0):
<add_next_float32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x2,%edi
call   1030 <get_type_length@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    $0x2,%esi
lea    -0xc(%rbp),%rcx
call   1040 <add_next_param@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_next_float32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movss  %xmm0,0xc(%rsp)
mov    $0x2,%edi
call   1030 <get_type_length@plt>
lea    0xc(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %eax,%edx
call   1040 <add_next_param@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TLVs = type { i32 }
define i32 @add_next_float32(%struct.TLVs* %0, float %1) {
%3 = alloca %struct.TLVs*
%4 = alloca float
store %struct.TLVs* %0, %struct.TLVs** %3
store float %1, float* %4
%5 = load %struct.TLVs*, %struct.TLVs** %3
%6 = call i32 @get_type_length(i32 2)
%7 = call i32 @add_next_param(%struct.TLVs* %5, i32 2, i32 %6, float* %4)
ret i32 %7
}

LLVM IR (-O2):
%struct.TLVs = type { i32 }
define i32 @add_next_float32(%struct.TLVs* %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = tail call i32 @get_type_length(i32 2)
%5 = call i32 @add_next_param(%struct.TLVs* %0, i32 2, i32 %4, float* %3)
ret i32 %5
}
void gdk_device_set_mode() {}


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

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

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

LLVM IR (-O2):
define void @gdk_device_set_mode() {
ret void
}
unsigned xrop3_84_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_84_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_84_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
shl    $0x8,%esi
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_84_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = xor i32 %30, -1
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = xor i32 %33, -1
%35 = and i32 %32, %34
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = and i32 %36, %37
%39 = or i32 %35, %38
ret i32 %39
}

LLVM IR (-O2):
define i32 @xrop3_84_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ is_ascii(char);
bool is_fill(char c) {
  unsigned char uc = c;
  return (!is_ascii(c) && uc <= 0xBF);
}


x86 assembly (clang, -O0):
<is_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_ascii@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x3(%rbp)
jne    114c <is_fill+0x3c>
movzbl -0x2(%rbp),%eax
cmp    $0xbf,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_fill>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_ascii@plt>
test   %eax,%eax
sete   %al
cmp    $0xc0,%bl
setb   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_fill(i8 signext %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* %2
%6 = call i32 @is_ascii(i8 signext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp sle i32 %10, 191
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_fill(i8 signext %0) {
%2 = tail call i32 @is_ascii(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = icmp ult i8 %0, -64
%5 = and i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
double degrees_to_radians(double degrees) {
  return degrees * (3.14159265) / 180.0;
}


x86 assembly (clang, -O0):
<degrees_to_radians>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<degrees_to_radians>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @degrees_to_radians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x400921FB53C8D4F1
%5 = fdiv double %4, 1.800000e+02
ret double %5
}

LLVM IR (-O2):
define double @degrees_to_radians(double %0) {
%2 = fmul double %0, 0x400921FB53C8D4F1
%3 = fdiv double %2, 1.800000e+02
ret double %3
}
/* Variables and functions */
int arg_array(int, int *);
int use_arg_array(int i, int j[20]) { return arg_array(i, j); }


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

x86 assembly (clang, -O2):
<use_arg_array>:
jmp    1030 <arg_array@plt>

LLVM IR (-O0):
define i32 @use_arg_array(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 @arg_array(i32 %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @use_arg_array(i32 %0, i32* %1) {
%3 = tail call i32 @arg_array(i32 %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ board_led_1_set(int);
int /*<<< orphan*/ board_led_2_set(int);
int /*<<< orphan*/ iprintf(char *);
int /*<<< orphan*/ u_pass();
void main(void) {
  board_led_1_set(1);
  iprintf("Hello World!");
  board_led_2_set(1);
  u_pass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <board_led_1_set@plt>
lea    0xeab(%rip),%rdi
call   1060 <iprintf@plt>
mov    $0x1,%edi
call   1050 <board_led_2_set@plt>
mov    $0x0,%al
call   1030 <u_pass@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <board_led_1_set@plt>
lea    0xeae(%rip),%rdi
call   1060 <iprintf@plt>
mov    $0x1,%edi
call   1050 <board_led_2_set@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <u_pass@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define void @main() {
%1 = call i32 @board_led_1_set(i32 1)
%2 = call i32 @iprintf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @board_led_2_set(i32 1)
%4 = call i32 (...) @u_pass()
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define void @main() {
%1 = tail call i32 @board_led_1_set(i32 1)
%2 = tail call i32 @iprintf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @board_led_2_set(i32 1)
%4 = tail call i32 (...) @u_pass()
ret void
}