xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ peasoup(int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int turn = 13;
  peasoup(&turn);
  printf("Oh, no, it's %d!\n", turn);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Oh, no, it's %d!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 13, i32* %2
%3 = call i32 @peasoup(i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Oh, no, it's %d!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 13, i32* %1
%3 = call i32 @peasoup(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ trunc(double const);
void trunc_l_d(const double *source, int64_t *dest) {
  *dest = (int64_t)trunc(*source);
}


x86 assembly (clang, -O0):
<trunc_l_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <trunc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc_l_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <trunc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @trunc_l_d(double* %0, i64* %1) {
%3 = alloca double*
%4 = alloca i64*
store double* %0, double** %3
store i64* %1, i64** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = call i64 @trunc(double %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @trunc_l_d(double* nocapture %0, i64* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i64 @trunc(double %3)
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double cale, centymetry;
  printf("Podaj swój wzrost: ");
  scanf("%lf", &centymetry);
  cale = centymetry / 2.54;
  printf("%lf\n", cale);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
divsd  0xeb5(%rip),%xmm0
lea    0xecf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Podaj sw\C3\B3j wzrost: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = fdiv double %6, 2.540000e+00
store double %7, double* %2
%8 = load double, double* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Podaj sw\C3\B3j wzrost: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fdiv double %5, 2.540000e+00
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}
void foo(char a) {
  typedef char ch_t;
  ch_t c;
  return;
}


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

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

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

LLVM IR (-O2):
define void @foo(i8 signext %0) {
ret void
}
/* Variables and functions */
scalar_t__ isBlank(char);
char *NextStr(char *pBuffer) {
  if (!pBuffer)
    return NULL;
  while (isBlank(*pBuffer))
    ++pBuffer;
  return pBuffer;
}


x86 assembly (clang, -O0):
<NextStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <NextStr+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1168 <NextStr+0x58>
jmp    1139 <NextStr+0x29>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isBlank@plt>
cmp    $0x0,%rax
je     1160 <NextStr+0x50>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <NextStr+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NextStr>:
push   %rbx
test   %rdi,%rdi
je     1134 <NextStr+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isBlank@plt>
test   %rax,%rax
jne    1120 <NextStr+0x10>
jmp    1136 <NextStr+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @NextStr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isBlank(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
void xSysTickDisable(void) {
  (*((volatile unsigned long *)(0xE000E010))) &= ~(0x00000001);
}


x86 assembly (clang, -O0):
<xSysTickDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    $0xe000e010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xSysTickDisable>:
mov    $0xe000e010,%eax
andq   $0xfffffffffffffffe,(%rax)
ret

LLVM IR (-O0):
define void @xSysTickDisable() {
%1 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%2 = and i64 %1, -2
store volatile i64 %2, i64* inttoptr (i64 3758153744 to i64*)
ret void
}

LLVM IR (-O2):
define void @xSysTickDisable() {
%1 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%2 = and i64 %1, -2
store volatile i64 %2, i64* inttoptr (i64 3758153744 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ opt_warning(char *);
void opt_CSTRING_deprecated() {
  opt_warning("OPT_CSTRING is deprecated...you should use OPT_STRING instead");
  opt_warning(
      "If this warning message is a problem, then recompile the source");
  opt_warning("with the symbol OPT_DEPRECATED_OK defined.");
}


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

x86 assembly (clang, -O2):
<opt_CSTRING_deprecated>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <opt_warning@plt>
lea    0xf1a(%rip),%rdi
call   1030 <opt_warning@plt>
lea    0xf4e(%rip),%rdi
pop    %rax
jmp    1030 <opt_warning@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"OPT_CSTRING is deprecated...you should use OPT_STRING instead\00"
@.str.1 = [64 x i8] c"If this warning message is a problem, then recompile the source\00"
@.str.2 = [43 x i8] c"with the symbol OPT_DEPRECATED_OK defined.\00"
define void @opt_CSTRING_deprecated() {
%1 = call i32 @opt_warning(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @opt_warning(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @opt_warning(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"OPT_CSTRING is deprecated...you should use OPT_STRING instead\00"
@.str.1 = [64 x i8] c"If this warning message is a problem, then recompile the source\00"
@.str.2 = [43 x i8] c"with the symbol OPT_DEPRECATED_OK defined.\00"
define void @opt_CSTRING_deprecated() {
%1 = tail call i32 @opt_warning(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @opt_warning(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @opt_warning(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void BN_GF2m_mod_inv_arr(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_GF2m_mod_inv_arr() {
ret void
}
/* Type definitions */
struct pacghost {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hunt(struct pacghost *, struct pacghost *, int const);
int /*<<< orphan*/ run_away(struct pacghost *, struct pacghost *);
void hung_ai(char *map, struct pacghost *pacman, struct pacghost *ghost,
             const int difficulty, const int is_pacman_powered_up) {
  if (is_pacman_powered_up)
    run_away(pacman, ghost);
  else
    hunt(pacman, ghost, difficulty);
}


x86 assembly (clang, -O0):
<hung_ai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1157 <hung_ai+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <run_away@plt>
jmp    1167 <hung_ai+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <hunt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hung_ai>:
mov    %rsi,%rdi
mov    %rdx,%rsi
test   %r8d,%r8d
je     1130 <hung_ai+0x10>
jmp    1040 <run_away@plt>
mov    %ecx,%edx
jmp    1030 <hunt@plt>

LLVM IR (-O0):
%struct.pacghost = type { i32 }
define void @hung_ai(i8* %0, %struct.pacghost* %1, %struct.pacghost* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca %struct.pacghost*
%8 = alloca %struct.pacghost*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store %struct.pacghost* %1, %struct.pacghost** %7
store %struct.pacghost* %2, %struct.pacghost** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %5
%14 = load %struct.pacghost*, %struct.pacghost** %7
%15 = load %struct.pacghost*, %struct.pacghost** %8
%16 = call i32 @run_away(%struct.pacghost* %14, %struct.pacghost* %15)
br label %22
17: ; preds = %5
%18 = load %struct.pacghost*, %struct.pacghost** %7
%19 = load %struct.pacghost*, %struct.pacghost** %8
%20 = load i32, i32* %9
%21 = call i32 @hunt(%struct.pacghost* %18, %struct.pacghost* %19, i32 %20)
br label %22
22: ; preds = %17, %13
ret void
}

LLVM IR (-O2):
%struct.pacghost = type { i32 }
define void @hung_ai(i8* nocapture readnone %0, %struct.pacghost* %1, %struct.pacghost* %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @run_away(%struct.pacghost* %1, %struct.pacghost* %2)
br label %11
9: ; preds = %5
%10 = tail call i32 @hunt(%struct.pacghost* %1, %struct.pacghost* %2, i32 %3)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OAL_OBTAIN_SEMAPHORE();
int /*<<< orphan*/ OAL_RELEASE_SEMAPHORE();
int spi_bulkwrite(void *, unsigned short, unsigned char, unsigned char *,
                  unsigned short);
signed int fc8180_spib_bulkwrite(void *handle, unsigned short addr,
                                 unsigned char *data, unsigned short length) {
  signed int res;
  unsigned char command = 0x00 | 0x80;
  OAL_OBTAIN_SEMAPHORE();
  res = spi_bulkwrite(handle, addr, command, data, length);
  OAL_RELEASE_SEMAPHORE();
  return res;
}


x86 assembly (clang, -O0):
<fc8180_spib_bulkwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
movb   $0x80,-0x21(%rbp)
mov    $0x0,%al
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0x21(%rbp),%al
mov    -0x18(%rbp),%rcx
movzwl %dx,%esi
movzbl %al,%edx
movzwl -0x1a(%rbp),%r8d
call   1040 <spi_bulkwrite@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8180_spib_bulkwrite>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x80,%edx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1040 <spi_bulkwrite@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8180_spib_bulkwrite(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i32
%10 = alloca i8
store i8* %0, i8** %5
store i16 %1, i16* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
store i8 -128, i8* %10
%11 = call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%12 = load i8*, i8** %5
%13 = load i16, i16* %6
%14 = load i8, i8* %10
%15 = load i8*, i8** %7
%16 = load i16, i16* %8
%17 = call i32 @spi_bulkwrite(i8* %12, i16 zeroext %13, i8 zeroext %14, i8* %15, i16 zeroext %16)
store i32 %17, i32* %9
%18 = call i32 (...) @OAL_RELEASE_SEMAPHORE()
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
define i32 @fc8180_spib_bulkwrite(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3) {
%5 = tail call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%6 = tail call i32 @spi_bulkwrite(i8* %0, i16 zeroext %1, i8 zeroext -128, i8* %2, i16 zeroext %3)
%7 = tail call i32 (...) @OAL_RELEASE_SEMAPHORE()
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int open(const char *file, int flags, ...) {
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EACCES = global i32 0
@errno = global i32 0
define i32 @open(i8* nocapture readnone %0, i32 %1, ...) {
%3 = load i32, i32* @EACCES
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_RCVTIMEO;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, struct timeval *,
               int);
int set_recv_timeout(int sock, int seconds) {
  struct timeval tmo;
  tmo.tv_sec = seconds;
  tmo.tv_usec = 0;
  return setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tmo,
                    sizeof(struct timeval));
}


x86 assembly (clang, -O0):
<set_recv_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
lea    -0x18(%rbp),%rcx
mov    $0x10,%r8d
call   1030 <setsockopt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_recv_timeout>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    $0x10,%r8d
call   1030 <setsockopt@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
@SOL_SOCKET = global i32 0
@SO_RCVTIMEO = global i32 0
define i32 @set_recv_timeout(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.timeval
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
store i64 0, i64* %8
%9 = load i32, i32* %3
%10 = load i32, i32* @SOL_SOCKET
%11 = load i32, i32* @SO_RCVTIMEO
%12 = call i32 @setsockopt(i32 %9, i32 %10, i32 %11, %struct.timeval* %5, i32 16)
ret i32 %12
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
@SOL_SOCKET = global i32 0
@SO_RCVTIMEO = global i32 0
define i32 @set_recv_timeout(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
store i64 0, i64* %6
%7 = load i32, i32* @SOL_SOCKET
%8 = load i32, i32* @SO_RCVTIMEO
%9 = call i32 @setsockopt(i32 %0, i32 %7, i32 %8, %struct.timeval* %3, i32 16)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int a = 2, b = 3;
  b *= a;
  print("b 6");
  printid(b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    0xeb2(%rip),%rdi
call   1030 <print@plt>
mov    -0xc(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"b 6\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CallBack1(int, void *);
int /*<<< orphan*/ CheckRunningInMainThread(char *);
void IBeamCursor(void) {
  if (!CheckRunningInMainThread("IBeamCursor"))
    return;
  CallBack1(33, (void *)3);
}


x86 assembly (clang, -O0):
<IBeamCursor>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <CheckRunningInMainThread@plt>
cmp    $0x0,%eax
jne    113e <IBeamCursor+0x1e>
jmp    114d <IBeamCursor+0x2d>
mov    $0x21,%edi
mov    $0x3,%esi
call   1030 <CallBack1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IBeamCursor>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <CheckRunningInMainThread@plt>
test   %eax,%eax
je     1141 <IBeamCursor+0x21>
mov    $0x3,%esi
mov    $0x21,%edi
pop    %rax
jmp    1030 <CallBack1@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"IBeamCursor\00"
define void @IBeamCursor() {
%1 = call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %6
4: ; preds = %0
%5 = call i32 @CallBack1(i32 33, i8* inttoptr (i64 3 to i8*))
br label %6
6: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"IBeamCursor\00"
define void @IBeamCursor() {
%1 = tail call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @CallBack1(i32 33, i8* inttoptr (i64 3 to i8*))
br label %5
5: ; preds = %0, %3
ret void
}
void swallow_scalar(void *p, float dont_care) {}


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

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

LLVM IR (-O0):
define void @swallow_scalar(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
ret void
}

LLVM IR (-O2):
define void @swallow_scalar(i8* nocapture %0, float %1) {
ret void
}
void ARGBShuffle() {}


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

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

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

LLVM IR (-O2):
define void @ARGBShuffle() {
ret void
}
void swap(int *p1, int *p2) {
  int aux;
  aux = *p1;
  *p1 = *p2;
  *p2 = aux;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(2, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_container_to_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_container_to_target_system>:
mov    $0x2,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_container_to_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 2, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 2, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int max3(int a, int b, int c) {
  int ab = ((a) > (b) ? (a) : (b));
  return ((ab) > (c) ? (ab) : (c));
}


x86 assembly (clang, -O0):
<max3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <max3+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    112a <max3+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1147 <max3+0x47>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114d <max3+0x4d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
cmp    %edx,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @max3(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %5, i32 %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun5() { printf("In fun5\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"In fun5\0A\00"
define void @fun5() {
%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"In fun5\00"
define void @fun5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
void EC_GROUP_method_of(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_GROUP_method_of() {
ret void
}
/* Variables and functions */
double cos(double);
double sin(double);
void cexpj(double *aa, double theta) {
  aa[0] = cos(theta);
  aa[1] = sin(theta);
}


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

x86 assembly (clang, -O2):
<cexpj>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
call   1040 <cos@plt>
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @cexpj(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = call double @cos(double %5)
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 0
store double %6, double* %8
%9 = load double, double* %4
%10 = call double @sin(double %9)
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
store double %10, double* %12
ret void
}

LLVM IR (-O2):
define void @cexpj(double* nocapture writeonly %0, double %1) {
%3 = tail call double @cos(double %1)
store double %3, double* %0
%4 = tail call double @sin(double %1)
%5 = getelementptr inbounds double, double* %0, i64 1
store double %4, double* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void syntax(char *name) {
  printf("syntax: %s [-Ndataname] infile c-outfile [h-outfile]\n", name);
  exit(1);
}


x86 assembly (clang, -O0):
<syntax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<syntax>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"syntax: %s [-Ndataname] infile c-outfile [h-outfile]\0A\00"
define void @syntax(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [54 x i8] c"syntax: %s [-Ndataname] infile c-outfile [h-outfile]\0A\00"
define void @syntax(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct libkeccak_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
libkeccak_state_wipe_message(struct libkeccak_state volatile *);
int /*<<< orphan*/
libkeccak_state_wipe_sponge(struct libkeccak_state volatile *);
void libkeccak_state_wipe(volatile struct libkeccak_state *restrict state) {
  libkeccak_state_wipe_message(state);
  libkeccak_state_wipe_sponge(state);
}


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

x86 assembly (clang, -O2):
<libkeccak_state_wipe>:
push   %rbx
mov    %rdi,%rbx
call   1030 <libkeccak_state_wipe_message@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <libkeccak_state_wipe_sponge@plt>

LLVM IR (-O0):
%struct.libkeccak_state = type { i32 }
define void @libkeccak_state_wipe(%struct.libkeccak_state* noalias %0) {
%2 = alloca %struct.libkeccak_state*
store %struct.libkeccak_state* %0, %struct.libkeccak_state** %2
%3 = load %struct.libkeccak_state*, %struct.libkeccak_state** %2
%4 = call i32 @libkeccak_state_wipe_message(%struct.libkeccak_state* %3)
%5 = load %struct.libkeccak_state*, %struct.libkeccak_state** %2
%6 = call i32 @libkeccak_state_wipe_sponge(%struct.libkeccak_state* %5)
ret void
}

LLVM IR (-O2):
%struct.libkeccak_state = type { i32 }
define void @libkeccak_state_wipe(%struct.libkeccak_state* noalias %0) {
%2 = tail call i32 @libkeccak_state_wipe_message(%struct.libkeccak_state* %0)
%3 = tail call i32 @libkeccak_state_wipe_sponge(%struct.libkeccak_state* %0)
ret void
}
void free_3d_char(char ***p, int ndim1) {
  int i;
  free(p[0][0]);
  for (i = 0; i < ndim1; i++)
    free(p[i]);
  free(p);
}


x86 assembly (clang, -O0):
<free_3d_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <free_3d_char+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1135 <free_3d_char+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_3d_char>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
test   %ebp,%ebp
jle    1142 <free_3d_char+0x32>
mov    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <free_3d_char+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_3d_char(i8*** nocapture %0, i32 %1) {
%3 = load i8**, i8*** %0
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = getelementptr inbounds i8**, i8*** %0, i64 %9
%11 = bitcast i8*** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
%16 = bitcast i8*** %0 to i8*
tail call void @free(i8* %16)
ret void
}
void gtk_notebook_get_n_pages() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_get_n_pages() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ ino(int);
void delayX(int x, int ms) {
  ino(x);
  delay(ms);
  return;
}


x86 assembly (clang, -O0):
<delayX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ino@plt>
mov    -0x8(%rbp),%edi
call   1040 <delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delayX>:
push   %rbx
mov    %esi,%ebx
call   1030 <ino@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <delay@plt>

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

LLVM IR (-O2):
define void @delayX(i32 %0, i32 %1) {
%3 = tail call i32 @ino(i32 %0)
%4 = tail call i32 @delay(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fileInstructions() {
  printf("# ls: 1\n"
         "# cd: 2\n"
         "# select: 3\n"
         "# exit: 4\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"# ls: 1\0A# cd: 2\0A# select: 3\0A# exit: 4\0A\00"
define void @fileInstructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"# ls: 1\0A# cd: 2\0A# select: 3\0A# exit: 4\00"
define void @fileInstructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void UARTSmartCardEnable(uint32_t ui32Base) {
  uint32_t ui32Val;
  ;
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x0000002C)));
  ui32Val &= ~(0x00000080 | 0x00000004 | 0x00000002 | 0x00000060);
  ui32Val |= 0x00000060 | 0x00000002 | 0x00000004 | 0x00000008;
  (*((volatile uint32_t *)(ui32Base + 0x0000002C))) = ui32Val;
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) |= 0x00000008;
}


x86 assembly (clang, -O0):
<UARTSmartCardEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffff19,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x6e,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
or     $0x8,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTSmartCardEnable>:
movslq %edi,%rax
mov    $0xffffff11,%ecx
and    0x2c(%rax),%ecx
or     $0x6e,%ecx
mov    %ecx,0x2c(%rax)
orl    $0x8,0x30(%rax)
ret

LLVM IR (-O0):
define void @UARTSmartCardEnable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 44
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = and i32 %9, -231
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = or i32 %11, 110
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 44
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store volatile i32 %13, i32* %17
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 48
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = or i32 %22, 8
store volatile i32 %23, i32* %21
ret void
}

LLVM IR (-O2):
define void @UARTSmartCardEnable(i32 %0) {
%2 = add nsw i32 %0, 44
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -239
%7 = or i32 %6, 110
store volatile i32 %7, i32* %4
%8 = add nsw i32 %0, 48
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 8
store volatile i32 %12, i32* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x2a() {
  Assert_real((isgraph(42)),
              "/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_isgraph.c",
              215, ("isgraph should be 1 for *"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x2a>:
push   %rax
mov    $0x2a,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xd7,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for *\00"
define void @t_isgraph_0x2a() {
%1 = call i32 @isgraph(i32 42)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for *\00"
define void @t_isgraph_0x2a() {
%1 = tail call i32 @isgraph(i32 42)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ get_sysdata(char *, char **, char *);
int /*<<< orphan*/ stdout;
void print_security_flavor(void) {
  char value[64];
  char *descr;
  get_sysdata("security_flavor", &descr, value);
  fprintf(stdout, "%-45s: %s\n", descr, value);
}


x86 assembly (clang, -O0):
<print_security_flavor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdx
lea    0xecd(%rip),%rdi
lea    -0x48(%rbp),%rsi
call   1030 <get_sysdata@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%rdx
lea    -0x40(%rbp),%rcx
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_security_flavor>:
push   %rbx
sub    $0x50,%rsp
lea    0xed4(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdx
call   1030 <get_sysdata@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rsp),%rdx
lea    0xebd(%rip),%rsi
mov    %rbx,%rcx
call   1040 <fprintf@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"security_flavor\00"
@stdout = global i32 0
@.str.1 = [11 x i8] c"%-45s: %s\0A\00"
define void @print_security_flavor() {
%1 = alloca [64 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%4 = call i32 @get_sysdata(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %2, i8* %3)
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"security_flavor\00"
@stdout = global i32 0
@.str.1 = [11 x i8] c"%-45s: %s\0A\00"
define void @print_security_flavor() {
%1 = alloca [64 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%4 = bitcast i8** %2 to i8*
%5 = call i32 @get_sysdata(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %2, i8* %3)
%6 = load i32, i32* @stdout
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int main(int argc, const char *argv[]) {
  test1();
  test2();
  test3();
  test4();
  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    $0x0,%al
call   1040 <test1@plt>
mov    $0x0,%al
call   1060 <test2@plt>
mov    $0x0,%al
call   1030 <test3@plt>
mov    $0x0,%al
call   1050 <test4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test1@plt>
xor    %eax,%eax
call   1060 <test2@plt>
xor    %eax,%eax
call   1030 <test3@plt>
xor    %eax,%eax
call   1050 <test4@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 = call i32 (...) @test1()
%7 = call i32 (...) @test2()
%8 = call i32 (...) @test3()
%9 = call i32 (...) @test4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 (...) @test2()
%5 = tail call i32 (...) @test3()
%6 = tail call i32 (...) @test4()
ret i32 0
}
/* Variables and functions */
int strlen(char const *);
int size_in_blocks(const char *string, int blk_size) {
  int string_len = strlen(string);
  return (string_len + blk_size - 1) / blk_size;
}


x86 assembly (clang, -O0):
<size_in_blocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_in_blocks>:
push   %rbx
mov    %esi,%ebx
call   1030 <strlen@plt>
add    %ebx,%eax
add    $0xffffffff,%eax
cltd
idiv   %ebx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @size_in_blocks(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
%11 = sub nsw i32 %10, 1
%12 = load i32, i32* %4
%13 = sdiv i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @size_in_blocks(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add i32 %1, -1
%5 = add i32 %4, %3
%6 = sdiv i32 %5, %1
ret i32 %6
}