xunge/DecIR huggingface dataset:
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
scalar_t__ should_keep_alive(struct mg_connection const *);
const char *suggest_connection_header(const struct mg_connection *conn) {
  return should_keep_alive(conn) ? "keep-alive" : "close";
}


x86 assembly (clang, -O0):
<suggest_connection_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <should_keep_alive@plt>
mov    %rax,%rdx
lea    0xedc(%rip),%rax
lea    0xeca(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suggest_connection_header>:
push   %rax
call   1030 <should_keep_alive@plt>
test   %rax,%rax
lea    0xeeb(%rip),%rcx
lea    0xed9(%rip),%rax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
@.str = [11 x i8] c"keep-alive\00"
@.str.1 = [6 x i8] c"close\00"
define i8* @suggest_connection_header(%struct.mg_connection* %0) {
%2 = alloca %struct.mg_connection*
store %struct.mg_connection* %0, %struct.mg_connection** %2
%3 = load %struct.mg_connection*, %struct.mg_connection** %2
%4 = call i64 @should_keep_alive(%struct.mg_connection* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %7
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
@.str = [11 x i8] c"keep-alive\00"
@.str.1 = [6 x i8] c"close\00"
define i8* @suggest_connection_header(%struct.mg_connection* %0) {
%2 = tail call i64 @should_keep_alive(%struct.mg_connection* %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
float euclidean_distance_square(float const *, float const *, int);
float sqrt(float);
float euclidean_distance(const float *a1, const float *a2, int length) {
  float d = euclidean_distance_square(a1, a2, length);
  d = sqrt(d);
  return d;
}


x86 assembly (clang, -O0):
<euclidean_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <euclidean_distance_square@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euclidean_distance>:
push   %rax
call   1030 <euclidean_distance_square@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1134 <euclidean_distance+0x14>
sqrtss %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @euclidean_distance(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
%7 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%8 = load float*, float** %4
%9 = load float*, float** %5
%10 = load i32, i32* %6
%11 = call float @euclidean_distance_square(float* %8, float* %9, i32 %10)
store float %11, float* %7
%12 = load float, float* %7
%13 = call float @sqrt(float %12)
store float %13, float* %7
%14 = load float, float* %7
ret float %14
}

LLVM IR (-O2):
define float @euclidean_distance(float* %0, float* %1, i32 %2) {
%4 = tail call float @euclidean_distance_square(float* %0, float* %1, i32 %2)
%5 = tail call float @sqrt(float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ __mf_set_options(char *);
scalar_t__ malloc(int);
int main() {
  char *foo;
  __mf_set_options("-check-initialization");
  foo = (char *)malloc(1);
  foo[0] &= 0xfe;
  foo[0] |= 0x01;
  return foo[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <__mf_set_options@plt>
mov    $0x1,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
and    $0xfe,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
or     $0x1,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <__mf_set_options@plt>
mov    $0x1,%edi
call   1030 <malloc@plt>
movsbl (%rax),%ecx
or     $0x1,%ecx
mov    %cl,(%rax)
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"-check-initialization\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @__mf_set_options(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @malloc(i32 1)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = and i32 %9, 254
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = or i32 %15, 1
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
@.str = [22 x i8] c"-check-initialization\00"
define i32 @main() {
%1 = tail call i32 @__mf_set_options(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @malloc(i32 1)
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %3
%5 = or i8 %4, 1
store i8 %5, i8* %3
%6 = sext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ funcReverseL(unsigned char *, unsigned char *);
int /*<<< orphan*/ funcReverseS(unsigned char *, unsigned char *);
int /*<<< orphan*/ funcX(unsigned char *, unsigned char *, unsigned char *);
void funcReverseLSX(unsigned char *a, unsigned char *b,
                    unsigned char *outdata) {
  unsigned char temp1[16] = {0};
  unsigned char temp2[16] = {0};
  funcX(a, b, temp1);
  funcReverseL(temp1, temp2);
  funcReverseS(temp2, outdata);
}


x86 assembly (clang, -O0):
<funcReverseLSX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1060 <funcX@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <funcReverseL@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <funcReverseS@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcReverseLSX>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r15
mov    %r15,%rdx
call   1050 <funcX@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <funcReverseL@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <funcReverseS@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @funcReverseLSX(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [16 x i8]
%8 = alloca [16 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = bitcast [16 x i8]* %7 to i8*
%10 = bitcast [16 x i8]* %8 to i8*
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%14 = call i32 @funcX(i8* %11, i8* %12, i8* %13)
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%17 = call i32 @funcReverseL(i8* %15, i8* %16)
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%19 = load i8*, i8** %6
%20 = call i32 @funcReverseS(i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
define void @funcReverseLSX(i8* %0, i8* %1, i8* %2) {
%4 = alloca [16 x i8]
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%8 = call i32 @funcX(i8* %0, i8* %1, i8* %6)
%9 = call i32 @funcReverseL(i8* %6, i8* %7)
%10 = call i32 @funcReverseS(i8* %7, i8* %2)
ret void
}
void __attribute__((
    __warning__("curl_easy_setopt expects a "
                "curl_resolver_start_callback argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_resolver_start_callback(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_resolver_start_callback() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int do_919() { return 919; }


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

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

LLVM IR (-O0):
define i32 @do_919() {
ret i32 919
}

LLVM IR (-O2):
define i32 @do_919() {
ret i32 919
}
void inclass_element2hex() {}


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

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

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

LLVM IR (-O2):
define void @inclass_element2hex() {
ret void
}
int raise(int signo) { __builtin_trap(); }


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

x86 assembly (clang, -O2):
<raise>:
ud2

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

LLVM IR (-O2):
define i32 @raise(i32 %0) {
tail call void @llvm.trap()
unreachable
}
void FDC_SetDataRegister(unsigned char Data) {}


x86 assembly (clang, -O0):
<FDC_SetDataRegister>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @FDC_SetDataRegister(i8 zeroext %0) {
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
struct slName {
  int dummy;
};

/* Variables and functions */
struct slName *extNamesForId(struct sqlConnection *, int, char *);
struct slName *visiGeneUniProt(struct sqlConnection *conn, int id) {
  return extNamesForId(conn, id, "uniProt");
}


x86 assembly (clang, -O0):
<visiGeneUniProt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <extNamesForId@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneUniProt>:
lea    0xee9(%rip),%rdx
jmp    1030 <extNamesForId@plt>

LLVM IR (-O0):
%struct.slName = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"uniProt\00"
define %struct.slName* @visiGeneUniProt(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call %struct.slName* @extNamesForId(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.slName* %7
}

LLVM IR (-O2):
%struct.slName = type { i32 }
%struct.sqlConnection = type { i32 }
@.str = [8 x i8] c"uniProt\00"
define %struct.slName* @visiGeneUniProt(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call %struct.slName* @extNamesForId(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret %struct.slName* %3
}
int dwc3_otg_init(struct dwc3 *dwc) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.dwc3 = type opaque
define i32 @dwc3_otg_init(%struct.dwc3* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bad(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "Usage: overflow <word>\n");
    return 1;
  }
  bad(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1175 <main+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <bad@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Usage: overflow <word>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @bad(i8* %9)
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %12
}
/* Variables and functions */
int round(float num) {
  if (num - (int)num > 0.5)
    return ((int)num + 1);
  else
    return ((int)num);
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvttss2si -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1141 <round+0x41>
cvttss2si -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <round+0x49>
cvttss2si -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
cvttss2si %xmm0,%ecx
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
xor    %eax,%eax
ucomiss 0xee8(%rip),%xmm0
seta   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @round(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = load float, float* %3
%6 = fptosi float %5 to i32
%7 = sitofp i32 %6 to float
%8 = fsub float %4, %7
%9 = fpext float %8 to double
%10 = fcmp ogt double %9, 5.000000e-01
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load float, float* %3
%13 = fptosi float %12 to i32
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %18
15: ; preds = %1
%16 = load float, float* %3
%17 = fptosi float %16 to i32
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @round(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
%5 = fcmp ogt float %4, 5.000000e-01
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int stat(const char *file, struct stat *pstat) {
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stat = type { i32 }
@EACCES = global i32 0
@errno = global i32 0
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @EACCES
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@EACCES = global i32 0
@errno = global i32 0
define i32 @stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
%3 = load i32, i32* @EACCES
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_8_be(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_uint64_be(uint8_t *dst, uint32_t offs,
                                    const uint64_t *src) {
  uint8_t tmp[8] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_8_be(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_uint64_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x40(%rbp),%rsi
call   1040 <ivory_serialize_pack_prim_8_be@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_uint64_be>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x20,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1030 <ivory_serialize_pack_prim_8_be@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_uint64_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [8 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [8 x i32]* %7 to i8*
%9 = bitcast [8 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 32)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_8_be(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_uint64_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca [8 x i32]
%5 = bitcast [8 x i32]* %4 to i8*
%6 = bitcast [8 x i32]* %4 to i32**
%7 = call i32 @memcpy(i32** %6, i32* %2, i32 32)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%11 = call i32 @ivory_serialize_pack_prim_8_be(i32* %9, i32* %10)
ret void
}
double binderparam(double *v) { return 0.5 * (3.0 - v[0] / (v[1] * v[1])); }


x86 assembly (clang, -O0):
<binderparam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<binderparam>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  0xee7(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  0xee3(%rip),%xmm0
ret

LLVM IR (-O0):
define double @binderparam(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = fmul double %8, %11
%13 = fdiv double %5, %12
%14 = fsub double 3.000000e+00, %13
%15 = fmul double 5.000000e-01, %14
ret double %15
}

LLVM IR (-O2):
define double @binderparam(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = fdiv double %2, %5
%7 = fsub double 3.000000e+00, %6
%8 = fmul double %7, 5.000000e-01
ret double %8
}
void machine_reset(void) { return; }


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

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

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

LLVM IR (-O2):
define void @machine_reset() {
ret void
}
/* Variables and functions */
scalar_t__ alloc_noswap(int);
int /*<<< orphan*/ free_noswap(int *, int);
int main() {
  int *p;
  p = (int *)alloc_noswap(100);
  free_noswap(p, 100);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%edi
call   1040 <alloc_noswap@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1030 <free_noswap@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @alloc_noswap(i32 100)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @free_noswap(i32* %2, i32 100)
ret i32 0
}
double ceil(double x) {
  return ({
    extern __typeof__(ceil) module_libc_ceil;
    &module_libc_ceil;
  })(x);
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2edc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
jmp    1030 <module_libc_ceil@plt>

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double (double)*
store double %0, double* %2
store double (double)* @module_libc_ceil, double (double)** %3
%4 = load double (double)*, double (double)** %3
%5 = load double, double* %2
%6 = call double %4(double %5)
ret double %6
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = tail call double @module_libc_ceil(double %0)
ret double %2
}
void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
           unsigned int *edx) {
  __asm__ __volatile__("cpuid"
                       : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
                       : "0"(*eax), "2"(*ecx));
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%ecx
cpuid
mov    %eax,%r9d
mov    -0x38(%rbp),%rax
mov    %ecx,%esi
mov    -0x30(%rbp),%rcx
mov    %r9d,(%r8)
mov    %ebx,(%rdi)
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %rcx,%r8
mov    %rdx,%r9
mov    (%rdi),%eax
mov    (%rdx),%ecx
cpuid
mov    %eax,(%rdi)
mov    %ebx,(%rsi)
mov    %ecx,(%r9)
mov    %edx,(%r8)
pop    %rbx
ret

LLVM IR (-O0):
define void @cpuid(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %14, i32 %16)
%18 = extractvalue { i32, i32, i32, i32 } %17, 0
%19 = extractvalue { i32, i32, i32, i32 } %17, 1
%20 = extractvalue { i32, i32, i32, i32 } %17, 2
%21 = extractvalue { i32, i32, i32, i32 } %17, 3
store i32 %18, i32* %9
store i32 %19, i32* %10
store i32 %20, i32* %11
store i32 %21, i32* %12
ret void
}

LLVM IR (-O2):
define void @cpuid(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
%8 = extractvalue { i32, i32, i32, i32 } %7, 0
%9 = extractvalue { i32, i32, i32, i32 } %7, 1
%10 = extractvalue { i32, i32, i32, i32 } %7, 2
%11 = extractvalue { i32, i32, i32, i32 } %7, 3
store i32 %8, i32* %0
store i32 %9, i32* %1
store i32 %10, i32* %2
store i32 %11, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
void socket_endreadwrite(int fd) {
  if (fd < 0)
    return;
  shutdown(fd, SHUT_RDWR);
}


x86 assembly (clang, -O0):
<socket_endreadwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112a <socket_endreadwrite+0x1a>
jmp    113b <socket_endreadwrite+0x2b>
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_endreadwrite>:
test   %edi,%edi
js     1122 <socket_endreadwrite+0x12>
mov    0x2ed5(%rip),%rax
mov    (%rax),%esi
jmp    1030 <shutdown@plt>
ret

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define void @socket_endreadwrite(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @SHUT_RDWR
%9 = call i32 @shutdown(i32 %7, i32 %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define void @socket_endreadwrite(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @SHUT_RDWR
%5 = tail call i32 @shutdown(i32 %0, i32 %4)
br label %6
6: ; preds = %1, %3
ret void
}
__attribute__((no, noclone)) signed __int128 t152_4add(unsigned __int128 x) {
  unsigned __int128 y =
      ((unsigned __int128)((
           signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1)) +
       1);
  signed __int128 r;
  if (__builtin_add_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t152_4add>:
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)
movabs $0x8000000000000000,%rax
mov    %rax,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rax
add    %rsi,%rdx
adc    %rax,%rcx
setb   %al
movzbl %al,%eax
mov    %eax,%esi
mov    %rsi,%rdi
neg    %rdi
mov    %rdi,%rax
xor    %rsi,%rax
or     %rdi,%rax
mov    %rcx,%rdi
shr    $0x3f,%rdi
xor    %rdi,%rsi
or     %rsi,%rax
setne  %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    1198 <t152_4add+0x88>
jmp    119f <t152_4add+0x8f>
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):
<t152_4add>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movabs $0x8000000000000000,%rbx
add    %rsi,%rbx
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t152_4add(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 -170141183460469231731687303715884105728, i128* %6
%12 = load i128, i128* %5
%13 = load i128, i128* %6
%14 = zext i128 %12 to i129
%15 = zext i128 %13 to i129
%16 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 %14, i129 %15)
%17 = extractvalue { i129, i1 } %16, 1
%18 = extractvalue { i129, i1 } %16, 0
%19 = trunc i129 %18 to i128
%20 = sext i128 %19 to i129
%21 = icmp ne i129 %18, %20
%22 = or i1 %17, %21
store i128 %19, i128* %7
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @bar()
br label %25
25: ; preds = %23, %2
%26 = load i128, i128* %7
store i128 %26, i128* %3
%27 = bitcast i128* %3 to { i64, i64 }*
%28 = load { i64, i64 }, { i64, i64 }* %27
ret { i64, i64 } %28
}

LLVM IR (-O2):
define { i64, i64 } @t152_4add(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 = zext i128 %6 to i129
%8 = add nuw i129 %7, 170141183460469231731687303715884105728
%9 = tail call i32 (...) @bar()
%10 = trunc i129 %8 to i64
%11 = lshr i129 %8, 64
%12 = trunc i129 %11 to i64
%13 = insertvalue { i64, i64 } poison, i64 %10, 0
%14 = insertvalue { i64, i64 } %13, i64 %12, 1
ret { i64, i64 } %14
}
int foo(void) {
  int a, b, c, d, e, f;
  asm("# Magic instruction" : "=r"(a), "=r"(d) : "r"(0));
  asm("# Magic instruction" : "=r"(b), "=r"(e) : "r"(0));
  asm("# Magic instruction" : "=r"(c), "=r"(f) : "r"(0));
  return a + b + c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %ecx,-0x4(%rbp)
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
mov    %ecx,-0xc(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
lea    (%rcx,%rcx,2),%eax
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = call { i32, i32 } asm "# Magic instruction", "=r,=r,r,~{dirflag},~{fpsr},~{flags}"(i32 0)
%8 = extractvalue { i32, i32 } %7, 0
%9 = extractvalue { i32, i32 } %7, 1
store i32 %8, i32* %1
store i32 %9, i32* %4
%10 = call { i32, i32 } asm "# Magic instruction", "=r,=r,r,~{dirflag},~{fpsr},~{flags}"(i32 0)
%11 = extractvalue { i32, i32 } %10, 0
%12 = extractvalue { i32, i32 } %10, 1
store i32 %11, i32* %2
store i32 %12, i32* %5
%13 = call { i32, i32 } asm "# Magic instruction", "=r,=r,r,~{dirflag},~{fpsr},~{flags}"(i32 0)
%14 = extractvalue { i32, i32 } %13, 0
%15 = extractvalue { i32, i32 } %13, 1
store i32 %14, i32* %3
store i32 %15, i32* %6
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call { i32, i32 } asm "# Magic instruction", "=r,=r,r,~{dirflag},~{fpsr},~{flags}"(i32 0)
%2 = extractvalue { i32, i32 } %1, 0
%3 = mul nsw i32 %2, 3
ret i32 %3
}
char **blkcpy(oav, bv)
char **oav;
register char **bv;
{
  register char **av = oav;
  while (*av++ = *bv++)
    continue;
  return (oav);
}


x86 assembly (clang, -O0):
<blkcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x8,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rax,(%rcx)
cmp    $0x0,%rax
je     1147 <blkcpy+0x47>
jmp    1114 <blkcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blkcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rsi,%rcx,1),%rdx
mov    %rdx,(%rax,%rcx,1)
add    $0x8,%rcx
test   %rdx,%rdx
jne    1110 <blkcpy+0x10>
ret

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

LLVM IR (-O2):
define i8** @blkcpy(i8** returned writeonly %0, i8** nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8** [ %1, %2 ], [ %6, %3 ]
%5 = phi i8** [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8*, i8** %4, i64 1
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8*, i8** %5, i64 1
store i8* %7, i8** %5
%9 = icmp eq i8* %7, null
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8** %0
}
/* Variables and functions */
int /*<<< orphan*/ B();
int /*<<< orphan*/ C();
void A() {
  B();
  C();
}


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

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

LLVM IR (-O0):
define void @A() {
%1 = call i32 (...) @B()
%2 = call i32 (...) @C()
ret void
}

LLVM IR (-O2):
define void @A() {
%1 = tail call i32 (...) @B()
%2 = tail call i32 (...) @C()
ret void
}
int main() {
  int i = 3;
  int *j;
  int **k;
  j = &i;
  k = &j;
  printf("\n");
  printf("%u %u %d", k, *k, **k);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x3,0x4(%rsp)
lea    0x4(%rsp),%rbx
mov    %rbx,0x8(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%ecx
lea    0xeb4(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%u %u %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = call i32 @putchar(i32 10)
%6 = load i32, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32** %2, i32* %1, i32 %6)
%8 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void binaire_bit_a_bit(unsigned int n) {
  unsigned masque = 1 << ((sizeof(unsigned int) * 8) - 1);
  while (masque > 0) {
    printf("%d", (masque & n) != 0);
    masque >>= 1;
  }
}


x86 assembly (clang, -O0):
<binaire_bit_a_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1157 <binaire_bit_a_bit+0x47>
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <binaire_bit_a_bit+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binaire_bit_a_bit>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
mov    $0x80000000,%ebx
lea    0xeda(%rip),%r14
mov    $0x80000000,%ebp
nopl   0x0(%rax,%rax,1)
xor    %esi,%esi
test   %r15d,%ebx
setne  %sil
mov    %r14,%rdi
call   1030 <printf@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1130 <binaire_bit_a_bit+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @binaire_bit_a_bit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = and i32 %8, %9
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %3
%15 = lshr i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @binaire_bit_a_bit(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ -2147483648, %1 ], [ %8, %2 ]
%4 = and i32 %3, %0
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = lshr i32 %3, 1
%9 = icmp ult i32 %3, 2
br i1 %9, label %10, label %2
10: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ldisplay(char *);
cmd_beep() { ldisplay("\007"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"\07\00"
define i32 @cmd_beep() {
%1 = tail call i32 @ldisplay(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ RFC2409_PRIME_768;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *BN_bin2bn(unsigned char const *, int, int /*<<< orphan*/ *);
BIGNUM *get_rfc2409_prime_768(BIGNUM *bn) {
  static const unsigned char RFC2409_PRIME_768[] = {
      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0F, 0xDA, 0xA2,
      0x21, 0x68, 0xC2, 0x34, 0xC4, 0xC6, 0x62, 0x8B, 0x80, 0xDC, 0x1C, 0xD1,
      0x29, 0x02, 0x4E, 0x08, 0x8A, 0x67, 0xCC, 0x74, 0x02, 0x0B, 0xBE, 0xA6,
      0x3B, 0x13, 0x9B, 0x22, 0x51, 0x4A, 0x08, 0x79, 0x8E, 0x34, 0x04, 0xDD,
      0xEF, 0x95, 0x19, 0xB3, 0xCD, 0x3A, 0x43, 0x1B, 0x30, 0x2B, 0x0A, 0x6D,
      0xF2, 0x5F, 0x14, 0x37, 0x4F, 0xE1, 0x35, 0x6D, 0x6D, 0x51, 0xC2, 0x45,
      0xE4, 0x85, 0xB5, 0x76, 0x62, 0x5E, 0x7E, 0xC6, 0xF4, 0x4C, 0x42, 0xE9,
      0xA6, 0x3A, 0x36, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  };
  return BN_bin2bn(RFC2409_PRIME_768, sizeof(RFC2409_PRIME_768), bn);
}


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

x86 assembly (clang, -O2):
<get_rfc2409_prime_768>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    $0x60,%esi
jmp    1030 <BN_bin2bn@plt>

LLVM IR (-O0):
@get_rfc2409_prime_768.RFC2409_PRIME_768 = internal constant [96 x i8] c"\FF\FF\FF\FF\FF\FF\FF\FF\C9\0F\DA\A2!h\C24\C4\C6b\8B\80\DC\1C\D1)\02N\08\8Ag\CCt\02\0B\BE\A6;\13\9B\22QJ\08y\8E4\04\DD\EF\95\19\B3\CD:C\1B0+\0Am\F2_\147O\E15mmQ\C2E\E4\85\B5vb^~\C6\F4LB\E9\A6:6 \FF\FF\FF\FF\FF\FF\FF\FF"
define i32* @get_rfc2409_prime_768(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @get_rfc2409_prime_768.RFC2409_PRIME_768, i64 0, i64 0), i32 96, i32* %3)
ret i32* %4
}

LLVM IR (-O2):
@get_rfc2409_prime_768.RFC2409_PRIME_768 = internal constant [96 x i8] c"\FF\FF\FF\FF\FF\FF\FF\FF\C9\0F\DA\A2!h\C24\C4\C6b\8B\80\DC\1C\D1)\02N\08\8Ag\CCt\02\0B\BE\A6;\13\9B\22QJ\08y\8E4\04\DD\EF\95\19\B3\CD:C\1B0+\0Am\F2_\147O\E15mmQ\C2E\E4\85\B5vb^~\C6\F4LB\E9\A6:6 \FF\FF\FF\FF\FF\FF\FF\FF"
define i32* @get_rfc2409_prime_768(i32* %0) {
%2 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @get_rfc2409_prime_768.RFC2409_PRIME_768, i64 0, i64 0), i32 96, i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ disable_execve();
scalar_t__ noexecve_enabled();
void __attribute__((constructor)) constructor(void) {
  if (noexecve_enabled()) {
    disable_execve();
  }
}


x86 assembly (clang, -O0):
<constructor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <noexecve_enabled@plt>
cmp    $0x0,%rax
je     113c <constructor+0x1c>
mov    $0x0,%al
call   1030 <disable_execve@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<constructor>:
push   %rax
xor    %eax,%eax
call   1040 <noexecve_enabled@plt>
test   %rax,%rax
je     1135 <constructor+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <disable_execve@plt>
pop    %rax
ret

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @constructor, i8* null }]
define void @constructor() {
%1 = call i64 (...) @noexecve_enabled()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @disable_execve()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @constructor, i8* null }]
define void @constructor() {
%1 = tail call i64 (...) @noexecve_enabled()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @disable_execve()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void cadvise(void) {
  fprintf(
      stderr,
      "\nIt is possible that the compressed file(s) have become corrupted.\n"
      "You can use the -tvv option to test integrity of such files.\n\n"
      "You can use the `bzip2recover' program to *attempt* to recover\n"
      "data from undamaged sections of corrupted files.\n\n");
}


x86 assembly (clang, -O0):
<cadvise>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cadvise>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [243 x i8] c"\0AIt is possible that the compressed file(s) have become corrupted.\0AYou can use the -tvv option to test integrity of such files.\0A\0AYou can use the `bzip2recover' program to *attempt* to recover\0Adata from undamaged sections of corrupted files.\0A\0A\00"
define void @cadvise() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([243 x i8], [243 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [243 x i8] c"\0AIt is possible that the compressed file(s) have become corrupted.\0AYou can use the -tvv option to test integrity of such files.\0A\0AYou can use the `bzip2recover' program to *attempt* to recover\0Adata from undamaged sections of corrupted files.\0A\0A\00"
define void @cadvise() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([243 x i8], [243 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ intrev(scalar_t__);
int is_palindrome(uint64_t i) { return (i == intrev(i)); }


x86 assembly (clang, -O0):
<is_palindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <intrev@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_palindrome>:
push   %rbx
mov    %rdi,%rbx
call   1030 <intrev@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_palindrome(i64 %0) {
%2 = tail call i64 @intrev(i64 %0)
%3 = icmp eq i64 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}