xunge/DecIR huggingface dataset:
/* Variables and functions */
int cube_by_value(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int number = 5;
  printf("The original value of number is %d\n", number);
  number = cube_by_value(number);
  printf("The new value of number is %d\n", number);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"The original value of number is %d\0A\00"
@.str.1 = [31 x i8] c"The new value of number is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @cube_by_value(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"The original value of number is %d\0A\00"
@.str.1 = [31 x i8] c"The new value of number is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @cube_by_value(i32 5)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
int test_imm_65int8_mem(signed char *val) {
  return ((*val) & (-0x65 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_65int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff9b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_65int8_mem>:
testb  $0x9b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_65int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -101
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_65int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -101
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int i;
  if (s && f) {
    i = 0;
    while (s[i]) {
      f(i, &(s[i]));
      i++;
    }
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1164 <ft_striteri+0x64>
cmpq   $0x0,-0x10(%rbp)
je     1164 <ft_striteri+0x64>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     115f <ft_striteri+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <ft_striteri+0x2d>
jmp    1164 <ft_striteri+0x64>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1133 <ft_striteri+0x33>
mov    %rsi,%r14
test   %rsi,%rsi
je     1133 <ft_striteri+0x33>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1133 <ft_striteri+0x33>
xor    %ebx,%ebx
mov    %r15,%rsi
nop
mov    %ebx,%edi
call   *%r14
add    $0x1,%ebx
lea    (%r15,%rbx,1),%rsi
cmpb   $0x0,(%r15,%rbx,1)
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = alloca i8*
%4 = alloca void (i32, i8*)*
%5 = alloca i32
store i8* %0, i8** %3
store void (i32, i8*)* %1, void (i32, i8*)** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %29
8: ; preds = %2
%9 = load void (i32, i8*)*, void (i32, i8*)** %4
%10 = icmp ne void (i32, i8*)* %9, null
br i1 %10, label %11, label %29
11: ; preds = %8
store i32 0, i32* %5
br label %12
12: ; preds = %19, %11
%13 = load i8*, i8** %3
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = icmp ne i8 %17, 0
br i1 %18, label %19, label %28
19: ; preds = %12
%20 = load void (i32, i8*)*, void (i32, i8*)** %4
%21 = load i32, i32* %5
%22 = load i8*, i8** %3
%23 = load i32, i32* %5
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i32, i32* %5
%27 = add i32 %26, 1
store i32 %27, i32* %5
br label %12
28: ; preds = %12
br label %29
29: ; preds = %28, %8, %2
ret void
}

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i32, i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %6, %9
%10 = phi i8* [ %14, %9 ], [ %0, %6 ]
%11 = phi i32 [ %12, %9 ], [ 0, %6 ]
tail call void %1(i32 %11, i8* %10)
%12 = add i32 %11, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %6, %2
ret void
}
float add1(float n) { return n + 1.0; }


x86 assembly (clang, -O0):
<add1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add1>:
addss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @add1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fadd double %4, 1.000000e+00
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @add1(float %0) {
%2 = fadd float %0, 1.000000e+00
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ test_board_add_player();
int /*<<< orphan*/ test_board_get_player_cells();
int /*<<< orphan*/ test_free_board();
int /*<<< orphan*/ test_init_board();
void testboard(void) {
  test_init_board();
  test_free_board();
  test_board_add_player();
  test_board_get_player_cells();
}


x86 assembly (clang, -O0):
<testboard>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_init_board@plt>
mov    $0x0,%al
call   1040 <test_free_board@plt>
mov    $0x0,%al
call   1060 <test_board_add_player@plt>
mov    $0x0,%al
call   1050 <test_board_get_player_cells@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testboard>:
push   %rax
xor    %eax,%eax
call   1030 <test_init_board@plt>
xor    %eax,%eax
call   1040 <test_free_board@plt>
xor    %eax,%eax
call   1060 <test_board_add_player@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_board_get_player_cells@plt>

LLVM IR (-O0):
define void @testboard() {
%1 = call i32 (...) @test_init_board()
%2 = call i32 (...) @test_free_board()
%3 = call i32 (...) @test_board_add_player()
%4 = call i32 (...) @test_board_get_player_cells()
ret void
}

LLVM IR (-O2):
define void @testboard() {
%1 = tail call i32 (...) @test_init_board()
%2 = tail call i32 (...) @test_free_board()
%3 = tail call i32 (...) @test_board_add_player()
%4 = tail call i32 (...) @test_board_get_player_cells()
ret void
}
double GLMinF(double x, double y) { return ((x < y) ? x : y); }


x86 assembly (clang, -O0):
<GLMinF>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <GLMinF+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <GLMinF+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLMinF>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @GLMinF(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
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @GLMinF(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
double floor(double);
void rnd_second(double *t) {
  *t = floor(*t * (24.0 * 3600.0) + 0.5) / (24.0 * 3600.0);
}


x86 assembly (clang, -O0):
<rnd_second>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed0(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <floor@plt>
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_second>:
push   %rbx
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
mulsd  0xee0(%rip),%xmm0
addsd  0xee0(%rip),%xmm0
call   1030 <floor@plt>
divsd  0xecb(%rip),%xmm0
movsd  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @rnd_second(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = call double @llvm.fmuladd.f64(double %4, double 8.640000e+04, double 5.000000e-01)
%6 = call double @llvm.floor.f64(double %5)
%7 = fdiv double %6, 8.640000e+04
%8 = load double*, double** %2
store double %7, double* %8
ret void
}

LLVM IR (-O2):
define void @rnd_second(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double 8.640000e+04, double 5.000000e-01)
%4 = tail call double @llvm.floor.f64(double %3)
%5 = fdiv double %4, 8.640000e+04
store double %5, double* %0
ret void
}
int find_char(char ch, char *beg, char *end) {
  while (beg < end)
    if (*beg == ch)
      return 1;
    else
      beg++;
  return 0;
}


x86 assembly (clang, -O0):
<find_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1150 <find_char+0x50>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    113f <find_char+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1157 <find_char+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1112 <find_char+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_char>:
xor    %eax,%eax
cmp    %rdx,%rsi
jae    1127 <find_char+0x27>
sub    %rsi,%rdx
xor    %eax,%eax
nopl   0x0(%rax)
cmp    %dil,(%rsi,%rax,1)
je     1122 <find_char+0x22>
add    $0x1,%rax
cmp    %rax,%rdx
jne    1110 <find_char+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @find_char(i8 signext %0, i8* %1, i8* readnone %2) {
%4 = icmp ult i8* %1, %2
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = ptrtoint i8* %2 to i64
%7 = ptrtoint i8* %1 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %1, i64 %8
br label %12
10: ; preds = %12
%11 = icmp eq i8* %16, %9
br i1 %11, label %17, label %12
12: ; preds = %5, %10
%13 = phi i8* [ %16, %10 ], [ %1, %5 ]
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, %0
%16 = getelementptr inbounds i8, i8* %13, i64 1
br i1 %15, label %17, label %10
17: ; preds = %12, %10, %3
%18 = phi i32 [ 0, %3 ], [ 0, %10 ], [ 1, %12 ]
ret i32 %18
}
void cond_neural_update(const struct XCSF *xcsf, const struct Cl *c,
                        const double *x, const double *y) {
  (void)xcsf;
  (void)c;
  (void)x;
  (void)y;
}


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

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @cond_neural_update(%struct.XCSF* %0, %struct.Cl* %1, double* %2, double* %3) {
%5 = alloca %struct.XCSF*
%6 = alloca %struct.Cl*
%7 = alloca double*
%8 = alloca double*
store %struct.XCSF* %0, %struct.XCSF** %5
store %struct.Cl* %1, %struct.Cl** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load %struct.XCSF*, %struct.XCSF** %5
%10 = load %struct.Cl*, %struct.Cl** %6
%11 = load double*, double** %7
%12 = load double*, double** %8
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @cond_neural_update(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1, double* nocapture %2, double* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xb0() {
  Assert_real((iscntrl(176) == 0),
              "/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_iscntrl.c",
              885, ("iscntrl should be 0 for 0xb0"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xb0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x375,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xb0>:
push   %rax
mov    $0xb0,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x375,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xb0\00"
define void @t_iscntrl_0xb0() {
%1 = call i64 @iscntrl(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([29 x i8], [29 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xb0\00"
define void @t_iscntrl_0xb0() {
%1 = tail call i64 @iscntrl(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void apply_Hx_tfsf(int i) {}


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

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

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

LLVM IR (-O2):
define void @apply_Hx_tfsf(i32 %0) {
ret void
}
const char *_dl_load_cache_lookup(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @_dl_load_cache_lookup(i8* nocapture readnone %0) {
ret i8* null
}
/* Type definitions */
typedef int u_int32_t;
typedef scalar_t__ u_char;

/* Variables and functions */
u_int32_t get_u32(const void *vp) {
  const u_char *p = (const u_char *)vp;
  u_int32_t v;
  v = (u_int32_t)p[0] << 24;
  v |= (u_int32_t)p[1] << 16;
  v |= (u_int32_t)p[2] << 8;
  v |= (u_int32_t)p[3];
  return (v);
}


x86 assembly (clang, -O0):
<get_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x10,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
shl    $0x8,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_u32>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_u32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i64*
store i64* %6, i64** %3
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 24
store i32 %11, i32* %4
%12 = load i64*, i64** %3
%13 = getelementptr inbounds i64, i64* %12, i64 1
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = shl i32 %15, 16
%17 = load i32, i32* %4
%18 = or i32 %17, %16
store i32 %18, i32* %4
%19 = load i64*, i64** %3
%20 = getelementptr inbounds i64, i64* %19, i64 2
%21 = load i64, i64* %20
%22 = trunc i64 %21 to i32
%23 = shl i32 %22, 8
%24 = load i32, i32* %4
%25 = or i32 %24, %23
store i32 %25, i32* %4
%26 = load i64*, i64** %3
%27 = getelementptr inbounds i64, i64* %26, i64 3
%28 = load i64, i64* %27
%29 = trunc i64 %28 to i32
%30 = load i32, i32* %4
%31 = or i32 %30, %29
store i32 %31, i32* %4
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @get_u32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 16
%11 = or i32 %10, %5
%12 = getelementptr inbounds i8, i8* %0, i64 16
%13 = bitcast i8* %12 to i64*
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = shl i32 %15, 8
%17 = or i32 %11, %16
%18 = getelementptr inbounds i8, i8* %0, i64 24
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
%22 = or i32 %17, %21
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ handle_45(int /*<<< orphan*/);
int gen_45() {
  handle_45(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_45>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_45@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_45() {
%1 = call i32 @handle_45(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_45() {
%1 = tail call i32 @handle_45(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ traceAllAtivs();
int /*<<< orphan*/ traceAllDiscs();
int /*<<< orphan*/ traceAllHorarios();
void testAll(void) {
  traceAllAtivs();
  traceAllDiscs();
  traceAllHorarios();
}


x86 assembly (clang, -O0):
<testAll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <traceAllAtivs@plt>
mov    $0x0,%al
call   1040 <traceAllDiscs@plt>
mov    $0x0,%al
call   1050 <traceAllHorarios@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAll>:
push   %rax
xor    %eax,%eax
call   1030 <traceAllAtivs@plt>
xor    %eax,%eax
call   1040 <traceAllDiscs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <traceAllHorarios@plt>

LLVM IR (-O0):
define void @testAll() {
%1 = call i32 (...) @traceAllAtivs()
%2 = call i32 (...) @traceAllDiscs()
%3 = call i32 (...) @traceAllHorarios()
ret void
}

LLVM IR (-O2):
define void @testAll() {
%1 = tail call i32 (...) @traceAllAtivs()
%2 = tail call i32 (...) @traceAllDiscs()
%3 = tail call i32 (...) @traceAllHorarios()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SerialOutputByte(int /*<<< orphan*/);
void console_puts(const char *text) {
  while (*text)
    SerialOutputByte(*text++);
}


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

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

LLVM IR (-O0):
define void @console_puts(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 @SerialOutputByte(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @console_puts(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 @SerialOutputByte(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
}
/* Variables and functions */
int /*<<< orphan*/ CheckMask();
int /*<<< orphan*/ printf(char *);
void HandleAlarm(int sig) {
  printf("Got VTALRM\n");
  CheckMask();
}


x86 assembly (clang, -O0):
<HandleAlarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <CheckMask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleAlarm>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <CheckMask@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Got VTALRM\0A\00"
define void @HandleAlarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @CheckMask()
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Got VTALRM\00"
define void @HandleAlarm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @CheckMask()
ret void
}
void SPO256_Initialise(void) {}


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

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

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

LLVM IR (-O2):
define void @SPO256_Initialise() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
__attribute__((visibility("default"))) int trio_copy(char *target,
                                                     const char *source) {
  assert(target);
  assert(source);
  (void)strcpy(target, source);
  return (!(1 == 0));
}


x86 assembly (clang, -O0):
<trio_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_copy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %r14,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @trio_copy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @assert(i8* %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %9, i8* %10)
ret i32 1
}

LLVM IR (-O2):
define i32 @trio_copy(i8* %0, i8* %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i32 @assert(i8* %1)
%5 = tail call i32 @strcpy(i8* %0, i8* %1)
ret i32 1
}
char *mystpcpy(char *dest, const char *src) {
  if (!src)
    return dest;
  while ((*dest = *src)) {
    dest++;
    src++;
  }
  return dest;
}


x86 assembly (clang, -O0):
<mystpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1124 <mystpcpy+0x24>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1162 <mystpcpy+0x62>
jmp    1129 <mystpcpy+0x29>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     115a <mystpcpy+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1129 <mystpcpy+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystpcpy>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1132 <mystpcpy+0x32>
mov    (%rsi),%cl
mov    %cl,(%rax)
test   %cl,%cl
je     1132 <mystpcpy+0x32>
add    $0x1,%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <mystpcpy+0x20>
ret

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

LLVM IR (-O2):
define i8* @mystpcpy(i8* writeonly %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i8, i8* %1
store i8 %5, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i8* [ %11, %7 ], [ %1, %4 ]
%9 = phi i8* [ %10, %7 ], [ %0, %4 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %11
store i8 %12, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
%15 = phi i8* [ %0, %2 ], [ %0, %4 ], [ %10, %7 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ LeaveCS();
void rtl_traceunlock(void) { LeaveCS(); }


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

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

LLVM IR (-O0):
define void @rtl_traceunlock() {
%1 = call i32 (...) @LeaveCS()
ret void
}

LLVM IR (-O2):
define void @rtl_traceunlock() {
%1 = tail call i32 (...) @LeaveCS()
ret void
}
/* Variables and functions */
int sendData(int, char *);
int sendMSNVersion(int streamID) {
  int ret = sendData(streamID, "VER 0 MSNP8 CVR0\r\n");
  return ret;
}


x86 assembly (clang, -O0):
<sendMSNVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <sendData@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendMSNVersion>:
lea    0xee9(%rip),%rsi
jmp    1030 <sendData@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"VER 0 MSNP8 CVR0\0D\0A\00"
define i32 @sendMSNVersion(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @sendData(i32 %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [19 x i8] c"VER 0 MSNP8 CVR0\0D\0A\00"
define i32 @sendMSNVersion(i32 %0) {
%2 = tail call i32 @sendData(i32 %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int is_prime(long long int num) {
  for (long long int i = 2; i * i <= num; ++i) {
    if (num % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x2,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jg     1159 <is_prime+0x59>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    1143 <is_prime+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1160 <is_prime+0x60>
jmp    1148 <is_prime+0x48>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <is_prime+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x1,%eax
cmp    $0x4,%rdi
jl     1153 <is_prime+0x53>
mov    $0x2,%ecx
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1130 <is_prime+0x30>
mov    %rdi,%rax
cqto
idiv   %rcx
test   %rdx,%rdx
jne    113b <is_prime+0x3b>
jmp    114b <is_prime+0x4b>
nopl   0x0(%rax,%rax,1)
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
test   %rdx,%rdx
je     114b <is_prime+0x4b>
add    $0x1,%rcx
mov    %rcx,%rax
imul   %rcx,%rax
cmp    %rdi,%rax
jle    1110 <is_prime+0x10>
xor    %eax,%eax
test   %rdx,%rdx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @is_prime(i64 %0) {
%2 = icmp slt i64 %0, 4
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 2, %1 ]
%5 = srem i64 %0, %4
%6 = icmp eq i64 %5, 0
%7 = add nuw nsw i64 %4, 1
%8 = mul nsw i64 %7, %7
%9 = icmp sgt i64 %8, %0
%10 = select i1 %6, i1 true, i1 %9
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = xor i1 %6, true
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %11, %1
%15 = phi i32 [ 1, %1 ], [ %13, %11 ]
ret i32 %15
}
void __attribute__((visibility("default")))
border_nwse_double_diagonal_special_sand_n(unsigned char *pic,
                                           unsigned char *mirr) {
  *pic = 0x29;
  *mirr = 0x02;
}


x86 assembly (clang, -O0):
<border_nwse_double_diagonal_special_sand_n>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x29,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_nwse_double_diagonal_special_sand_n>:
movb   $0x29,(%rdi)
movb   $0x2,(%rsi)
ret

LLVM IR (-O0):
define void @border_nwse_double_diagonal_special_sand_n(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
store i8 41, i8* %5
%6 = load i8*, i8** %4
store i8 2, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_nwse_double_diagonal_special_sand_n(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 41, i8* %0
store i8 2, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ derefC(char *);
int /*<<< orphan*/ printf(char *);
void checkForCallee3(char **p) {
  if (p) {
    if (!*p) {
      printf("Null...\n");
    } else {
      derefC(*p);
    }
  }
}


x86 assembly (clang, -O0):
<checkForCallee3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1167 <checkForCallee3+0x47>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1156 <checkForCallee3+0x36>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <checkForCallee3+0x42>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <derefC@plt>
jmp    1167 <checkForCallee3+0x47>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkForCallee3>:
test   %rdi,%rdi
je     1132 <checkForCallee3+0x12>
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1133 <checkForCallee3+0x13>
jmp    1040 <derefC@plt>
ret
lea    0xec6(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [8 x i8] c"Null...\00"
define void @checkForCallee3(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %10
8: ; preds = %3
%9 = tail call i32 @derefC(i8* %4)
br label %10
10: ; preds = %6, %8, %1
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
int cap_capable(struct task_struct *, int);
int security_capable(struct task_struct *tsk, int cap) {
  return cap_capable(tsk, cap);
}


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

x86 assembly (clang, -O2):
<security_capable>:
jmp    1030 <cap_capable@plt>

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define i32 @security_capable(%struct.task_struct* %0, i32 %1) {
%3 = alloca %struct.task_struct*
%4 = alloca i32
store %struct.task_struct* %0, %struct.task_struct** %3
store i32 %1, i32* %4
%5 = load %struct.task_struct*, %struct.task_struct** %3
%6 = load i32, i32* %4
%7 = call i32 @cap_capable(%struct.task_struct* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define i32 @security_capable(%struct.task_struct* %0, i32 %1) {
%3 = tail call i32 @cap_capable(%struct.task_struct* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  printf("Please enter three integers:\n");
  scanf("%*d %*d %d", &n);
  printf("The last integer was %d.\n", n);
  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    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xed2(%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    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Please enter three integers:\0A\00"
@.str.1 = [11 x i8] c"%*d %*d %d\00"
@.str.2 = [26 x i8] c"The last integer was %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 ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%*d %*d %d\00"
@.str.2 = [26 x i8] c"The last integer was %d.\0A\00"
@str = [29 x i8] c"Please enter three integers:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 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 ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int UINT64_C(int);
uint32_t MWC64func(void) {
  static uint32_t z = 521288629;
  static uint32_t c = 7654321;
  uint64_t t;
  uint64_t a = UINT64_C(698769069);
  t = a * z + c;
  c = t >> 32;
  z = t;
  return z;
}


x86 assembly (clang, -O0):
<MWC64func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x29a65ead,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   0x2ef9(%rip),%eax
add    0x2ef7(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,0x2ee4(%rip)
mov    -0x4(%rbp),%eax
mov    %eax,0x2ed7(%rip)
mov    0x2ed1(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MWC64func>:
push   %rax
mov    $0x29a65ead,%edi
call   1030 <UINT64_C@plt>
imul   0x2f06(%rip),%eax
add    $0x74cbb1,%eax
mov    %eax,0x2efb(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@MWC64func.z = internal global i32 521288629
@MWC64func.c = internal global i32 7654321
define i32 @MWC64func() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @UINT64_C(i32 698769069)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @MWC64func.z
%6 = mul nsw i32 %4, %5
%7 = load i32, i32* @MWC64func.c
%8 = add nsw i32 %6, %7
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = ashr i32 %9, 32
store i32 %10, i32* @MWC64func.c
%11 = load i32, i32* %1
store i32 %11, i32* @MWC64func.z
%12 = load i32, i32* @MWC64func.z
ret i32 %12
}

LLVM IR (-O2):
@MWC64func.z = internal unnamed_addr global i32 521288629
define i32 @MWC64func() {
%1 = tail call i32 @UINT64_C(i32 698769069)
%2 = load i32, i32* @MWC64func.z
%3 = mul nsw i32 %2, %1
%4 = add nsw i32 %3, 7654321
store i32 %4, i32* @MWC64func.z
ret i32 %4
}
void RTSha512Final(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSha512Final() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _synctex_error(char *);
int _synctex_bail(void) {
  _synctex_error("SyncTeX ERROR\n");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"SyncTeX ERROR\0A\00"
define i32 @_synctex_bail() {
%1 = call i32 @_synctex_error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [15 x i8] c"SyncTeX ERROR\0A\00"
define i32 @_synctex_bail() {
%1 = tail call i32 @_synctex_error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ assert_equal_str(int /*<<< orphan*/ *, char *, char *,
                                    char *);
char *pl_cpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void test_strcpy_empty_paras() {
  char *ret_val;
  ret_val = pl_cpy(NULL, NULL);
  assert_equal_str(NULL, ret_val, "test_strcpy_empty_paras",
                   "Test 2: NULL not returned.");
}


x86 assembly (clang, -O0):
<test_strcpy_empty_paras>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1040 <pl_cpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xeb9(%rip),%rdx
lea    0xeca(%rip),%rcx
call   1030 <assert_equal_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strcpy_empty_paras>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <pl_cpy@plt>
lea    0xecf(%rip),%rdx
lea    0xee0(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
pop    %rax
jmp    1030 <assert_equal_str@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"test_strcpy_empty_paras\00"
@.str.1 = [27 x i8] c"Test 2: NULL not returned.\00"
define void @test_strcpy_empty_paras() {
%1 = alloca i8*
%2 = call i8* @pl_cpy(i32* null, i32* null)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @assert_equal_str(i32* null, i8* %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"test_strcpy_empty_paras\00"
@.str.1 = [27 x i8] c"Test 2: NULL not returned.\00"
define void @test_strcpy_empty_paras() {
%1 = tail call i8* @pl_cpy(i32* null, i32* null)
%2 = tail call i32 @assert_equal_str(i32* null, i8* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_atomic_begin();
int /*<<< orphan*/ __ESBMC_atomic_end();
int notify_event(void) {
  __ESBMC_atomic_begin();
  return 1;
  __ESBMC_atomic_end();
}


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

x86 assembly (clang, -O2):
<notify_event>:
push   %rax
xor    %eax,%eax
call   1030 <__ESBMC_atomic_begin@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @notify_event() {
%1 = tail call i32 (...) @__ESBMC_atomic_begin()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void _set_inverse(int enable) {
  if (enable)
    fprintf(stdout, "\x1B[7m");
  else
    fprintf(stdout, "\x1B[27m");
}


x86 assembly (clang, -O0):
<_set_inverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113f <_set_inverse+0x2f>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1154 <_set_inverse+0x44>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_inverse>:
test   %edi,%edi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xee3(%rip),%rax
lea    0xed7(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [5 x i8] c"\1B[7m\00"
@.str.1 = [6 x i8] c"\1B[27m\00"
define void @_set_inverse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"\1B[7m\00"
@.str.1 = [6 x i8] c"\1B[27m\00"
define void @_set_inverse(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load i32, i32* @stdout
%4 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32 %3, i8* %4)
ret void
}