xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ getuid();
int main(void) {
  uid_t uid;
  uid = getuid();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getuid()
ret i32 0
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR97_set(void) { return U_WMRCORENONE_set("U_WMR97"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR97\00"
define i8* @U_WMR97_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR97\00"
define i8* @U_WMR97_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidirect_cfg_noa_usage(void) {
  printf("Usage : wifidirect_cfg_noa <enable|disable> <index> [<counttype> "
         "<duration> <interval>]\n");
  printf("If NOA parameters are provided, 'set' is performed otherwise 'get' "
         "is performed.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wifidirect_cfg_noa_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf34(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [89 x i8] c"Usage : wifidirect_cfg_noa <enable|disable> <index> [<counttype> <duration> <interval>]\0A\00"
@.str.1 = [82 x i8] c"If NOA parameters are provided, 'set' is performed otherwise 'get' is performed.\0A\00"
define void @print_wifidirect_cfg_noa_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [88 x i8] c"Usage : wifidirect_cfg_noa <enable|disable> <index> [<counttype> <duration> <interval>]\00"
@str.2 = [81 x i8] c"If NOA parameters are provided, 'set' is performed otherwise 'get' is performed.\00"
define void @print_wifidirect_cfg_noa_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.2, i64 0, i64 0))
ret void
}
long Lpf(long num) {
  long lpf = 2;
  while (num > lpf) {
    if (num % lpf == 0) {
      num /= lpf;
      lpf = 2;
    } else {
      ++lpf;
    }
  }
  return lpf;
}


x86 assembly (clang, -O0):
<Lpf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x2,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1161 <Lpf+0x61>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
cmp    $0x0,%rdx
jne    1150 <Lpf+0x50>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
movq   $0x2,-0x10(%rbp)
jmp    115c <Lpf+0x5c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <Lpf+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lpf>:
mov    $0x2,%ecx
cmp    $0x3,%rdi
jl     1150 <Lpf+0x50>
mov    $0x2,%esi
jmp    113c <Lpf+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rdi,%rax
cqto
idiv   %rcx
add    $0x1,%rcx
test   %rdx,%rdx
cmove  %rax,%rdi
cmove  %rsi,%rcx
cmp    %rcx,%rdi
jle    1150 <Lpf+0x50>
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
jne    1120 <Lpf+0x20>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
jmp    1128 <Lpf+0x28>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @Lpf(i64 %0) {
%2 = icmp sgt i64 %0, 2
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i64 [ %11, %3 ], [ 2, %1 ]
%5 = phi i64 [ %10, %3 ], [ %0, %1 ]
%6 = srem i64 %5, %4
%7 = sdiv i64 %5, %4
%8 = icmp eq i64 %6, 0
%9 = add nsw i64 %4, 1
%10 = select i1 %8, i64 %7, i64 %5
%11 = select i1 %8, i64 2, i64 %9
%12 = icmp sgt i64 %10, %11
br i1 %12, label %3, label %13
13: ; preds = %3, %1
%14 = phi i64 [ 2, %1 ], [ %11, %3 ]
ret i64 %14
}
void putu32(unsigned long data, unsigned char *addr) {
  addr[0] = (unsigned char)data;
  addr[1] = (unsigned char)(data >> 8);
  addr[2] = (unsigned char)(data >> 16);
  addr[3] = (unsigned char)(data >> 24);
}


x86 assembly (clang, -O0):
<putu32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<putu32>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @putu32(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i8
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i64, i64* %3
%10 = lshr i64 %9, 8
%11 = trunc i64 %10 to i8
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i64, i64* %3
%15 = lshr i64 %14, 16
%16 = trunc i64 %15 to i8
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 2
store i8 %16, i8* %18
%19 = load i64, i64* %3
%20 = lshr i64 %19, 24
%21 = trunc i64 %20 to i8
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @putu32(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
store i8 %3, i8* %1
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %0, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %0, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
int man_ign_pre(const struct man_meta *man, const struct man_node *n,
                struct mhtml *mh, struct html *h) {
  return (0);
}


x86 assembly (clang, -O0):
<man_ign_pre>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.man_meta = type opaque
%struct.man_node = type opaque
%struct.mhtml = type opaque
%struct.html = type opaque
define i32 @man_ign_pre(%struct.man_meta* %0, %struct.man_node* %1, %struct.mhtml* %2, %struct.html* %3) {
%5 = alloca %struct.man_meta*
%6 = alloca %struct.man_node*
%7 = alloca %struct.mhtml*
%8 = alloca %struct.html*
store %struct.man_meta* %0, %struct.man_meta** %5
store %struct.man_node* %1, %struct.man_node** %6
store %struct.mhtml* %2, %struct.mhtml** %7
store %struct.html* %3, %struct.html** %8
ret i32 0
}

LLVM IR (-O2):
%struct.man_meta = type opaque
%struct.man_node = type opaque
%struct.mhtml = type opaque
%struct.html = type opaque
define i32 @man_ign_pre(%struct.man_meta* nocapture readnone %0, %struct.man_node* nocapture readnone %1, %struct.mhtml* nocapture readnone %2, %struct.html* nocapture readnone %3) {
ret i32 0
}
int f4(int x, int y) { return (x >= 0) != (y < 0); }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x8(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @f4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
%7 = zext i1 %6 to i32
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
%10 = zext i1 %9 to i32
%11 = icmp ne i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = xor i32 %0, %1
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 31
ret i32 %5
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t gt_int32_t(int32_t a, int32_t b) { return a > b; }


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

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

LLVM IR (-O0):
define i32 @gt_int32_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @gt_int32_t(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int mintaka_index_get(char const *, int);
int mintaka_index_get_(const char *string, int *number) {
  return mintaka_index_get(string, *number);
}


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

x86 assembly (clang, -O2):
<mintaka_index_get_>:
mov    (%rsi),%esi
jmp    1030 <mintaka_index_get@plt>

LLVM IR (-O0):
define i32 @mintaka_index_get_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = call i32 @mintaka_index_get(i8* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @mintaka_index_get_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @mintaka_index_get(i8* %0, i32 %3)
ret i32 %4
}
int fp(int a, int b, int c) {
  int (*f)(int a, int b, int c);
  f = ****fp + 1;
  (****f)(1, 2, 3);
  f = &fp + 1;
}


x86 assembly (clang, -O0):
<fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ec8(%rip),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   *-0x18(%rbp)
mov    0x2ea7(%rip),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp>:
mov    0x2ed9(%rip),%rax
add    $0x1,%rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
jmp    *%rax

LLVM IR (-O0):
define i32 @fp(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32 (i32, i32, i32)*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 (i32, i32, i32)* bitcast (i8* getelementptr (i8, i8* bitcast (i32 (i32, i32, i32)* @fp to i8*), i64 1) to i32 (i32, i32, i32)*), i32 (i32, i32, i32)** %8
%9 = load i32 (i32, i32, i32)*, i32 (i32, i32, i32)** %8
%10 = call i32 %9(i32 1, i32 2, i32 3)
store i32 (i32, i32, i32)* bitcast (i8* getelementptr (i8, i8* bitcast (i32 (i32, i32, i32)* @fp to i8*), i64 1) to i32 (i32, i32, i32)*), i32 (i32, i32, i32)** %8
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @fp(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 bitcast (i8* getelementptr (i8, i8* bitcast (i32 (i32, i32, i32)* @fp to i8*), i64 1) to i32 (i32, i32, i32)*)(i32 1, i32 2, i32 3)
ret i32 undef
}
double haRange(double d) {
  while (d >= 180.0)
    d -= 360.0;
  while (d < -180.0)
    d += 360.0;
  return d;
}


x86 assembly (clang, -O0):
<haRange>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     113b <haRange+0x3b>
movsd  -0x8(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <haRange+0x9>
jmp    1140 <haRange+0x40>
movsd  0xec0(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    116a <haRange+0x6a>
movsd  0xeb5(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1140 <haRange+0x40>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<haRange>:
ucomisd 0xef8(%rip),%xmm0
jb     112a <haRange+0x2a>
movsd  0xef6(%rip),%xmm1
movsd  0xee6(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jae    1120 <haRange+0x20>
movsd  0xede(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    114a <haRange+0x4a>
movsd  0xed8(%rip),%xmm2
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1140 <haRange+0x40>
ret

LLVM IR (-O0):
define double @haRange(double %0) {
%2 = alloca double
store double %0, double* %2
br label %3
3: ; preds = %6, %1
%4 = load double, double* %2
%5 = fcmp oge double %4, 1.800000e+02
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load double, double* %2
%8 = fsub double %7, 3.600000e+02
store double %8, double* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load double, double* %2
%12 = fcmp olt double %11, -1.800000e+02
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load double, double* %2
%15 = fadd double %14, 3.600000e+02
store double %15, double* %2
br label %10
16: ; preds = %10
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @haRange(double %0) {
%2 = fcmp ult double %0, 1.800000e+02
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp olt double %4, -1.800000e+02
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, -3.600000e+02
%9 = fcmp ult double %8, 1.800000e+02
br i1 %9, label %3, label %6
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, 3.600000e+02
%13 = fcmp olt double %12, -1.800000e+02
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
__attribute__((__no__)) void dummy() { asm volatile(""); }


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

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

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

LLVM IR (-O2):
define void @dummy() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int emac1_ifoutmulticastpkts_set(unsigned int dev_id,
                                 union emac1_ifoutmulticastpkts_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac1_ifoutmulticastpkts_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac1_ifoutmulticastpkts_u = type opaque
define i32 @emac1_ifoutmulticastpkts_set(i32 %0, %union.emac1_ifoutmulticastpkts_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_ifoutmulticastpkts_u*
store i32 %0, i32* %3
store %union.emac1_ifoutmulticastpkts_u* %1, %union.emac1_ifoutmulticastpkts_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_ifoutmulticastpkts_u = type opaque
define i32 @emac1_ifoutmulticastpkts_set(i32 %0, %union.emac1_ifoutmulticastpkts_u* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
struct stat {
  int st_uid;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int files_uid(char *filename) {
  struct stat buf;
  if (stat(filename, &buf) < 0) {
    return -1;
  }
  return buf.st_uid;
}


x86 assembly (clang, -O0):
<files_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <files_uid+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <files_uid+0x35>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<files_uid>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     1129 <files_uid+0x19>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @files_uid(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn10() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn10");
  return result;
}


x86 assembly (clang, -O0):
<fn10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn10>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn10\00"
define i8* @fn10() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn10\00"
define i8* @fn10() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
double floor(double x) { return ((double)(int)x); }


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
void pnpinit(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ XDefineCursor(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/);
int /*<<< orphan*/ XtDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XtWindow(int /*<<< orphan*/);
int /*<<< orphan*/ _DtGetHourGlassCursor(int /*<<< orphan*/);
void _DtTurnOnHourGlass(Widget w) {
  Cursor cursor;
  cursor = _DtGetHourGlassCursor(XtDisplay(w));
  XDefineCursor(XtDisplay(w), XtWindow(w), cursor);
  XFlush(XtDisplay(w));
}


x86 assembly (clang, -O0):
<_DtTurnOnHourGlass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <XtDisplay@plt>
mov    %eax,%edi
call   1040 <_DtGetHourGlassCursor@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <XtDisplay@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <XtWindow@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
call   1060 <XDefineCursor@plt>
mov    -0x4(%rbp),%edi
call   1050 <XtDisplay@plt>
mov    %eax,%edi
call   1070 <XFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DtTurnOnHourGlass>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1050 <XtDisplay@plt>
mov    %eax,%edi
call   1040 <_DtGetHourGlassCursor@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1050 <XtDisplay@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <XtWindow@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14d,%edx
call   1060 <XDefineCursor@plt>
mov    %ebx,%edi
call   1050 <XtDisplay@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1070 <XFlush@plt>

LLVM IR (-O0):
define void @_DtTurnOnHourGlass(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @XtDisplay(i32 %4)
%6 = call i32 @_DtGetHourGlassCursor(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @XtDisplay(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @XtWindow(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @XDefineCursor(i32 %8, i32 %10, i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @XtDisplay(i32 %13)
%15 = call i32 @XFlush(i32 %14)
ret void
}

LLVM IR (-O2):
define void @_DtTurnOnHourGlass(i32 %0) {
%2 = tail call i32 @XtDisplay(i32 %0)
%3 = tail call i32 @_DtGetHourGlassCursor(i32 %2)
%4 = tail call i32 @XtDisplay(i32 %0)
%5 = tail call i32 @XtWindow(i32 %0)
%6 = tail call i32 @XDefineCursor(i32 %4, i32 %5, i32 %3)
%7 = tail call i32 @XtDisplay(i32 %0)
%8 = tail call i32 @XFlush(i32 %7)
ret void
}
void gtk_selection_add_targets() {}


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

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

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

LLVM IR (-O2):
define void @gtk_selection_add_targets() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int *);
int f(const int *restrict p) {
  g((int *)p);
  return *p;
}


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

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <g@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32* noalias %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @g(i32* %3)
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32* noalias %0) {
%2 = tail call i32 @g(i32* %0)
%3 = load i32, i32* %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "ls [FILES]...\n"); }


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"ls [FILES]...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"ls [FILES]...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int ap_get_single_string_command(int, int, char *, int);
int ap_get_status(int session, char *str) {
  return (ap_get_single_string_command(session, 0xcc1d, str, 256));
}


x86 assembly (clang, -O0):
<ap_get_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0xcc1d,%esi
mov    $0x100,%ecx
call   1030 <ap_get_single_string_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_get_status>:
mov    %rsi,%rdx
mov    $0xcc1d,%esi
mov    $0x100,%ecx
jmp    1030 <ap_get_single_string_command@plt>

LLVM IR (-O0):
define i32 @ap_get_status(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @ap_get_single_string_command(i32 %5, i32 52253, i8* %6, i32 256)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ap_get_status(i32 %0, i8* %1) {
%3 = tail call i32 @ap_get_single_string_command(i32 %0, i32 52253, i8* %1, i32 256)
ret i32 %3
}
/* Variables and functions */
int const random();
int rand_int(const int bound) { return random() % bound; }


x86 assembly (clang, -O0):
<rand_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @random()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = srem i32 %2, %0
ret i32 %3
}
int int_min(int i1, int i2) {
  if (i1 < i2)
    return i1;
  else
    return i2;
}


x86 assembly (clang, -O0):
<int_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <int_min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <int_min+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};
struct t_gui_window {
  int dummy;
};
struct t_gui_buffer {
  int dummy;
};
struct t_gui_bar_item {
  int dummy;
};

/* Variables and functions */
char *gui_bar_item_default_buffer_modes(void *data, struct t_gui_bar_item *item,
                                        struct t_gui_window *window,
                                        struct t_gui_buffer *buffer,
                                        struct t_hashtable *extra_info) {
  (void)data;
  (void)item;
  (void)window;
  (void)buffer;
  (void)extra_info;
  return NULL;
}


x86 assembly (clang, -O0):
<gui_bar_item_default_buffer_modes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.t_gui_bar_item = type { i32 }
%struct.t_gui_window = type { i32 }
%struct.t_gui_buffer = type { i32 }
%struct.t_hashtable = type { i32 }
define i8* @gui_bar_item_default_buffer_modes(i8* %0, %struct.t_gui_bar_item* %1, %struct.t_gui_window* %2, %struct.t_gui_buffer* %3, %struct.t_hashtable* %4) {
%6 = alloca i8*
%7 = alloca %struct.t_gui_bar_item*
%8 = alloca %struct.t_gui_window*
%9 = alloca %struct.t_gui_buffer*
%10 = alloca %struct.t_hashtable*
store i8* %0, i8** %6
store %struct.t_gui_bar_item* %1, %struct.t_gui_bar_item** %7
store %struct.t_gui_window* %2, %struct.t_gui_window** %8
store %struct.t_gui_buffer* %3, %struct.t_gui_buffer** %9
store %struct.t_hashtable* %4, %struct.t_hashtable** %10
%11 = load i8*, i8** %6
%12 = load %struct.t_gui_bar_item*, %struct.t_gui_bar_item** %7
%13 = load %struct.t_gui_window*, %struct.t_gui_window** %8
%14 = load %struct.t_gui_buffer*, %struct.t_gui_buffer** %9
%15 = load %struct.t_hashtable*, %struct.t_hashtable** %10
ret i8* null
}

LLVM IR (-O2):
%struct.t_gui_bar_item = type { i32 }
%struct.t_gui_window = type { i32 }
%struct.t_gui_buffer = type { i32 }
%struct.t_hashtable = type { i32 }
define noalias i8* @gui_bar_item_default_buffer_modes(i8* nocapture readnone %0, %struct.t_gui_bar_item* nocapture readnone %1, %struct.t_gui_window* nocapture readnone %2, %struct.t_gui_buffer* nocapture readnone %3, %struct.t_hashtable* nocapture readnone %4) {
ret i8* null
}
/* Variables and functions */
char *vrna_extract_record_rest_structure(char const **, int /*<<< orphan*/,
                                         unsigned int);
void vrna_extract_record_rest_constraint(char **cstruc, const char **lines,
                                         unsigned int option) {
  *cstruc = vrna_extract_record_rest_structure(
      lines, 0, option | (option & 32U) ? 32U : 0);
}


x86 assembly (clang, -O0):
<vrna_extract_record_rest_constraint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%eax
and    $0x20,%eax
or     %eax,%ecx
xor    %edx,%edx
mov    $0x20,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
xor    %esi,%esi
call   1030 <vrna_extract_record_rest_structure@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrna_extract_record_rest_constraint>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
test   %edx,%edx
setne  %al
shl    $0x5,%eax
mov    %rsi,%rdi
xor    %esi,%esi
mov    %eax,%edx
call   1030 <vrna_extract_record_rest_structure@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @vrna_extract_record_rest_constraint(i8** %0, i8** %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i32
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %6
%10 = and i32 %9, 32
%11 = or i32 %8, %10
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 32, i32 0
%15 = call i8* @vrna_extract_record_rest_structure(i8** %7, i32 0, i32 %14)
%16 = load i8**, i8*** %4
store i8* %15, i8** %16
ret void
}

LLVM IR (-O2):
define void @vrna_extract_record_rest_constraint(i8** nocapture writeonly %0, i8** %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i32 0, i32 32
%6 = tail call i8* @vrna_extract_record_rest_structure(i8** %1, i32 0, i32 %5)
store i8* %6, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_12396() {
  Assert_real((isqrt(12396) == 111),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1540, ("Integer square root of 12396 should be 111"));
}


x86 assembly (clang, -O0):
<t_sqrt_12396>:
push   %rbp
mov    %rsp,%rbp
mov    $0x306c,%edi
call   1030 <isqrt@plt>
cmp    $0x6f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x604,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_12396>:
push   %rax
mov    $0x306c,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x6f,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x604,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 12396 should be 111\00"
define void @t_sqrt_12396() {
%1 = call i32 @isqrt(i32 12396)
%2 = icmp eq i32 %1, 111
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1540, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 12396 should be 111\00"
define void @t_sqrt_12396() {
%1 = tail call i32 @isqrt(i32 12396)
%2 = icmp eq i32 %1, 111
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1540, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float ReturnFloatFromLongDouble(long double ld) { return ld; }


x86 assembly (clang, -O0):
<ReturnFloatFromLongDouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstps  -0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnFloatFromLongDouble>:
fldt   0x8(%rsp)
fstps  -0x4(%rsp)
movss  -0x4(%rsp),%xmm0
ret

LLVM IR (-O0):
define float @ReturnFloatFromLongDouble(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to float
ret float %4
}

LLVM IR (-O2):
define float @ReturnFloatFromLongDouble(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to float
ret float %2
}
void delay(volatile unsigned int timeCount) {
  while (timeCount--)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1120 <delay+0x20>
jmp    1107 <delay+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
mov    %edi,-0x4(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
subl   $0x1,-0x4(%rsp)
jae    1110 <delay+0x10>
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i32, i32* %2
%5 = add i32 %4, -1
store volatile i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
%4 = load volatile i32, i32* %2
%5 = add i32 %4, -1
store volatile i32 %5, i32* %2
%6 = icmp eq i32 %4, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}
/* Variables and functions */
int rand();
unsigned short randomunsignedshort() {
  int val = rand() % 65536;
  val -= 327668;
  short sval = (short)val;
  return (unsigned short)sval;
}


x86 assembly (clang, -O0):
<randomunsignedshort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x4fff4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomunsignedshort>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
add    $0xc,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @randomunsignedshort() {
%1 = alloca i32
%2 = alloca i16
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 65536
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = sub nsw i32 %5, 327668
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = trunc i32 %7 to i16
store i16 %8, i16* %2
%9 = load i16, i16* %2
ret i16 %9
}

LLVM IR (-O2):
define zeroext i16 @randomunsignedshort() {
%1 = tail call i32 (...) @rand()
%2 = trunc i32 %1 to i16
%3 = add i16 %2, 12
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ outl(unsigned int, unsigned int);
int /*<<< orphan*/ udelay(int);
void v_EepromClock76(unsigned int dw_Address, unsigned int dw_RegisterValue) {
  outl(dw_RegisterValue & 0x6, dw_Address);
  udelay(100);
  outl(dw_RegisterValue | 0x1, dw_Address);
  udelay(100);
}


x86 assembly (clang, -O0):
<v_EepromClock76>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x6,%edi
mov    -0x4(%rbp),%esi
call   1030 <outl@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
mov    -0x8(%rbp),%edi
or     $0x1,%edi
mov    -0x4(%rbp),%esi
call   1030 <outl@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_EepromClock76>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
and    $0x6,%edi
mov    %ebp,%esi
call   1030 <outl@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
or     $0x1,%ebx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <outl@plt>
mov    $0x64,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <udelay@plt>

LLVM IR (-O0):
define void @v_EepromClock76(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 6
%7 = load i32, i32* %3
%8 = call i32 @outl(i32 %6, i32 %7)
%9 = call i32 @udelay(i32 100)
%10 = load i32, i32* %4
%11 = or i32 %10, 1
%12 = load i32, i32* %3
%13 = call i32 @outl(i32 %11, i32 %12)
%14 = call i32 @udelay(i32 100)
ret void
}

LLVM IR (-O2):
define void @v_EepromClock76(i32 %0, i32 %1) {
%3 = and i32 %1, 6
%4 = tail call i32 @outl(i32 %3, i32 %0)
%5 = tail call i32 @udelay(i32 100)
%6 = or i32 %1, 1
%7 = tail call i32 @outl(i32 %6, i32 %0)
%8 = tail call i32 @udelay(i32 100)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;
typedef int /*<<< orphan*/ uint16_t;
struct pkt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ pkt_put(struct pkt *, int);
uint16_t pkt_put_extract_u16(struct pkt *p) {
  uint16_t val;
  memcpy(&val, pkt_put(p, sizeof(val)), sizeof(val));
  return val;
}


x86 assembly (clang, -O0):
<pkt_put_extract_u16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <pkt_put@plt>
mov    %eax,%esi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkt_put_extract_u16>:
push   %rax
mov    $0x4,%esi
call   1040 <pkt_put@plt>
lea    0x4(%rsp),%rdi
mov    %eax,%esi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pkt = type { i32 }
define i32 @pkt_put_extract_u16(%struct.pkt* %0) {
%2 = alloca %struct.pkt*
%3 = alloca i32
store %struct.pkt* %0, %struct.pkt** %2
%4 = load %struct.pkt*, %struct.pkt** %2
%5 = call i32 @pkt_put(%struct.pkt* %4, i32 4)
%6 = call i32 @memcpy(i32* %3, i32 %5, i32 4)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
%struct.pkt = type { i32 }
define i32 @pkt_put_extract_u16(%struct.pkt* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @pkt_put(%struct.pkt* %0, i32 4)
%5 = call i32 @memcpy(i32* %2, i32 %4, i32 4)
%6 = load i32, i32* %2
ret i32 %6
}
int f(int *r) {
  r[1] = 0;
  r[2] = 1;
  return r[1];
}


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

x86 assembly (clang, -O2):
<f>:
movabs $0x100000000,%rax
mov    %rax,0x4(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32 0, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 2
store i32 1, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 0, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 2
store i32 1, i32* %3
ret i32 0
}
int test_jnxthread() {
  jnx_log(0,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/"
          "unit/test_jnxthread.c",
          __FUNCTION__, 69, "Running jnx_threading tests\n");
  ;
  test_queue_push();
  return 0;
}


x86 assembly (clang, -O0):
<test_jnxthread>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xed3(%rip),%rsi
lea    0xf66(%rip),%rdx
mov    $0x45,%ecx
lea    0xf69(%rip),%r8
mov    $0x0,%al
call   1030 <jnx_log@plt>
mov    $0x0,%al
call   1040 <test_queue_push@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_jnxthread>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0xf6b(%rip),%rdx
lea    0xf73(%rip),%r8
xor    %edi,%edi
mov    $0x45,%ecx
xor    %eax,%eax
call   1030 <jnx_log@plt>
xor    %eax,%eax
call   1040 <test_queue_push@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/unit/test_jnxthread.c\00"
@__FUNCTION__.test_jnxthread = [15 x i8] c"test_jnxthread\00"
@.str.1 = [29 x i8] c"Running jnx_threading tests\0A\00"
define i32 @test_jnxthread() {
%1 = call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_jnxthread, i64 0, i64 0), i32 69, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (...) @test_queue_push()
ret i32 0
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AlexsJones/jnxlibc/refs/heads/master/test/unit/test_jnxthread.c\00"
@__FUNCTION__.test_jnxthread = [15 x i8] c"test_jnxthread\00"
@.str.1 = [29 x i8] c"Running jnx_threading tests\0A\00"
define i32 @test_jnxthread() {
%1 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @jnx_log to i32 (i32, i8*, i8*, i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__FUNCTION__.test_jnxthread, i64 0, i64 0), i32 69, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @test_queue_push()
ret i32 0
}
/* Type definitions */
struct http_header_list {
  int dummy;
};
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ http_header_add(struct http_header_list *, char const *,
                                   char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void http_header_add_int(struct http_header_list *headers, const char *key,
                         int value) {
  char str[20];
  snprintf(str, sizeof(str), "%d", value);
  http_header_add(headers, key, str);
}


x86 assembly (clang, -O0):
<http_header_add_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    $0x14,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <http_header_add@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_header_add_int>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edx,%ecx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xec8(%rip),%rdx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x14,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <http_header_add@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.http_header_list = type { i32 }
@.str = [3 x i8] c"%d\00"
define void @http_header_add_int(%struct.http_header_list* %0, i8* %1, i32 %2) {
%4 = alloca %struct.http_header_list*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [20 x i8]
store %struct.http_header_list* %0, %struct.http_header_list** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 @snprintf(i8* %8, i32 20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load %struct.http_header_list*, %struct.http_header_list** %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%14 = call i32 @http_header_add(%struct.http_header_list* %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.http_header_list = type { i32 }
@.str = [3 x i8] c"%d\00"
define void @http_header_add_int(%struct.http_header_list* %0, i8* %1, i32 %2) {
%4 = alloca [20 x i8]
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 @http_header_add(%struct.http_header_list* %0, i8* %1, i8* %5)
ret void
}