xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void openerror(const char *filename) {
  fprintf(stderr, "error opening file %s\n", filename);
  exit(3);
}


x86 assembly (clang, -O0):
<openerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<openerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"error opening file %s\0A\00"
define void @openerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"error opening file %s\0A\00"
define void @openerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 3)
unreachable
}
/* Variables and functions */
double log10(int);
float psnr(int max_sample_sq, int samples, float sse_distortion) {
  return (
      float)(10.0 *
             log10(max_sample_sq *
                   (double)((double)samples /
                            (sse_distortion < 1.0 ? 1.0 : sse_distortion))));
}


x86 assembly (clang, -O0):
<psnr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1164 <psnr+0x54>
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1172 <psnr+0x62>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xe6b(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psnr>:
push   %rax
cvtsi2sd %edi,%xmm1
cvtsi2sd %esi,%xmm2
cvtss2sd %xmm0,%xmm0
movsd  0xedb(%rip),%xmm3
maxsd  %xmm0,%xmm3
divsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm2
cvttsd2si %xmm2,%edi
call   1030 <log10@plt>
mulsd  0xec6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @psnr(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = load float, float* %6
%12 = fpext float %11 to double
%13 = fcmp olt double %12, 1.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %3
br label %18
15: ; preds = %3
%16 = load float, float* %6
%17 = fpext float %16 to double
br label %18
18: ; preds = %15, %14
%19 = phi double [ 1.000000e+00, %14 ], [ %17, %15 ]
%20 = fdiv double %10, %19
%21 = fmul double %8, %20
%22 = fptosi double %21 to i32
%23 = call double @log10(i32 %22)
%24 = fmul double 1.000000e+01, %23
%25 = fptrunc double %24 to float
ret float %25
}

LLVM IR (-O2):
define float @psnr(i32 %0, i32 %1, float %2) {
%4 = sitofp i32 %0 to double
%5 = sitofp i32 %1 to double
%6 = fpext float %2 to double
%7 = fcmp olt double %6, 1.000000e+00
%8 = select i1 %7, double 1.000000e+00, double %6
%9 = fdiv double %5, %8
%10 = fmul double %9, %4
%11 = fptosi double %10 to i32
%12 = tail call double @log10(i32 %11)
%13 = fmul double %12, 1.000000e+01
%14 = fptrunc double %13 to float
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strstr(char *, char *);
int main() {
  char *a = "this";
  char *b = 0;
  char *c = strstr(a, b);
  printf("%s\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"this\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @strstr(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int ssl_has_ecc_ciphers(int /*<<< orphan*/ *);
int tlsext_supportedgroups_clienthello_needs(SSL *s) {
  return ssl_has_ecc_ciphers(s);
}


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

x86 assembly (clang, -O2):
<tlsext_supportedgroups_clienthello_needs>:
jmp    1030 <ssl_has_ecc_ciphers@plt>

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

LLVM IR (-O2):
define i32 @tlsext_supportedgroups_clienthello_needs(i32* %0) {
%2 = tail call i32 @ssl_has_ecc_ciphers(i32* %0)
ret i32 %2
}
/* Variables and functions */
int *malloc(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int *restrict p;
  int *restrict q;
  p = malloc(sizeof(int));
  *p = 10;
  q = p;
  *q = 0;
  printf("%d", *q);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
void uint64_to_network(uint64_t in, uint8_t *out) {
  int i;
  for (i = 0; i < 8; i++) {
    out[i] = (uint8_t)(0xFF & (in >> (56 - 8 * i)));
  }
}


x86 assembly (clang, -O0):
<uint64_to_network>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1150 <uint64_to_network+0x50>
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%edx
shl    $0x3,%edx
mov    $0x38,%ecx
sub    %edx,%ecx
sar    %cl,%eax
and    $0xff,%eax
movslq %eax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <uint64_to_network+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint64_to_network>:
mov    %edi,%eax
mov    %edi,%ecx
movzbl %ah,%edx
movzbl %al,%edi
shr    $0x18,%eax
mov    %rax,0x20(%rsi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %rax,0x28(%rsi)
mov    %rdx,0x30(%rsi)
mov    %rdi,0x38(%rsi)
ret

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

LLVM IR (-O2):
define void @uint64_to_network(i32 %0, i64* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i64, i64* %1, i64 4
store i64 %4, i64* %5
%6 = lshr i32 %0, 16
%7 = and i32 %6, 255
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %1, i64 5
store i64 %8, i64* %9
%10 = lshr i32 %0, 8
%11 = and i32 %10, 255
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i64, i64* %1, i64 6
store i64 %12, i64* %13
%14 = and i32 %0, 255
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i64, i64* %1, i64 7
store i64 %15, i64* %16
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int fn(void *arg) { printf("Hello I am here\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello I am here\0A\00"
define i32 @fn(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello I am here\00"
define i32 @fn(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
void append_code(char *dst, uint16_t code, const char *(*lookup)(uint16_t)) {
  const char *s = lookup(code);
  if (s) {
    if (dst[0])
      strcat(dst, ": ");
    strcat(dst, s);
  }
}


x86 assembly (clang, -O0):
<append_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1165 <append_code+0x55>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <append_code+0x48>
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1030 <strcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_code>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %esi,%edi
call   *%rdx
test   %rax,%rax
je     114a <append_code+0x3a>
mov    %rax,%rbx
cmpb   $0x0,(%r14)
je     1138 <append_code+0x28>
lea    0xed0(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcat@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c": \00"
define void @append_code(i8* %0, i32 %1, i8* (i32)* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8* (i32)*
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* (i32)* %2, i8* (i32)** %6
%8 = load i8* (i32)*, i8* (i32)** %6
%9 = load i32, i32* %5
%10 = call i8* %8(i32 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %25
13: ; preds = %3
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = icmp ne i8 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i8*, i8** %4
%20 = call i32 @strcat(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %18, %13
%22 = load i8*, i8** %4
%23 = load i8*, i8** %7
%24 = call i32 @strcat(i8* %22, i8* %23)
br label %25
25: ; preds = %21, %3
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c": \00"
define void @append_code(i8* %0, i32 %1, i8* (i32)* nocapture %2) {
%4 = tail call i8* %2(i32 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = tail call i32 @strcat(i8* %0, i8* %4)
br label %13
13: ; preds = %11, %3
ret void
}
int ipc_sock_sig_data(void *dri_if) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ipc_sock_sig_data(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ showtext();
int /*<<< orphan*/ tnoua(char *);
void sleep(int i) {
  int j;
  for (j = 0; j < i; j++) {
    tnoua(".");
    showtext();
  }
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <sleep+0x3f>
lea    0xebb(%rip),%rdi
call   1040 <tnoua@plt>
mov    $0x0,%al
call   1030 <showtext@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <sleep+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1154 <sleep+0x34>
mov    %edi,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <tnoua@plt>
xor    %eax,%eax
call   1030 <showtext@plt>
add    $0xffffffff,%ebx
jne    1140 <sleep+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define void @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = call i32 @tnoua(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @showtext()
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define void @sleep(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = tail call i32 @tnoua(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @showtext()
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
void t1() {}


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

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

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

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

/* Variables and functions */
int nth_position(int /*<<< orphan*/, int);
int count_onece_bits(uint32_t number) {
  int onceCounter = 0;
  int i;
  for (i = 0; i < 32; i++) {
    if (nth_position(number, i) == 1) {
      onceCounter++;
    }
  }
  return onceCounter;
}


x86 assembly (clang, -O0):
<count_onece_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1163 <count_onece_bits+0x53>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <nth_position@plt>
cmp    $0x1,%eax
jne    1150 <count_onece_bits+0x40>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <count_onece_bits+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <count_onece_bits+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_onece_bits>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14d,%edi
mov    %ebp,%esi
call   1030 <nth_position@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ebx
add    $0x1,%ebp
cmp    $0x20,%ebp
jne    1120 <count_onece_bits+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @count_onece_bits(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %9, %2 ]
%4 = phi i32 [ 0, %1 ], [ %8, %2 ]
%5 = tail call i32 @nth_position(i32 %0, i32 %3)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = add nuw nsw i32 %4, %7
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %2
11: ; preds = %2
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ port_byte_out(int, unsigned char);
void set_cursor(int offset) {
  offset /= 2;
  port_byte_out(0x3D4, 14);
  port_byte_out(0x3D5, (unsigned char)(offset >> 8));
  port_byte_out(0x3D4, 15);
  port_byte_out(0x3D5, (unsigned char)(offset % 256));
}


x86 assembly (clang, -O0):
<set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <port_byte_out@plt>
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    $0x3d5,%edi
movzbl %al,%esi
call   1030 <port_byte_out@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <port_byte_out@plt>
mov    -0x4(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    $0x3d5,%edi
movzbl %al,%esi
call   1030 <port_byte_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cursor>:
push   %rbx
mov    %edi,%ebx
shr    $0x1f,%ebx
add    %edi,%ebx
sar    %ebx
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <port_byte_out@plt>
movzbl %bh,%esi
mov    $0x3d5,%edi
call   1030 <port_byte_out@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <port_byte_out@plt>
movzbl %bl,%esi
mov    $0x3d5,%edi
pop    %rbx
jmp    1030 <port_byte_out@plt>

LLVM IR (-O0):
define void @set_cursor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 2
store i32 %4, i32* %2
%5 = call i32 @port_byte_out(i32 980, i8 zeroext 14)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = trunc i32 %7 to i8
%9 = call i32 @port_byte_out(i32 981, i8 zeroext %8)
%10 = call i32 @port_byte_out(i32 980, i8 zeroext 15)
%11 = load i32, i32* %2
%12 = srem i32 %11, 256
%13 = trunc i32 %12 to i8
%14 = call i32 @port_byte_out(i32 981, i8 zeroext %13)
ret void
}

LLVM IR (-O2):
define void @set_cursor(i32 %0) {
%2 = sdiv i32 %0, 2
%3 = tail call i32 @port_byte_out(i32 980, i8 zeroext 14)
%4 = lshr i32 %2, 8
%5 = trunc i32 %4 to i8
%6 = tail call i32 @port_byte_out(i32 981, i8 zeroext %5)
%7 = tail call i32 @port_byte_out(i32 980, i8 zeroext 15)
%8 = trunc i32 %2 to i8
%9 = tail call i32 @port_byte_out(i32 981, i8 zeroext %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rect_delete_prototype();
int /*<<< orphan*/ rect_init_prototype();
int /*<<< orphan*/ test_suite();
int main(void) {
  rect_init_prototype();
  test_suite();
  rect_delete_prototype();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rect_init_prototype()
%2 = tail call i32 (...) @test_suite()
%3 = tail call i32 (...) @rect_delete_prototype()
ret i32 0
}
void check_shm_cap(void) {}


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

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

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

LLVM IR (-O2):
define void @check_shm_cap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ unlink(char *);
void cancella_pipe() {
  unlink("/tmp/pipeSnakeIn");
  unlink("/tmp/pipeSnakeOut");
  exit(1);
}


x86 assembly (clang, -O0):
<cancella_pipe>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <unlink@plt>
lea    0xeda(%rip),%rdi
call   1030 <unlink@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cancella_pipe>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <unlink@plt>
lea    0xedd(%rip),%rdi
call   1030 <unlink@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"/tmp/pipeSnakeIn\00"
@.str.1 = [18 x i8] c"/tmp/pipeSnakeOut\00"
define void @cancella_pipe() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @unlink(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"/tmp/pipeSnakeIn\00"
@.str.1 = [18 x i8] c"/tmp/pipeSnakeOut\00"
define void @cancella_pipe() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int import_error() {
  printf("k=import(soname,sofun,nret,var0,w1,...,wm)");
  return 0;
}


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

x86 assembly (clang, -O2):
<import_error>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"k=import(soname,sofun,nret,var0,w1,...,wm)\00"
define i32 @import_error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"k=import(soname,sofun,nret,var0,w1,...,wm)\00"
define i32 @import_error() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int fun1105() { return 1105; }


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

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

LLVM IR (-O0):
define i32 @fun1105() {
ret i32 1105
}

LLVM IR (-O2):
define i32 @fun1105() {
ret i32 1105
}
/* Variables and functions */
int /*<<< orphan*/ ok(int /*<<< orphan*/, char const *);
void fail(const char *description) { ok(0, description); }


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

x86 assembly (clang, -O2):
<fail>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <ok@plt>

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

LLVM IR (-O2):
define void @fail(i8* %0) {
%2 = tail call i32 @ok(i32 0, i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ read(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int __sp_is_open(int fd) { return (read(fd, NULL, 0)) ? 0 : -1; }


x86 assembly (clang, -O0):
<__sp_is_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <read@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sp_is_open>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1030 <read@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__sp_is_open(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @read(i32 %3, i32* null, i32 0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 -1
ret i32 %7
}

LLVM IR (-O2):
define i32 @__sp_is_open(i32 %0) {
%2 = tail call i64 @read(i32 %0, i32* null, i32 0)
%3 = icmp eq i64 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}
void device_pm_remove(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @device_pm_remove(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int ylsysfs_read_control_file_buf(char const *, char *, int);
int ylsysfs_read_control_file(const char *control, char *line, int size) {
  int len = ylsysfs_read_control_file_buf(control, line, size - 1);
  if (len >= 0)
    line[len] = '\0';
  return len;
}


x86 assembly (clang, -O0):
<ylsysfs_read_control_file>:
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
sub    $0x1,%edx
call   1030 <ylsysfs_read_control_file_buf@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     114f <ylsysfs_read_control_file+0x3f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ylsysfs_read_control_file>:
push   %rbx
mov    %rsi,%rbx
add    $0xffffffff,%edx
call   1030 <ylsysfs_read_control_file_buf@plt>
test   %eax,%eax
js     1126 <ylsysfs_read_control_file+0x16>
mov    %eax,%ecx
movb   $0x0,(%rbx,%rcx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ylsysfs_read_control_file(i8* %0, i8* %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @ylsysfs_read_control_file_buf(i8* %0, i8* %1, i32 %4)
%6 = icmp sgt i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = zext i32 %5 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %7, %3
ret i32 %5
}
void pthread_rwlockattr_init() {}


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

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

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

LLVM IR (-O2):
define void @pthread_rwlockattr_init() {
ret void
}
void g_slist_free() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_free() {
ret void
}
/* Variables and functions */
double umath_double_cos(double);
double umath_double_sin(double);
double umath_double_tan(double x) {
  return umath_double_sin(x) / umath_double_cos(x);
}


x86 assembly (clang, -O0):
<umath_double_tan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <umath_double_sin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <umath_double_cos@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umath_double_tan>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <umath_double_sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <umath_double_cos@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @umath_double_tan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @umath_double_sin(double %3)
%5 = load double, double* %2
%6 = call double @umath_double_cos(double %5)
%7 = fdiv double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @umath_double_tan(double %0) {
%2 = tail call double @umath_double_sin(double %0)
%3 = tail call double @umath_double_cos(double %0)
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  int temperatur = 80;
  if (temperatur > 70) {
    printf("Temperatur diatas 70^C \r\n");
  } else {
    printf("Temperatur dibawah atau sama dengan 70^C \r\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x50,-0x14(%rbp)
cmpl   $0x46,-0x14(%rbp)
jle    1148 <main+0x38>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    1154 <main+0x44>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Temperatur diatas 70^C \0D\0A\00"
@.str.1 = [44 x i8] c"Temperatur dibawah atau sama dengan 70^C \0D\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 80, i32* %6
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 70
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"Temperatur diatas 70^C \0D\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
float Sleef_cbrtf_u10(float x) { return __builtin_cbrtf(x); }


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

x86 assembly (clang, -O2):
<Sleef_cbrtf_u10>:
jmp    1030 <cbrtf@plt>

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

LLVM IR (-O2):
define float @Sleef_cbrtf_u10(float %0) {
%2 = tail call float @cbrtf(float %0)
ret float %2
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void getfilemode(struct stat *st, char *mode) { bzero(mode, strlen(mode)); }


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

x86 assembly (clang, -O2):
<getfilemode>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <bzero@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define void @getfilemode(%struct.stat* %0, i8* %1) {
%3 = alloca %struct.stat*
%4 = alloca i8*
store %struct.stat* %0, %struct.stat** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @bzero(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define void @getfilemode(%struct.stat* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @bzero(i8* %1, i32 %3)
ret void
}
int xmlUCSIsTelugu(int code) {
  return (((code >= 0x0C00) && (code <= 0x0C7F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsTelugu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xc00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsTelugu+0x26>
cmpl   $0xc7f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsTelugu>:
and    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0xc00,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsTelugu(i32 %0) {
%2 = and i32 %0, -128
%3 = icmp eq i32 %2, 3072
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fun(int arr[]) {
  int i;
  int arr_size = sizeof(arr) / sizeof(arr[0]);
  for (i = 0; i < arr_size; i++)
    printf("%d ", arr[i]);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115b <fun+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <fun+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee0(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @fun(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
main() {
lbl:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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
store i32 0, i32* %1
br label %2
2: ; preds = %0
ret i32 0
}

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

/* Variables and functions */
int mi_unlink_1_svc(char *, void *, struct svc_req *);
int _mi_unlink_1(char **argp, void *result, struct svc_req *rqstp) {
  return (mi_unlink_1_svc(*argp, result, rqstp));
}


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

x86 assembly (clang, -O2):
<_mi_unlink_1>:
mov    (%rdi),%rdi
jmp    1030 <mi_unlink_1_svc@plt>

LLVM IR (-O0):
%struct.svc_req = type { i32 }
define i32 @_mi_unlink_1(i8** %0, i8* %1, %struct.svc_req* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca %struct.svc_req*
store i8** %0, i8*** %4
store i8* %1, i8** %5
store %struct.svc_req* %2, %struct.svc_req** %6
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = load i8*, i8** %5
%10 = load %struct.svc_req*, %struct.svc_req** %6
%11 = call i32 @mi_unlink_1_svc(i8* %8, i8* %9, %struct.svc_req* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
define i32 @_mi_unlink_1(i8** nocapture %0, i8* %1, %struct.svc_req* %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @mi_unlink_1_svc(i8* %4, i8* %1, %struct.svc_req* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ my_strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int my_fork() {
  int pid;
  if ((pid = fork()) == -1) {
    write(1, "Error fork", my_strlen("Error fork"));
    exit(0);
  }
  return (pid);
}


x86 assembly (clang, -O0):
<my_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
jne    1181 <my_fork+0x41>
lea    0xe9e(%rip),%rdi
call   1030 <my_strlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe8b(%rip),%rsi
call   1040 <write@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fork>:
push   %rbx
xor    %eax,%eax
call   1060 <fork@plt>
cmp    $0xffffffff,%eax
je     114f <my_fork+0xf>
pop    %rbx
ret
lea    0xeaa(%rip),%rbx
mov    %rbx,%rdi
call   1030 <my_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Error fork\00"
define i32 @my_fork() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = call i32 @my_strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @write(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"Error fork\00"
define i32 @my_fork() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @my_strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %0
ret i32 %1
}
/* Variables and functions */
unsigned int challenge();
int /*<<< orphan*/ itoa(unsigned int, char *, int);
int /*<<< orphan*/ zkp_send(char *, int);
unsigned int zkp_protocol_challenge(int sockfd) {
  unsigned int e;
  char buf[1024];
  e = challenge();
  itoa(e, buf, 10);
  zkp_send(buf, sockfd);
  return (e);
}


x86 assembly (clang, -O0):
<zkp_protocol_challenge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <challenge@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    $0xa,%edx
call   1050 <itoa@plt>
lea    -0x410(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <zkp_send@plt>
mov    -0x8(%rbp),%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zkp_protocol_challenge>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <challenge@plt>
mov    %eax,%ebp
mov    %rsp,%r14
mov    %eax,%edi
mov    %r14,%rsi
mov    $0xa,%edx
call   1050 <itoa@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <zkp_send@plt>
mov    %ebp,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @zkp_protocol_challenge(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1024 x i8]
store i32 %0, i32* %2
%5 = call i32 (...) @challenge()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%8 = call i32 @itoa(i32 %6, i8* %7, i32 10)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%10 = load i32, i32* %2
%11 = call i32 @zkp_send(i8* %9, i32 %10)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @zkp_protocol_challenge(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (...) @challenge()
%5 = call i32 @itoa(i32 %4, i8* %3, i32 10)
%6 = call i32 @zkp_send(i8* %3, i32 %0)
ret i32 %4
}
/* Type definitions */
struct url {
  int dummy;
};

/* Variables and functions */
int full_path_length(struct url const *);
int /*<<< orphan*/ full_path_write(struct url const *, char *);
scalar_t__ xmalloc(int);
char *url_full_path(const struct url *url) {
  int length = full_path_length(url);
  char *full_path = (char *)xmalloc(length + 1);
  full_path_write(url, full_path);
  full_path[length] = '\0';
  return full_path;
}


x86 assembly (clang, -O0):
<url_full_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <full_path_length@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <full_path_write@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<url_full_path>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <full_path_length@plt>
mov    %eax,%r15d
lea    0x1(%r15),%edi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <full_path_write@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.url = type { i32 }
define i8* @url_full_path(%struct.url* %0) {
%2 = alloca %struct.url*
%3 = alloca i32
%4 = alloca i8*
store %struct.url* %0, %struct.url** %2
%5 = load %struct.url*, %struct.url** %2
%6 = call i32 @full_path_length(%struct.url* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i64 @xmalloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %4
%11 = load %struct.url*, %struct.url** %2
%12 = load i8*, i8** %4
%13 = call i32 @full_path_write(%struct.url* %11, i8* %12)
%14 = load i8*, i8** %4
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
%struct.url = type { i32 }
define i8* @url_full_path(%struct.url* %0) {
%2 = tail call i32 @full_path_length(%struct.url* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @xmalloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @full_path_write(%struct.url* %0, i8* %5)
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
/* Variables and functions */
int get_offset_row(int);
int get_offset_col(int offset) {
  return (offset - (get_offset_row(offset) * 2 * 80)) / 2;
}


x86 assembly (clang, -O0):
<get_offset_col>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_offset_row@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%ecx
imul   $0x50,%ecx,%ecx
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_offset_col>:
push   %rbx
mov    %edi,%ebx
call   1030 <get_offset_row@plt>
shl    $0x5,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_offset_col(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @get_offset_row(i32 %4)
%6 = mul nsw i32 %5, 2
%7 = mul nsw i32 %6, 80
%8 = sub nsw i32 %3, %7
%9 = sdiv i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @get_offset_col(i32 %0) {
%2 = tail call i32 @get_offset_row(i32 %0)
%3 = mul i32 %2, -160
%4 = add i32 %3, %0
%5 = sdiv i32 %4, 2
ret i32 %5
}