xunge/DecIR huggingface dataset:
/* Variables and functions */
int getLength(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i = getLength(argv[1]);
  printf("La cadena tiene %d caracteres.\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <getLength@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"La cadena tiene %d caracteres.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @getLength(i8* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"La cadena tiene %d caracteres.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @getLength(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int yogrt_get_fudge_factor();
int iyogrt_get_fudge_factor_(void) { return yogrt_get_fudge_factor(); }


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

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

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

LLVM IR (-O2):
define i32 @iyogrt_get_fudge_factor_() {
%1 = tail call i32 (...) @yogrt_get_fudge_factor()
ret i32 %1
}
/* Variables and functions */
scalar_t__ safe_malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *itostr(int i) {
  char *str = (char *)safe_malloc(2 * sizeof(int));
  sprintf(str, "%d", i);
  return str;
}


x86 assembly (clang, -O0):
<itostr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <safe_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itostr>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x8,%edi
call   1030 <safe_malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @itostr(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @safe_malloc(i32 8)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @itostr(i32 %0) {
%2 = tail call i64 @safe_malloc(i32 8)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %3
}
int setToStationary() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setToStationary() {
ret i32 0
}
float f_f_test(float data) {
  printf("Entered %s:\n", __FUNCTION__);
  printf("Data In: %e\n", data);
  printf("Exited  %s:\n", __FUNCTION__);
  return data;
}


x86 assembly (clang, -O0):
<f_f_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    0xedc(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_f_test>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
lea    0xede(%rip),%rdi
lea    0xee4(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Entered %s:\0A\00"
@__FUNCTION__.f_f_test = [9 x i8] c"f_f_test\00"
@.str.1 = [13 x i8] c"Data In: %e\0A\00"
@.str.2 = [13 x i8] c"Exited %s:\0A\00"
define float @f_f_test(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.f_f_test, i64 0, i64 0))
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.f_f_test, i64 0, i64 0))
%8 = load float, float* %2
ret float %8
}

LLVM IR (-O2):
@.str = [13 x i8] c"Entered %s:\0A\00"
@__FUNCTION__.f_f_test = [9 x i8] c"f_f_test\00"
@.str.1 = [13 x i8] c"Data In: %e\0A\00"
@.str.2 = [13 x i8] c"Exited %s:\0A\00"
define float @f_f_test(float returned %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.f_f_test, i64 0, i64 0))
%3 = fpext float %0 to double
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.f_f_test, i64 0, i64 0))
ret float %0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SHA2SetMessageLength(uint32_t length) {
  (*((volatile unsigned long *)(0x40024000 + 0x00000688))) = length;
}


x86 assembly (clang, -O0):
<SHA2SetMessageLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x40024688,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA2SetMessageLength>:
mov    %rdi,0x40024688
40
ret

LLVM IR (-O0):
define void @SHA2SetMessageLength(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1073890952 to i64*)
ret void
}

LLVM IR (-O2):
define void @SHA2SetMessageLength(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1073890952 to i64*)
ret void
}
/* Variables and functions */
float sin(float);
float futhark_sin32(float x) { return sin(x); }


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

x86 assembly (clang, -O2):
<futhark_sin32>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define float @futhark_sin32(float %0) {
%2 = tail call float @sin(float %0)
ret float %2
}
/* Variables and functions */
scalar_t__ round(double);
long lround(double x) { return (long)round(x); }


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

x86 assembly (clang, -O2):
<lround>:
jmp    1030 <round@plt>

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

LLVM IR (-O2):
define i64 @lround(double %0) {
%2 = tail call i64 @round(double %0)
ret i64 %2
}
int AppedEndOFCode(char *pOutBuf, int nLen) {
  if (nLen < 4)
    return 0;
  *pOutBuf++ = 0x00;
  *pOutBuf++ = 0x00;
  *pOutBuf++ = 0x01;
  *pOutBuf++ = 0xB9;
  return 4;
}


x86 assembly (clang, -O0):
<AppedEndOFCode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1121 <AppedEndOFCode+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1170 <AppedEndOFCode+0x70>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x1,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0xb9,(%rax)
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AppedEndOFCode>:
xor    %eax,%eax
cmp    $0x4,%esi
jl     1112 <AppedEndOFCode+0x12>
movl   $0xb9010000,(%rdi)
mov    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @AppedEndOFCode(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp slt i32 %1, 4
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 2
store i8 0, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 3
store i8 1, i8* %6
store i8 -71, i8* %7
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 4, %4 ], [ 0, %2 ]
ret i32 %9
}
h() {
  typedef int t;
  {
    int t;
    t = 2;
    return t;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @h() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_ocaml_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("ocaml", " (*comment*)"),
                            "comment", "(*comment*)");
}


x86 assembly (clang, -O0):
<test_ocaml_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xed3(%rip),%rsi
lea    0xec0(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ocaml_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xed8(%rip),%rsi
lea    0xec5(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ocaml\00"
@.str.1 = [13 x i8] c" (*comment*)\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [12 x i8] c"(*comment*)\00"
define void @test_ocaml_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ocaml\00"
@.str.1 = [13 x i8] c" (*comment*)\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [12 x i8] c"(*comment*)\00"
define void @test_ocaml_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmem(char *, int, char *, int);
int main(void) {
  memmem("blah", 4, "la", 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
lea    0xed3(%rip),%rdx
mov    $0x2,%ecx
call   1030 <memmem@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rdx
mov    $0x4,%esi
mov    $0x2,%ecx
call   1030 <memmem@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"blah\00"
@.str.1 = [3 x i8] c"la\00"
define i32 @main() {
%1 = tail call i32 @memmem(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
long long llround(long double);
long long llroundl(long double a1) { return llround(a1); }


x86 assembly (clang, -O0):
<llroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <llround@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llroundl>:
jmp    1030 <llround@plt>

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

LLVM IR (-O2):
define i64 @llroundl(x86_fp80 %0) {
%2 = tail call i64 @llround(x86_fp80 %0)
ret i64 %2
}
int socket(int domain, int type, int protocol) {
  ;
  return -1;
}


x86 assembly (clang, -O0):
<socket>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @socket(i32 %0, i32 %1, i32 %2) {
ret i32 -1
}
void task_register_tracedump(void) {}


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

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

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

LLVM IR (-O2):
define void @task_register_tracedump() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char const *, int /*<<< orphan*/);
int read_bool(int);
int read_bool_prop(const char *filename_value) {
  int fd;
  int value;
  fd = open(filename_value, O_RDONLY);
  value = read_bool(fd);
  close(fd);
  return value;
}


x86 assembly (clang, -O0):
<read_bool_prop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <read_bool@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bool_prop>:
push   %rbp
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <read_bool@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <close@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @read_bool_prop(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i32, i32* @O_RDONLY
%7 = call i32 @open(i8* %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @read_bool(i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @read_bool_prop(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = tail call i32 @read_bool(i32 %3)
%5 = tail call i32 @close(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ factorial(long long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long num;
  printf("Introduzca el número al que le quiere sacar factorial: \n", &num);
  scanf("%lld", &num);
  printf("El factorial de %lld es %lld.\n", num, factorial(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <factorial@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <factorial@plt>
lea    0xe8f(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [58 x i8] c"Introduzca el n\C3\BAmero al que le quiere sacar factorial: \0A\00"
@.str.1 = [5 x i8] c"%lld\00"
@.str.2 = [31 x i8] c"El factorial de %lld es %lld.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64* %2)
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%5 = load i64, i64* %2
%6 = load i64, i64* %2
%7 = call i32 @factorial(i64 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i64 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%lld\00"
@.str.2 = [31 x i8] c"El factorial de %lld es %lld.\0A\00"
@str = [57 x i8] c"Introduzca el n\C3\BAmero al que le quiere sacar factorial: \00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @factorial(i64 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i64 %5, i32 %6)
ret i32 0
}
int b(int i) { return 42 - i; }


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

x86 assembly (clang, -O2):
<b>:
mov    $0x2a,%eax
sub    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @b(i32 %0) {
%2 = sub nsw i32 42, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
int Section1(int number) {
  printf("\n1.- | %d | %d | %d | %d |", number / 1000, number % 1000 / 100,
         number % 100 / 10, number % 10);
  return 0;
}


x86 assembly (clang, -O0):
<Section1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
mov    $0xa,%edi
cltd
idiv   %edi
mov    %edx,%r8d
mov    -0x8(%rbp),%edx
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section1>:
push   %rax
movslq %edi,%r8
imul   $0x10624dd3,%r8,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x26,%rsi
add    %eax,%esi
imul   $0x3e8,%esi,%eax
mov    %r8d,%ecx
sub    %eax,%ecx
movswl %cx,%eax
imul   $0x147b,%eax,%edx
mov    %edx,%eax
shr    $0x1f,%eax
sar    $0x13,%edx
add    %eax,%edx
imul   $0x51eb851f,%r8,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
mov    %r8d,%ecx
sub    %eax,%ecx
movsbl %cl,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0xa,%ecx
add    %al,%cl
movsbl %cl,%ecx
imul   $0x66666667,%r8,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rax
add    %edi,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%r8d
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0A1.- | %d | %d | %d | %d |\00"
define i32 @Section1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 1000
%5 = load i32, i32* %2
%6 = srem i32 %5, 1000
%7 = sdiv i32 %6, 100
%8 = load i32, i32* %2
%9 = srem i32 %8, 100
%10 = sdiv i32 %9, 10
%11 = load i32, i32* %2
%12 = srem i32 %11, 10
%13 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %7, i32 %10, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A1.- | %d | %d | %d | %d |\00"
define i32 @Section1(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = srem i32 %0, 1000
%4 = trunc i32 %3 to i16
%5 = sdiv i16 %4, 100
%6 = sext i16 %5 to i32
%7 = srem i32 %0, 100
%8 = trunc i32 %7 to i8
%9 = sdiv i8 %8, 10
%10 = sext i8 %9 to i32
%11 = srem i32 %0, 10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %6, i32 %10, i32 %11)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int sigsuspend(int /*<<< orphan*/ *);
int pause(void) {
  sigset_t set;
  sigemptyset(&set);
  sigprocmask(SIG_BLOCK, NULL, &set);
  return sigsuspend(&set);
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
lea    -0x4(%rbp),%rdx
call   1030 <sigprocmask@plt>
lea    -0x4(%rbp),%rdi
call   1050 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <sigprocmask@plt>
mov    %rbx,%rdi
call   1050 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIG_BLOCK = global i32 0
define i32 @pause() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIG_BLOCK
%4 = call i32 @sigprocmask(i32 %3, i32* null, i32* %1)
%5 = call i32 @sigsuspend(i32* %1)
ret i32 %5
}

LLVM IR (-O2):
@SIG_BLOCK = global i32 0
define i32 @pause() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIG_BLOCK
%5 = call i32 @sigprocmask(i32 %4, i32* null, i32* %1)
%6 = call i32 @sigsuspend(i32* %1)
ret i32 %6
}
unsigned rightmost_one(unsigned x) { return (x & -x); }


x86 assembly (clang, -O0):
<rightmost_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @rightmost_one(i32 %0) {
%2 = sub i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
const char *basename(const char *name) {
  const char *r = name, *p = name;
  while (*p)
    if (*p++ == '/')
      r = p;
  return r;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <basename+0x4d>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1148 <basename+0x48>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <basename+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     1122 <basename+0x22>
lea    0x1(%rax),%rdx
nopl   (%rax)
cmp    $0x2f,%cl
cmove  %rdx,%rax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <basename+0x10>
ret

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = icmp eq i8 %5, 47
%10 = select i1 %9, i8* %8, i8* %7
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i8* [ %0, %1 ], [ %10, %4 ]
ret i8* %14
}
double julian_ephemeris_century(double jde) {
  return (jde - 2451545.0) / 36525.0;
}


x86 assembly (clang, -O0):
<julian_ephemeris_century>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @julian_ephemeris_century(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0x4142B42C80000000
%5 = fdiv double %4, 3.652500e+04
ret double %5
}

LLVM IR (-O2):
define double @julian_ephemeris_century(double %0) {
%2 = fadd double %0, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
ret double %3
}
int main() {
  char x[3];
  char y[3];
  x[(sizeof x)] = 'i';
  y[((sizeof y) - 1)] = '0';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x69,-0x4(%rbp)
movb   $0x30,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8]
%3 = alloca [3 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 3
store i8 105, i8* %4
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 48, i8* %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
float log2(float);
float max(double, float const);
float R2_logDepthEncodeFull(const float z, const float depth_coefficient) {
  float half_co = depth_coefficient * 0.5;
  float clamp_z = max(0.000001, z + 1.0);
  return log2(clamp_z) * half_co;
}


x86 assembly (clang, -O0):
<R2_logDepthEncodeFull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea7(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movsd  0xe8f(%rip),%xmm0
call   1040 <max@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <log2@plt>
mulss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R2_logDepthEncodeFull>:
push   %rax
movaps %xmm0,%xmm2
mulss  0xed4(%rip),%xmm1
movss  %xmm1,0x4(%rsp)
addss  0xeca(%rip),%xmm2
movsd  0xec6(%rip),%xmm0
movaps %xmm2,%xmm1
call   1040 <max@plt>
call   1030 <log2@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @R2_logDepthEncodeFull(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store float %1, float* %4
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fmul double %8, 5.000000e-01
%10 = fptrunc double %9 to float
store float %10, float* %5
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = fadd double %12, 1.000000e+00
%14 = fptrunc double %13 to float
%15 = call float @max(double 0x3EB0C6F7A0B5ED8D, float %14)
store float %15, float* %6
%16 = load float, float* %6
%17 = call float @log2(float %16)
%18 = load float, float* %5
%19 = fmul float %17, %18
ret float %19
}

LLVM IR (-O2):
define float @R2_logDepthEncodeFull(float %0, float %1) {
%3 = fmul float %1, 5.000000e-01
%4 = fadd float %0, 1.000000e+00
%5 = tail call float @max(double 0x3EB0C6F7A0B5ED8D, float %4)
%6 = tail call float @log2(float %5)
%7 = fmul float %3, %6
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t get_8(const uint8_t *p) { return *p; }


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

x86 assembly (clang, -O2):
<get_8>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_8(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_d2i_fp(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ **);
int /*<<< orphan*/ PKCS7_it;
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7) {
  return ASN1_item_d2i_fp(&PKCS7_it, fp, p7);
}


x86 assembly (clang, -O0):
<d2i_PKCS7_fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    0x2eb1(%rip),%rdi
call   1030 <ASN1_item_d2i_fp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_PKCS7_fp>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
jmp    1030 <ASN1_item_d2i_fp@plt>

LLVM IR (-O0):
@PKCS7_it = global i32 0
define i32* @d2i_PKCS7_fp(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* @ASN1_item_d2i_fp(i32* @PKCS7_it, i32* %5, i32** %6)
ret i32* %7
}

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32* @d2i_PKCS7_fp(i32* %0, i32** %1) {
%3 = tail call i32* @ASN1_item_d2i_fp(i32* @PKCS7_it, i32* %0, i32** %1)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ printCombi(int *, int, int);
void startCombi(int list[], int size) {
  int i;
  for (i = size; i > 0; i--) {
    printCombi(list, size, i);
  }
}


x86 assembly (clang, -O0):
<startCombi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    114c <startCombi+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <printCombi@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1125 <startCombi+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startCombi>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1136 <startCombi+0x26>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printCombi@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
ja     1120 <startCombi+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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


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

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

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

LLVM IR (-O2):
define void @strncpy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enter(char *);
int /*<<< orphan*/ error(int);
int /*<<< orphan*/ out();
char symbol();
pplus() {
  enter("pplus");
  if (symbol() != '+')
    error(4);
  out();
}


x86 assembly (clang, -O0):
<pplus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <enter@plt>
mov    $0x0,%al
call   1060 <symbol@plt>
movsbl %al,%eax
cmp    $0x2b,%eax
je     1171 <pplus+0x31>
mov    $0x4,%edi
call   1040 <error@plt>
mov    $0x0,%al
call   1050 <out@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pplus>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <enter@plt>
xor    %eax,%eax
call   1060 <symbol@plt>
cmp    $0x2b,%al
je     1162 <pplus+0x22>
mov    $0x4,%edi
call   1040 <error@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <out@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"pplus\00"
define i32 @pplus() {
%1 = alloca i32
%2 = call i32 @enter(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @symbol()
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 43
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @error(i32 4)
br label %8
8: ; preds = %6, %0
%9 = call i32 (...) @out()
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"pplus\00"
define i32 @pplus() {
%1 = tail call i32 @enter(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @symbol()
%3 = icmp eq i8 %2, 43
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @error(i32 4)
br label %6
6: ; preds = %4, %0
%7 = tail call i32 (...) @out()
ret i32 undef
}
/* Variables and functions */
int _U_Qfcnvfxt_quad_to_sgl(long double);
int __U_Qfcnvfxt_quad_to_sgl(long double a) {
  return _U_Qfcnvfxt_quad_to_sgl(a) >> 32;
}


x86 assembly (clang, -O0):
<__U_Qfcnvfxt_quad_to_sgl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <_U_Qfcnvfxt_quad_to_sgl@plt>
mov    $0x20,%ecx
sar    %cl,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__U_Qfcnvfxt_quad_to_sgl>:
jmp    1030 <_U_Qfcnvfxt_quad_to_sgl@plt>

LLVM IR (-O0):
define i32 @__U_Qfcnvfxt_quad_to_sgl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @_U_Qfcnvfxt_quad_to_sgl(x86_fp80 %3)
%5 = ashr i32 %4, 32
ret i32 %5
}

LLVM IR (-O2):
define i32 @__U_Qfcnvfxt_quad_to_sgl(x86_fp80 %0) {
%2 = tail call i32 @_U_Qfcnvfxt_quad_to_sgl(x86_fp80 %0)
ret i32 poison
}
long labs(j)
long j;
{ return (j < 0 ? -j : j); }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
char MatchChr(char c) {
  return ((c >= 'a' && c <= 'z') ? c - 'a' + 'A' : (c == '.' ? '-' : c));
}


x86 assembly (clang, -O0):
<MatchChr>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <MatchChr+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <MatchChr+0x36>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    115d <MatchChr+0x5d>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
jne    1150 <MatchChr+0x50>
mov    $0x2d,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <MatchChr+0x57>
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MatchChr>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x2e,%dil
mov    $0x2d,%edx
cmovne %edi,%edx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @MatchChr(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 97
%14 = add nsw i32 %13, 65
br label %25
15: ; preds = %6, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 46
br i1 %18, label %19, label %20
19: ; preds = %15
br label %23
20: ; preds = %15
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
br label %23
23: ; preds = %20, %19
%24 = phi i32 [ 45, %19 ], [ %22, %20 ]
br label %25
25: ; preds = %23, %10
%26 = phi i32 [ %14, %10 ], [ %24, %23 ]
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define signext i8 @MatchChr(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = icmp eq i8 %0, 46
%6 = select i1 %5, i8 45, i8 %0
%7 = select i1 %3, i8 %4, i8 %6
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void tty_navigation_save_pos_native(void) { write(1, "[s", 3); }


x86 assembly (clang, -O0):
<tty_navigation_save_pos_native>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_navigation_save_pos_native>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x3,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[s\00"
define void @tty_navigation_save_pos_native() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[s\00"
define void @tty_navigation_save_pos_native() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int getchar();
void test_getchar() {
  int x = getchar();
  if (x == -1)
    return;
  clang_analyzer_eval(x < 0);
  clang_analyzer_eval(x < 256);
}


x86 assembly (clang, -O0):
<test_getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1141 <test_getchar+0x21>
jmp    1166 <test_getchar+0x46>
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
cmpl   $0x100,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_getchar>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xffffffff,%eax
je     114b <test_getchar+0x2b>
mov    %eax,%ebx
mov    %eax,%edi
shr    $0x1f,%edi
call   1040 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x100,%ebx
setl   %dil
pop    %rbx
jmp    1040 <clang_analyzer_eval@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @test_getchar() {
%1 = alloca i32
%2 = call i32 (...) @getchar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %6
5: ; preds = %0
br label %15
6: ; preds = %0
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 256
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
br label %15
15: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @test_getchar() {
%1 = tail call i32 (...) @getchar()
%2 = icmp eq i32 %1, -1
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = lshr i32 %1, 31
%5 = tail call i32 @clang_analyzer_eval(i32 %4)
%6 = icmp slt i32 %1, 256
%7 = zext i1 %6 to i32
%8 = tail call i32 @clang_analyzer_eval(i32 %7)
br label %9
9: ; preds = %0, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b, sum;
  scanf("%d%d", &a, &b);
  sum = a + b;
  printf("%d", sum);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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