xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ plat_putc(int /*<<< orphan*/);
void xputs(const char *str) {
  while (*str)
    plat_putc(*str++);
}


x86 assembly (clang, -O0):
<xputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <xputs+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <plat_putc@plt>
jmp    111c <xputs+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xputs>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <xputs+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <plat_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <xputs+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @xputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @plat_putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int isPerfact(long long n, long long d) {
  long long ans;
  ans = n / d;
  if (n == ans * d)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isPerfact>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
imul   -0x18(%rbp),%rcx
cmp    %rcx,%rax
jne    113c <isPerfact+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1143 <isPerfact+0x43>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPerfact>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1116 <isPerfact+0x16>
cqto
idiv   %rsi
jmp    111a <isPerfact+0x1a>
xor    %edx,%edx
div    %esi
xor    %eax,%eax
test   %rdx,%rdx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @isPerfact(i64 %0, i64 %1) {
%3 = srem i64 %0, %1
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef unsigned int uint32_t;
typedef unsigned int n;

/* Variables and functions */
void bitmap_clear(uint32_t *bitmap, size_t n) {
  bitmap[((n) >> 5)] &= ~(1U << (31 - ((n)&31)));
}


x86 assembly (clang, -O0):
<bitmap_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
mov    $0x1f,%eax
sub    %rcx,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x5,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_clear>:
mov    %esi,%ecx
not    %cl
mov    $0xfffffffe,%eax
rol    %cl,%eax
shr    $0x5,%rsi
and    %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @bitmap_clear(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 31
%7 = sub i64 31, %6
%8 = trunc i64 %7 to i32
%9 = shl i32 1, %8
%10 = xor i32 %9, -1
%11 = load i32*, i32** %3
%12 = load i64, i64* %4
%13 = lshr i64 %12, 5
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = and i32 %15, %10
store i32 %16, i32* %14
ret void
}

LLVM IR (-O2):
define void @bitmap_clear(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 31
%5 = xor i32 %4, 31
%6 = shl nuw i32 1, %5
%7 = xor i32 %6, -1
%8 = lshr i64 %1, 5
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = and i32 %10, %7
store i32 %11, i32* %9
ret void
}
/* Variables and functions */
int om_gps_power_swap(int);
int om_gps_power_set(int value) {
  int res = om_gps_power_swap(value);
  if (res < 0)
    return res;
  return 0;
}


x86 assembly (clang, -O0):
<om_gps_power_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <om_gps_power_swap@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    113b <om_gps_power_set+0x2b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1142 <om_gps_power_set+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_gps_power_set>:
push   %rax
call   1030 <om_gps_power_swap@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @om_gps_power_set(i32 %0) {
%2 = tail call i32 @om_gps_power_swap(i32 %0)
%3 = icmp slt i32 %2, 0
%4 = select i1 %3, i32 %2, i32 0
ret i32 %4
}
void gtk_color_selection_get_has_palette() {}


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

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

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

LLVM IR (-O2):
define void @gtk_color_selection_get_has_palette() {
ret void
}
int reverseNumber(int n) {
  int ans = 0;
  while (n != 0) {
    ans *= 10;
    ans += n % 10;
    n /= 10;
  }
  return ans;
}


x86 assembly (clang, -O0):
<reverseNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1143 <reverseNumber+0x43>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <reverseNumber+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseNumber>:
xor    %eax,%eax
test   %edi,%edi
je     113f <reverseNumber+0x3f>
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
lea    (%rsi,%rax,2),%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <reverseNumber+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverseNumber(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = srem i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = sdiv i32 %5, 10
%10 = add i32 %5, 9
%11 = icmp ult i32 %10, 19
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(long *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void write_key_size(long int *size) {
  fwrite(size, sizeof(long int), 1, stderr);
}


x86 assembly (clang, -O0):
<write_key_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%ecx
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_key_size>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    $0x8,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @write_key_size(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fwrite(i64* %3, i32 8, i32 1, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @write_key_size(i64* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fwrite(i64* %0, i32 8, i32 1, i32 %2)
ret void
}
void set_ufuk_param(double *a, double *b) {
  *a = 1.0;
  *b = 1.0;
}


x86 assembly (clang, -O0):
<set_ufuk_param>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ufuk_param>:
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rdi)
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @set_ufuk_param(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
store double 1.000000e+00, double* %5
%6 = load double*, double** %4
store double 1.000000e+00, double* %6
ret void
}

LLVM IR (-O2):
define void @set_ufuk_param(double* nocapture writeonly %0, double* nocapture writeonly %1) {
store double 1.000000e+00, double* %0
store double 1.000000e+00, double* %1
ret void
}
float fdividef(float __a, float __b) { return __a / __b; }


x86 assembly (clang, -O0):
<fdividef>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdividef>:
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fdividef(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @fdividef(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ cov_spec_log(double, int /*<<< orphan*/, char *);
double foo(double, double);
int main(int argc, char *argv[]) {
  double a = 2;
  double b = 3;
  double c = foo(a + b, a);
  cov_spec_log(c, 0, argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <foo@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
xor    %edi,%edi
call   1040 <cov_spec_log@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
call   1030 <foo@plt>
mov    0x8(%rbx),%rsi
xor    %edi,%edi
call   1040 <cov_spec_log@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 2.000000e+00, double* %6
store double 3.000000e+00, double* %7
%9 = load double, double* %6
%10 = load double, double* %7
%11 = fadd double %9, %10
%12 = load double, double* %6
%13 = call double @foo(double %11, double %12)
store double %13, double* %8
%14 = load double, double* %8
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @cov_spec_log(double %14, i32 0, i8* %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call double @foo(double 5.000000e+00, double 2.000000e+00)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @cov_spec_log(double %3, i32 0, i8* %5)
ret i32 0
}
double Sleef_sin_u10(double x) { return __builtin_sin(x); }


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

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

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

LLVM IR (-O2):
define double @Sleef_sin_u10(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int i;
  printf("input: ");
  scanf("%d", &i);
  printf("output: %d\n", i);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"input: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"output: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x5a() {
  Assert_real((isupper(90)),
              "/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/ctype/test_isupper.c",
              455, ("isupper should be 1 for Z"));
}


x86 assembly (clang, -O0):
<t_isupper_0x5a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5a,%edi
call   1030 <isupper@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1c7,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x5a>:
push   %rax
mov    $0x5a,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1c7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for Z\00"
define void @t_isupper_0x5a() {
%1 = call i32 @isupper(i32 90)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for Z\00"
define void @t_isupper_0x5a() {
%1 = tail call i32 @isupper(i32 90)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct FormaGeometrica {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void disegnati_Quadrato(const struct FormaGeometrica *buttalo) {
  printf("disegno un quadrato\n");
}


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

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

LLVM IR (-O0):
%struct.FormaGeometrica = type { i32 }
@.str = [21 x i8] c"disegno un quadrato\0A\00"
define void @disegnati_Quadrato(%struct.FormaGeometrica* %0) {
%2 = alloca %struct.FormaGeometrica*
store %struct.FormaGeometrica* %0, %struct.FormaGeometrica** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.FormaGeometrica = type { i32 }
@str = [20 x i8] c"disegno un quadrato\00"
define void @disegnati_Quadrato(%struct.FormaGeometrica* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetDefault() {
  printf("XGetDefault called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"XGetDefault called\0A\00"
define i32 @XGetDefault() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"XGetDefault called\00"
define i32 @XGetDefault() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int close(int);
int jk_close_socket(int s) {
  if (-1 != s) {
    return close(s);
  }
  return -1;
}


x86 assembly (clang, -O0):
<jk_close_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0xffffffff,%eax
cmp    -0x8(%rbp),%eax
je     1139 <jk_close_socket+0x29>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x4(%rbp)
jmp    1140 <jk_close_socket+0x30>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jk_close_socket>:
cmp    $0xffffffff,%edi
je     111a <jk_close_socket+0xa>
jmp    1030 <close@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @jk_close_socket(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ i2c_write(int, unsigned char *, int);
void at24cxx_write(unsigned char address, unsigned char data) {
  unsigned char val[2];
  val[0] = address;
  val[1] = data;
  i2c_write(0xA0, val, 2);
}


x86 assembly (clang, -O0):
<at24cxx_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x4(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
lea    -0x4(%rbp),%rsi
mov    $0xa0,%edi
mov    $0x2,%edx
call   1030 <i2c_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<at24cxx_write>:
push   %rax
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rsi
mov    $0xa0,%edi
mov    $0x2,%edx
call   1030 <i2c_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @at24cxx_write(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [2 x i8]
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %6, i8* %7
%8 = load i8, i8* %4
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %8, i8* %9
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%11 = call i32 @i2c_write(i32 160, i8* %10, i32 2)
ret void
}

LLVM IR (-O2):
define void @at24cxx_write(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %1, i8* %5
%6 = call i32 @i2c_write(i32 160, i8* %4, i32 2)
ret void
}
void CtpForwardingEngineP$0$CtpInfo$triggerRouteUpdate(void) {
  CtpRoutingEngineP$0$CtpInfo$triggerRouteUpdate();
}


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

x86 assembly (clang, -O2):
<CtpForwardingEngineP$0$CtpInfo$triggerRouteUpdate>:
xor    %eax,%eax
jmp    1030 <CtpRoutingEngineP$0$CtpInfo$triggerRouteUpdate@plt>

LLVM IR (-O0):
define void @"CtpForwardingEngineP$0$CtpInfo$triggerRouteUpdate"() {
%1 = call i32 (...) @"CtpRoutingEngineP$0$CtpInfo$triggerRouteUpdate"()
ret void
}

LLVM IR (-O2):
define void @"CtpForwardingEngineP$0$CtpInfo$triggerRouteUpdate"() {
%1 = tail call i32 (...) @"CtpRoutingEngineP$0$CtpInfo$triggerRouteUpdate"()
ret void
}
/* Type definitions */
struct l_compiler_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct l_compiler_t *);
void l_compiler_del(struct l_compiler_t *compiler) { free(compiler); }


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

x86 assembly (clang, -O2):
<l_compiler_del>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.l_compiler_t = type { i32 }
define void @l_compiler_del(%struct.l_compiler_t* %0) {
%2 = alloca %struct.l_compiler_t*
store %struct.l_compiler_t* %0, %struct.l_compiler_t** %2
%3 = load %struct.l_compiler_t*, %struct.l_compiler_t** %2
%4 = call i32 @free(%struct.l_compiler_t* %3)
ret void
}

LLVM IR (-O2):
%struct.l_compiler_t = type { i32 }
define void @l_compiler_del(%struct.l_compiler_t* nocapture %0) {
%2 = tail call i32 @free(%struct.l_compiler_t* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_breadcrumb();
int /*<<< orphan*/ destroy_breadcrumb(int /*<<< orphan*/);
void can_destroy_empty_breadcrumb() { destroy_breadcrumb(create_breadcrumb()); }


x86 assembly (clang, -O0):
<can_destroy_empty_breadcrumb>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <create_breadcrumb@plt>
mov    %eax,%edi
call   1040 <destroy_breadcrumb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_destroy_empty_breadcrumb>:
push   %rax
xor    %eax,%eax
call   1030 <create_breadcrumb@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <destroy_breadcrumb@plt>

LLVM IR (-O0):
define void @can_destroy_empty_breadcrumb() {
%1 = call i32 (...) @create_breadcrumb()
%2 = call i32 @destroy_breadcrumb(i32 %1)
ret void
}

LLVM IR (-O2):
define void @can_destroy_empty_breadcrumb() {
%1 = tail call i32 (...) @create_breadcrumb()
%2 = tail call i32 @destroy_breadcrumb(i32 %1)
ret void
}
void gtk_size_group_set_mode() {}


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

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

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

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

/* Variables and functions */
void USBHostEndpointDataAck(uint32_t ui32Base, uint32_t ui32Endpoint) {
  ;

  ;
  if (ui32Endpoint == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x00000102))) &= ~0x00000001;
  } else {
    (*((volatile uint8_t *)(ui32Base + 0x00000116 + (ui32Endpoint - 0x10)))) &=
        ~(0x00000001);
  }
}


x86 assembly (clang, -O0):
<USBHostEndpointDataAck>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112a <USBHostEndpointDataAck+0x2a>
mov    -0x4(%rbp),%eax
add    $0x102,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
jmp    1143 <USBHostEndpointDataAck+0x43>
mov    -0x4(%rbp),%eax
add    $0x116,%eax
mov    -0x8(%rbp),%ecx
sub    $0x10,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostEndpointDataAck>:
lea    0x102(%rdi),%eax
test   %esi,%esi
lea    0x106(%rdi,%rsi,1),%ecx
cmove  %eax,%ecx
movslq %ecx,%rax
andl   $0xfffffffe,(%rax)
ret

LLVM IR (-O0):
define void @USBHostEndpointDataAck(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 = icmp eq i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 258
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, -2
store volatile i32 %13, i32* %11
br label %24
14: ; preds = %2
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 278
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 16
%19 = add nsw i32 %16, %18
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = and i32 %22, -2
store volatile i32 %23, i32* %21
br label %24
24: ; preds = %14, %7
ret void
}

LLVM IR (-O2):
define void @USBHostEndpointDataAck(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = add i32 %0, 262
%5 = add i32 %4, %1
%6 = add nsw i32 %0, 258
%7 = select i1 %3, i32 %6, i32 %5
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, -2
store volatile i32 %11, i32* %9
ret void
}
void av_frame_get_side_data() {}


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

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

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

LLVM IR (-O2):
define void @av_frame_get_side_data() {
ret void
}
/* Variables and functions */
int foo(int);
int main() { return foo(0x8000fffe); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8000fffe,%edi
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x8000fffe,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 -2147418114)
ret i32 %1
}
void foo686() {}


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

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

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

LLVM IR (-O2):
define void @foo686() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FINA_End();
scalar_t__ FINA_Init(int, char **);
scalar_t__ FINA_Tick();
int main(int argc, char **argv) {
  if (0 == FINA_Init(argc, argv))
    while (0 == FINA_Tick())
      ;
  FINA_End();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <FINA_Init@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1184 <main+0x54>
jmp    1165 <main+0x35>
mov    $0x0,%al
call   1040 <FINA_Tick@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    117f <main+0x4f>
jmp    1165 <main+0x35>
jmp    1184 <main+0x54>
mov    $0x0,%al
call   1050 <FINA_End@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <FINA_Init@plt>
test   %rax,%rax
jne    114c <main+0x1c>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <FINA_Tick@plt>
test   %rax,%rax
je     1140 <main+0x10>
xor    %eax,%eax
call   1050 <FINA_End@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @FINA_Init(i32 %6, i8** %7)
%9 = icmp eq i64 0, %8
br i1 %9, label %10, label %16
10: ; preds = %2
br label %11
11: ; preds = %14, %10
%12 = call i64 (...) @FINA_Tick()
%13 = icmp eq i64 0, %12
br i1 %13, label %14, label %15
14: ; preds = %11
br label %11
15: ; preds = %11
br label %16
16: ; preds = %15, %2
%17 = call i32 (...) @FINA_End()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @FINA_Init(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2, %5
%6 = tail call i64 (...) @FINA_Tick()
%7 = icmp eq i64 %6, 0
br i1 %7, label %5, label %8
8: ; preds = %5, %2
%9 = tail call i32 (...) @FINA_End()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ esc_prn(char *);
int help_rlogin(int argc, char **argv) {
  esc_prn(
      "\n{Hrlogin} [{Uip}] {Uport}\n"
      "  Telnet to {Uport} at {Uip} (default 127.0.0.1) relative to host PC. \n"
      "  To attach to the console of a virtual router running on port 2000 of "
      "this\n"
      "  host PC, use {Hrlogin 2000}\n"
      "  To telnet to the port 2004 of a remote host 10.1.1.1, use\n"
      "  {Hrlogin 10.1.1.1 2004}\n");
  return 1;
}


x86 assembly (clang, -O0):
<help_rlogin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <esc_prn@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_rlogin>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <esc_prn@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [291 x i8] c"\0A{Hrlogin} [{Uip}] {Uport}\0A Telnet to {Uport} at {Uip} (default 127.0.0.1) relative to host PC. \0A To attach to the console of a virtual router running on port 2000 of this\0A host PC, use {Hrlogin 2000}\0A To telnet to the port 2004 of a remote host 10.1.1.1, use\0A {Hrlogin 10.1.1.1 2004}\0A\00"
define i32 @help_rlogin(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @esc_prn(i8* getelementptr inbounds ([291 x i8], [291 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [291 x i8] c"\0A{Hrlogin} [{Uip}] {Uport}\0A Telnet to {Uport} at {Uip} (default 127.0.0.1) relative to host PC. \0A To attach to the console of a virtual router running on port 2000 of this\0A host PC, use {Hrlogin 2000}\0A To telnet to the port 2004 of a remote host 10.1.1.1, use\0A {Hrlogin 10.1.1.1 2004}\0A\00"
define i32 @help_rlogin(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @esc_prn(i8* getelementptr inbounds ([291 x i8], [291 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glGetLightfv_size(int /*<<< orphan*/);
GLint __glGetLightiv_size(GLenum pname) { return __glGetLightfv_size(pname); }


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

x86 assembly (clang, -O2):
<__glGetLightiv_size>:
jmp    1030 <__glGetLightfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glGetLightiv_size(i32 %0) {
%2 = tail call i32 @__glGetLightfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void example() { printf("Example\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Example\0A\00"
define void @example() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"Example\00"
define void @example() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int vul(char *content, int len) {
  char buffer[16];
  memcpy(buffer, content, len);
  return 0;
}


x86 assembly (clang, -O0):
<vul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vul>:
sub    $0x18,%rsp
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @vul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [16 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @memcpy(i8* %6, i8* %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @vul(i8* %0, i32 %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @memcpy(i8* %4, i8* %0, i32 %1)
ret i32 0
}
void maildir_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @maildir_cleanup() {
ret void
}
/* Variables and functions */
int delete_obstacle(long *);
int delete_Obs(long obs[2 * 10 + 1]) { return (delete_obstacle(obs)); }


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

x86 assembly (clang, -O2):
<delete_Obs>:
jmp    1030 <delete_obstacle@plt>

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

LLVM IR (-O2):
define i32 @delete_Obs(i64* %0) {
%2 = tail call i32 @delete_obstacle(i64* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t L_negate(int32_t L_var1) {
  int32_t L_var_out;
  L_var_out = (L_var1 == (int32_t)0x80000000L) ? (int32_t)0x7fffffffL : -L_var1;
  return (L_var_out);
}


x86 assembly (clang, -O0):
<L_negate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x80000000,-0x4(%rbp)
jne    1121 <L_negate+0x21>
mov    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <L_negate+0x29>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<L_negate>:
mov    %edi,%ecx
neg    %ecx
cmp    $0x80000000,%edi
mov    $0x7fffffff,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @L_negate(i32 %0) {
%2 = icmp eq i32 %0, -2147483648
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 2147483647, i32 %3
ret i32 %4
}
/* Type definitions */
struct dc {
  int dummy;
};

/* Variables and functions */
int dc_pop(struct dc *);
int /*<<< orphan*/ dc_push(struct dc *, int);
void dcf_swap(struct dc *dc, char *cmd) {
  int v0 = dc_pop(dc);
  int v1 = dc_pop(dc);
  dc_push(dc, v0);
  dc_push(dc, v1);
}


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

x86 assembly (clang, -O2):
<dcf_swap>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1040 <dc_pop@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1040 <dc_pop@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <dc_push@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <dc_push@plt>

LLVM IR (-O0):
%struct.dc = type { i32 }
define void @dcf_swap(%struct.dc* %0, i8* %1) {
%3 = alloca %struct.dc*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store %struct.dc* %0, %struct.dc** %3
store i8* %1, i8** %4
%7 = load %struct.dc*, %struct.dc** %3
%8 = call i32 @dc_pop(%struct.dc* %7)
store i32 %8, i32* %5
%9 = load %struct.dc*, %struct.dc** %3
%10 = call i32 @dc_pop(%struct.dc* %9)
store i32 %10, i32* %6
%11 = load %struct.dc*, %struct.dc** %3
%12 = load i32, i32* %5
%13 = call i32 @dc_push(%struct.dc* %11, i32 %12)
%14 = load %struct.dc*, %struct.dc** %3
%15 = load i32, i32* %6
%16 = call i32 @dc_push(%struct.dc* %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.dc = type { i32 }
define void @dcf_swap(%struct.dc* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @dc_pop(%struct.dc* %0)
%4 = tail call i32 @dc_pop(%struct.dc* %0)
%5 = tail call i32 @dc_push(%struct.dc* %0, i32 %3)
%6 = tail call i32 @dc_push(%struct.dc* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("messip-mgr [-p] [-l]\n");
  printf("-p port : TCP port used between the library and the manager\n");
  printf("-l n    : logging value\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf11(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"messip-mgr [-p] [-l]\0A\00"
@.str.1 = [61 x i8] c"-p port : TCP port used between the library and the manager\0A\00"
@.str.2 = [25 x i8] c"-l n : logging value\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [21 x i8] c"messip-mgr [-p] [-l]\00"
@str.3 = [60 x i8] c"-p port : TCP port used between the library and the manager\00"
@str.4 = [24 x i8] c"-l n : logging value\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
int test_03(int a) { return ((a >> 1) & 0x7FFFFFFF) | (a << 31); }


x86 assembly (clang, -O0):
<test_03>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x7fffffff,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_03>:
mov    %edi,%eax
ror    %eax
ret

LLVM IR (-O0):
define i32 @test_03(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = and i32 %4, 2147483647
%6 = load i32, i32* %2
%7 = shl i32 %6, 31
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_03(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stdout;
void tracer_contextid(void *t, unsigned int contextid) {
  fprintf(stdout, "context ID sets to 0x%x\n", contextid);
}


x86 assembly (clang, -O0):
<tracer_contextid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracer_contextid>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [25 x i8] c"context ID sets to 0x%x\0A\00"
define void @tracer_contextid(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [25 x i8] c"context ID sets to 0x%x\0A\00"
define void @tracer_contextid(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void cli(void) { asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @cli() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
bool timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout) {
  return timestamp + timeout <= curtime;
}


x86 assembly (clang, -O0):
<timed_out>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timed_out>:
add    %rdx,%rdi
xor    %eax,%eax
cmp    %rsi,%rdi
setle  %al
ret

LLVM IR (-O0):
define i32 @timed_out(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %6
%9 = add nsw i64 %7, %8
%10 = load i64, i64* %5
%11 = icmp sle i64 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @timed_out(i64 %0, i64 %1, i64 %2) {
%4 = add nsw i64 %2, %0
%5 = icmp sle i64 %4, %1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct zz_dict {
  int dummy;
};

/* Variables and functions */
struct zz_dict *zz_dict_delete(struct zz_dict *, char *);
int /*<<< orphan*/ zz_dict_destroy(struct zz_dict *);
void empty_dict(void) {
  struct zz_dict *dict;
  dict = NULL;
  dict = zz_dict_delete(dict, "Hello, World!");
  zz_dict_destroy(dict);
}


x86 assembly (clang, -O0):
<empty_dict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <zz_dict_delete@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <zz_dict_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_dict>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
call   1040 <zz_dict_delete@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <zz_dict_destroy@plt>

LLVM IR (-O0):
%struct.zz_dict = type { i32 }
@.str = [14 x i8] c"Hello, World!\00"
define void @empty_dict() {
%1 = alloca %struct.zz_dict*
store %struct.zz_dict* null, %struct.zz_dict** %1
%2 = load %struct.zz_dict*, %struct.zz_dict** %1
%3 = call %struct.zz_dict* @zz_dict_delete(%struct.zz_dict* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store %struct.zz_dict* %3, %struct.zz_dict** %1
%4 = load %struct.zz_dict*, %struct.zz_dict** %1
%5 = call i32 @zz_dict_destroy(%struct.zz_dict* %4)
ret void
}

LLVM IR (-O2):
%struct.zz_dict = type { i32 }
@.str = [14 x i8] c"Hello, World!\00"
define void @empty_dict() {
%1 = tail call %struct.zz_dict* @zz_dict_delete(%struct.zz_dict* null, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @zz_dict_destroy(%struct.zz_dict* %1)
ret void
}