xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _Exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("I'm Foobar!\n");
  _Exit(EXIT_SUCCESS);
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <_Exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <_Exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"I'm Foobar!\0A\00"
@EXIT_SUCCESS = global i32 0
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 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @_Exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [12 x i8] c"I'm Foobar!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @_Exit(i32 %4)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int number_of_irreducible_factors(int *nf) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(68, nf, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<number_of_irreducible_factors>:
mov    %rdi,%rsi
mov    $0x44,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @number_of_irreducible_factors(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 68, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Type definitions */
struct tempName {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ trashDirFileExt(struct tempName *, char *, char *, char *,
                                   int);
void trashDirDateFile(struct tempName *tn, char *dirName, char *base,
                      char *suffix) {
  trashDirFileExt(tn, dirName, base, suffix, 1);
}


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

x86 assembly (clang, -O2):
<trashDirDateFile>:
mov    $0x1,%r8d
jmp    1030 <trashDirFileExt@plt>

LLVM IR (-O0):
%struct.tempName = type { i32 }
define void @trashDirDateFile(%struct.tempName* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.tempName*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.tempName* %0, %struct.tempName** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.tempName*, %struct.tempName** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @trashDirFileExt(%struct.tempName* %9, i8* %10, i8* %11, i8* %12, i32 1)
ret void
}

LLVM IR (-O2):
%struct.tempName = type { i32 }
define void @trashDirDateFile(%struct.tempName* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @trashDirFileExt(%struct.tempName* %0, i8* %1, i8* %2, i8* %3, i32 1)
ret void
}
int foo(int *a, int r) {
  int ret = 0;
  *a = 1;
  if (r == 3)
    *a = 5;
  else
    ret = r + 20;
  return ret;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
cmpl   $0x3,-0xc(%rbp)
jne    1135 <foo+0x35>
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
jmp    113e <foo+0x3e>
mov    -0xc(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x1,(%rdi)
cmp    $0x3,%esi
jne    1114 <foo+0x14>
movl   $0x5,(%rdi)
xor    %eax,%eax
ret
mov    %esi,%eax
add    $0x14,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture writeonly %0, i32 %1) {
store i32 1, i32* %0
%3 = icmp eq i32 %1, 3
br i1 %3, label %4, label %5
4: ; preds = %2
store i32 5, i32* %0
br label %7
5: ; preds = %2
%6 = add nsw i32 %1, 20
br label %7
7: ; preds = %5, %4
%8 = phi i32 [ 0, %4 ], [ %6, %5 ]
ret i32 %8
}
/* Variables and functions */
int get_color(int, int, int);
int /*<<< orphan*/ my_put_nbr(int);
int /*<<< orphan*/ my_putchar(char);
int swap_endian_color(int);
int main(void) {
  int color;
  color = get_color(10, 10, 10);
  my_put_nbr(color);
  color = swap_endian_color(color);
  my_putchar('\n');
  my_put_nbr(color);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1060 <get_color@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <my_put_nbr@plt>
mov    -0x4(%rbp),%edi
call   1030 <swap_endian_color@plt>
mov    %eax,-0x4(%rbp)
mov    $0xa,%edi
call   1050 <my_putchar@plt>
mov    -0x4(%rbp),%edi
call   1040 <my_put_nbr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
mov    $0xa,%esi
mov    $0xa,%edx
call   1060 <get_color@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <my_put_nbr@plt>
mov    %ebx,%edi
call   1030 <swap_endian_color@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1050 <my_putchar@plt>
mov    %ebx,%edi
call   1040 <my_put_nbr@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = call i32 @get_color(i32 10, i32 10, i32 10)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @my_put_nbr(i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @swap_endian_color(i32 %5)
store i32 %6, i32* %1
%7 = call i32 @my_putchar(i8 signext 10)
%8 = load i32, i32* %1
%9 = call i32 @my_put_nbr(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @get_color(i32 10, i32 10, i32 10)
%2 = tail call i32 @my_put_nbr(i32 %1)
%3 = tail call i32 @swap_endian_color(i32 %1)
%4 = tail call i32 @my_putchar(i8 signext 10)
%5 = tail call i32 @my_put_nbr(i32 %3)
ret i32 0
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ foo(int);
int /*<<< orphan*/ usleep(int);
int main(int argc, char *argv[]) {
  int do_sleep = 0;
  if (argc > 1)
    do_sleep = atoi(argv[1]);
  if (do_sleep)
    usleep(10);
  foo(do_sleep);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1167 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     117b <main+0x4b>
mov    $0xa,%edi
call   1050 <usleep@plt>
mov    -0x14(%rbp),%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
cmp    $0x2,%edi
jl     1155 <main+0x25>
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
test   %eax,%eax
je     1155 <main+0x25>
mov    %eax,%ebp
mov    $0xa,%edi
call   1050 <usleep@plt>
mov    %ebp,%ebx
mov    %ebx,%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 @usleep(i32 10)
br label %11
11: ; preds = %2, %9, %4
%12 = phi i32 [ %7, %9 ], [ 0, %4 ], [ 0, %2 ]
%13 = tail call i32 @foo(i32 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ malloc(size_t);
int main(int argc, char *argv[]) {
  size_t i;
  for (i = 0; i < 10; i++) {
    size_t chunk = 1024 * 1024;
    uintptr_t val = (uintptr_t)malloc(chunk);
    (void)val;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0xa,-0x18(%rbp)
jae    1161 <main+0x51>
movq   $0x100000,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <malloc@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112e <main+0x1e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@plt>
mov    $0x100000,%edi
call   1030 <malloc@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**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
br label %9
9: ; preds = %17, %2
%10 = load i64, i64* %6
%11 = icmp ult i64 %10, 10
br i1 %11, label %12, label %20
12: ; preds = %9
store i64 1048576, i64* %7
%13 = load i64, i64* %7
%14 = call i32 @malloc(i64 %13)
%15 = sext i32 %14 to i64
store i64 %15, i64* %8
%16 = load i64, i64* %8
br label %17
17: ; preds = %12
%18 = load i64, i64* %6
%19 = add i64 %18, 1
store i64 %19, i64* %6
br label %9
20: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @malloc(i64 1048576)
%4 = tail call i32 @malloc(i64 1048576)
%5 = tail call i32 @malloc(i64 1048576)
%6 = tail call i32 @malloc(i64 1048576)
%7 = tail call i32 @malloc(i64 1048576)
%8 = tail call i32 @malloc(i64 1048576)
%9 = tail call i32 @malloc(i64 1048576)
%10 = tail call i32 @malloc(i64 1048576)
%11 = tail call i32 @malloc(i64 1048576)
%12 = tail call i32 @malloc(i64 1048576)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xce() {
  Assert_real((isalpha(206) == 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_isalpha.c",
              1035, ("isalpha should be 0 for 0xce"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xce>:
push   %rax
mov    $0xce,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x40b,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xce\00"
define void @t_isalpha_0xce() {
%1 = call i64 @isalpha(i32 206)
%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 1035, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xce\00"
define void @t_isalpha_0xce() {
%1 = tail call i64 @isalpha(i32 206)
%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 1035, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void hardware_unlock_door(int timeout) {}


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

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

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

LLVM IR (-O2):
define void @hardware_unlock_door(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
size_t tally(uint64_t x) {
  size_t count;
  for (count = 0; x; count++)
    x &= x - 1;
  return count;
}


x86 assembly (clang, -O0):
<tally>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <tally+0x3c>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <tally+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tally>:
xor    %eax,%eax
test   %rdi,%rdi
je     111d <tally+0x1d>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rdi),%rcx
add    $0x1,%rax
and    %rcx,%rdi
jne    1110 <tally+0x10>
ret

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

LLVM IR (-O2):
define i64 @tally(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nsw i64 %5, -1
%7 = and i64 %6, %5
%8 = add i64 %4, 1
%9 = icmp eq i64 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i64 [ 0, %1 ], [ %8, %3 ]
ret i64 %11
}
/* Variables and functions */
int __cxa_atexit(void (*)(void *), void *, void *);
int __attribute__((weak))
__aeabi_atexit_impl(void *object, void (*destructor)(void *),
                    void *dso_handle) {
  return __cxa_atexit(destructor, object, dso_handle);
}


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

x86 assembly (clang, -O2):
<__aeabi_atexit_impl>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <__cxa_atexit@plt>

LLVM IR (-O0):
define weak i32 @__aeabi_atexit_impl(i8* %0, void (i8*)* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca void (i8*)*
%6 = alloca i8*
store i8* %0, i8** %4
store void (i8*)* %1, void (i8*)** %5
store i8* %2, i8** %6
%7 = load void (i8*)*, void (i8*)** %5
%8 = load i8*, i8** %4
%9 = load i8*, i8** %6
%10 = call i32 @__cxa_atexit(void (i8*)* %7, i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define weak i32 @__aeabi_atexit_impl(i8* %0, void (i8*)* %1, i8* %2) {
%4 = tail call i32 @__cxa_atexit(void (i8*)* %1, i8* %0, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(int, int);
void SensorSetMode_OM6802(unsigned char val) {
  switch (val) {
  case 1:
    VIM_SIF_I2cWriteByte(0xe9, 0x5f);
    break;
  case 2:
    VIM_SIF_I2cWriteByte(0xe9, 0x6f);
    break;
  case 4:
    VIM_SIF_I2cWriteByte(0xe9, 0xdf);
    break;
  case 3:
    VIM_SIF_I2cWriteByte(0xe9, 0x4f);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<SensorSetMode_OM6802>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1198 <SensorSetMode_OM6802+0x88>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xe9,%edi
mov    $0x5f,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    119d <SensorSetMode_OM6802+0x8d>
mov    $0xe9,%edi
mov    $0x6f,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    119d <SensorSetMode_OM6802+0x8d>
mov    $0xe9,%edi
mov    $0xdf,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    119d <SensorSetMode_OM6802+0x8d>
mov    $0xe9,%edi
mov    $0x4f,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
jmp    119d <SensorSetMode_OM6802+0x8d>
jmp    119d <SensorSetMode_OM6802+0x8d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetMode_OM6802>:
add    $0xff,%dil
cmp    $0x3,%dil
ja     1132 <SensorSetMode_OM6802+0x22>
movsbq %dil,%rax
lea    0xedb(%rip),%rcx
mov    (%rcx,%rax,4),%esi
mov    $0xe9,%edi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>
ret

LLVM IR (-O0):
define void @SensorSetMode_OM6802(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %13 [
i32 1, label %5
i32 2, label %7
i32 4, label %9
i32 3, label %11
]
5: ; preds = %1
%6 = call i32 @VIM_SIF_I2cWriteByte(i32 233, i32 95)
br label %14
7: ; preds = %1
%8 = call i32 @VIM_SIF_I2cWriteByte(i32 233, i32 111)
br label %14
9: ; preds = %1
%10 = call i32 @VIM_SIF_I2cWriteByte(i32 233, i32 223)
br label %14
11: ; preds = %1
%12 = call i32 @VIM_SIF_I2cWriteByte(i32 233, i32 79)
br label %14
13: ; preds = %1
br label %14
14: ; preds = %13, %11, %9, %7, %5
ret void
}

LLVM IR (-O2):
@switch.table.SensorSetMode_OM6802 = [4 x i32] [i32 95, i32 111, i32 79, i32 223]
define void @SensorSetMode_OM6802(i8 zeroext %0) {
%2 = add i8 %0, -1
%3 = icmp ult i8 %2, 4
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.SensorSetMode_OM6802, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 @VIM_SIF_I2cWriteByte(i32 233, i32 %7)
br label %9
9: ; preds = %1, %4
ret void
}
/* Variables and functions */
int libclut_eq__(double, int /*<<< orphan*/);
int libclut_0__(double x) { return libclut_eq__(x, 0); }


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

x86 assembly (clang, -O2):
<libclut_0__>:
xor    %edi,%edi
jmp    1030 <libclut_eq__@plt>

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

LLVM IR (-O2):
define i32 @libclut_0__(double %0) {
%2 = tail call i32 @libclut_eq__(double %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void show_features() { exit(0); }


x86 assembly (clang, -O0):
<show_features>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<show_features>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @show_features() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @show_features() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char filename[128];
  FILE *fp = NULL;
  printf("请输入要写入的文件名称: ");
  scanf("%s", filename);
  fp = fopen(filename, "w");
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x98(%rbp)
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1060 <fopen@plt>
mov    %rax,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E8\A6\81\E5\86\99\E5\85\A5\E7\9A\84\E6\96\87\E4\BB\B6\E5\90\8D\E7\A7\B0: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"w\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%8 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %8, i32** %3
%9 = load i32*, i32** %3
%10 = call i32 @fclose(i32* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E8\A6\81\E5\86\99\E5\85\A5\E7\9A\84\E6\96\87\E4\BB\B6\E5\90\8D\E7\A7\B0: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"w\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @fclose(i32* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  int zahl1;
  char zeichen1;
  printf("Bitte geben Sie eine Zahl ein: ");
  scanf("%i", &zahl1);
  printf("Geben Sie einen Zeichen ein: ");
  scanf("%c", &zeichen1);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Bitte geben Sie eine Zahl ein: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [30 x i8] c"Geben Sie einen Zeichen ein: \00"
@.str.3 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Bitte geben Sie eine Zahl ein: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [30 x i8] c"Geben Sie einen Zeichen ein: \00"
@.str.3 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
uint32_t read_le32_3(unsigned char *data) {
  return *data | (*(data + 1) << 8) | (*(data + 2) << 16) | (*(data + 3) << 24);
}


x86 assembly (clang, -O0):
<read_le32_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_le32_3>:
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @read_le32_3(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_chat_printf_date_tags(int /*<<< orphan*/ *,
                                             int /*<<< orphan*/,
                                             int /*<<< orphan*/ *, char *,
                                             void const *);
void command_secure_display_data(void *data, struct t_hashtable *hashtable,
                                 const void *key, const void *value) {
  (void)data;
  (void)hashtable;
  (void)value;
  if (key)
    gui_chat_printf_date_tags(NULL, 0, NULL, "  %s", key);
}


x86 assembly (clang, -O0):
<command_secure_display_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114c <command_secure_display_data+0x3c>
mov    -0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%edx
xor    %esi,%esi
lea    0xebc(%rip),%rcx
mov    %rdx,%rdi
call   1030 <gui_chat_printf_date_tags@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_secure_display_data>:
test   %rdx,%rdx
je     112a <command_secure_display_data+0x1a>
mov    %rdx,%r8
lea    0xee1(%rip),%rcx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <gui_chat_printf_date_tags@plt>
ret

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

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
@.str = [5 x i8] c" %s\00"
define void @command_secure_display_data(i8* nocapture readnone %0, %struct.t_hashtable* nocapture readnone %1, i8* %2, i8* nocapture readnone %3) {
%5 = icmp eq i8* %2, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @gui_chat_printf_date_tags(i32* null, i32 0, i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ read(int /*<<< orphan*/, char *, int);
int readch() {
  int cnt;
  static char c;
  for (cnt = 0; read(0, &c, 1) <= 0; cnt++)
    if (cnt > 100)
      exit(1);
  return c;
}


x86 assembly (clang, -O0):
<readch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    0x2ef9(%rip),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x0,%rax
jg     1173 <readch+0x53>
cmpl   $0x64,-0x4(%rbp)
jle    1160 <readch+0x40>
mov    $0x1,%edi
call   1040 <exit@plt>
jmp    1165 <readch+0x45>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <readch+0xf>
movsbl 0x2eb7(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readch>:
push   %rbp
push   %rbx
push   %rax
lea    0x2f07(%rip),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
test   %rax,%rax
jg     1169 <readch+0x49>
mov    $0x66,%ebp
lea    0x2eea(%rip),%rbx
nopw   0x0(%rax,%rax,1)
add    $0xffffffff,%ebp
je     1177 <readch+0x57>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %rax,%rax
jle    1150 <readch+0x30>
movsbl 0x2ec1(%rip),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@readch.c = internal global i8 0
define i32 @readch() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %11, %0
%3 = call i64 @read(i32 0, i8* @readch.c, i32 1)
%4 = icmp sle i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 100
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %5
br label %11
11: ; preds = %10
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %2
14: ; preds = %2
%15 = load i8, i8* @readch.c
%16 = sext i8 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@readch.c = internal global i8 0
define i32 @readch() {
%1 = tail call i64 @read(i32 0, i8* @readch.c, i32 1)
%2 = icmp slt i64 %1, 1
br i1 %2, label %7, label %12
3: ; preds = %7
%4 = add nuw nsw i32 %8, 1
%5 = tail call i64 @read(i32 0, i8* @readch.c, i32 1)
%6 = icmp slt i64 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %0, %3
%8 = phi i32 [ %4, %3 ], [ 0, %0 ]
%9 = icmp eq i32 %8, 101
br i1 %9, label %10, label %3
10: ; preds = %7
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %3, %0
%13 = load i8, i8* @readch.c
%14 = sext i8 %13 to i32
ret i32 %14
}
void SpecialFree(blockPtr) char *blockPtr;
{ Tcl_Free(blockPtr - 4); }


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

x86 assembly (clang, -O2):
<SpecialFree>:
add    $0xfffffffffffffffc,%rdi
xor    %eax,%eax
jmp    1030 <Tcl_Free@plt>

LLVM IR (-O0):
define void @SpecialFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 -4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @Tcl_Free to i32 (i8*, ...)*)(i8* %4)
ret void
}

LLVM IR (-O2):
define void @SpecialFree(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -4
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @Tcl_Free to i32 (i8*, ...)*)(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checker1(int *);
int /*<<< orphan*/ printf(char *, int);
void calleeChecks1() {
  int *p = NULL;
  checker1(p);
  printf("%d\n", *p);
}


x86 assembly (clang, -O0):
<calleeChecks1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <checker1@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calleeChecks1>:
push   %rax
xor    %edi,%edi
call   1030 <checker1@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @calleeChecks1() {
%1 = tail call i32 @checker1(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret void
}
/* Variables and functions */
float sine_io(float, float, float);
float sine_f_io(float step, float max_steps, float max_val) {
  return sine_io(step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<sine_f_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <sine_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_f_io>:
jmp    1030 <sine_io@plt>

LLVM IR (-O0):
define float @sine_f_io(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @sine_io(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @sine_f_io(float %0, float %1, float %2) {
%4 = tail call float @sine_io(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ UI_DEV_DESTROY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int destroy_uinput(int fd) {
  if (ioctl(fd, UI_DEV_DESTROY) < 0) {
    do {
      perror("error: ioctl");
      exit(EXIT_FAILURE);
    } while (0);
  }
  close(fd);
}


x86 assembly (clang, -O0):
<destroy_uinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1185 <destroy_uinput+0x45>
jmp    116b <destroy_uinput+0x2b>
lea    0xe8e(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_uinput>:
push   %rbx
mov    %edi,%ebx
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
test   %rax,%rax
js     115e <destroy_uinput+0x1e>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>
lea    0xe9b(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@UI_DEV_DESTROY = global i32 0
@.str = [13 x i8] c"error: ioctl\00"
@EXIT_FAILURE = global i32 0
define i32 @destroy_uinput(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @UI_DEV_DESTROY
%6 = call i64 @ioctl(i32 %4, i32 %5)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
br label %9
9: ; preds = %8
%10 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; No predecessors!
br label %14
14: ; preds = %13, %1
%15 = load i32, i32* %3
%16 = call i32 @close(i32 %15)
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@UI_DEV_DESTROY = global i32 0
@.str = [13 x i8] c"error: ioctl\00"
@EXIT_FAILURE = global i32 0
define i32 @destroy_uinput(i32 %0) {
%2 = load i32, i32* @UI_DEV_DESTROY
%3 = tail call i64 @ioctl(i32 %0, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = tail call i32 @close(i32 %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xbf() {
  Assert_real((isalnum(191) == 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_isalnum.c",
              960, ("isalnum should be 0 for 0xbf"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xbf>:
push   %rax
mov    $0xbf,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c0,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbf\00"
define void @t_isalnum_0xbf() {
%1 = call i64 @isalnum(i32 191)
%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 960, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbf\00"
define void @t_isalnum_0xbf() {
%1 = tail call i64 @isalnum(i32 191)
%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 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void zlTranslate(signed long x, signed long y, signed long z) {}


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

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

LLVM IR (-O0):
define void @zlTranslate(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
define void @zlTranslate(i64 %0, i64 %1, i64 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_17_recursive(double *, int);
void helper_double_17(double *buf) { helper_double_17_recursive(buf, 17); }


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

x86 assembly (clang, -O2):
<helper_double_17>:
mov    $0x11,%esi
jmp    1030 <helper_double_17_recursive@plt>

LLVM IR (-O0):
define void @helper_double_17(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @helper_double_17_recursive(double* %3, i32 17)
ret void
}

LLVM IR (-O2):
define void @helper_double_17(double* %0) {
%2 = tail call i32 @helper_double_17_recursive(double* %0, i32 17)
ret void
}
double rpi_nano_channel_to_frequency(int channel) {
  if (channel < 1 || channel > 560)
    return -1;
  return 0.0125 * channel + 863;
}


x86 assembly (clang, -O0):
<rpi_nano_channel_to_frequency>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jl     111e <rpi_nano_channel_to_frequency+0x1e>
cmpl   $0x230,-0xc(%rbp)
jle    1130 <rpi_nano_channel_to_frequency+0x30>
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1152 <rpi_nano_channel_to_frequency+0x52>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpi_nano_channel_to_frequency>:
lea    -0x231(%rdi),%eax
cmp    $0xfffffdd0,%eax
jb     1122 <rpi_nano_channel_to_frequency+0x22>
cvtsi2sd %edi,%xmm0
mulsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
ret
movsd  0xee6(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rpi_nano_channel_to_frequency(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 1
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 560
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store double -1.000000e+00, double* %2
br label %14
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to double
%13 = call double @llvm.fmuladd.f64(double 1.250000e-02, double %12, double 8.630000e+02)
store double %13, double* %2
br label %14
14: ; preds = %10, %9
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @rpi_nano_channel_to_frequency(i32 %0) {
%2 = add i32 %0, -561
%3 = icmp ult i32 %2, -560
%4 = sitofp i32 %0 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.250000e-02, double 8.630000e+02)
%6 = select i1 %3, double -1.000000e+00, double %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ my_memset(void *, int /*<<< orphan*/, size_t);
void my_bzero(void *s, size_t n) { my_memset(s, 0, n); }


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

x86 assembly (clang, -O2):
<my_bzero>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <my_memset@plt>

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

LLVM IR (-O2):
define void @my_bzero(i8* %0, i64 %1) {
%3 = tail call i32 @my_memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Variables and functions */
int sg_err_category_new(int, int, int, unsigned char const *, int);
int sg_err_category(int masked_status, int host_status, int driver_status,
                    const unsigned char *sense_buffer, int sb_len) {
  int scsi_status = (masked_status << 1) & 0x7e;
  return sg_err_category_new(scsi_status, host_status, driver_status,
                             sense_buffer, sb_len);
}


x86 assembly (clang, -O0):
<sg_err_category>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
and    $0x7e,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <sg_err_category_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_err_category>:
add    %edi,%edi
and    $0x7e,%edi
jmp    1030 <sg_err_category_new@plt>

LLVM IR (-O0):
define i32 @sg_err_category(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
%13 = shl i32 %12, 1
%14 = and i32 %13, 126
store i32 %14, i32* %11
%15 = load i32, i32* %11
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = call i32 @sg_err_category_new(i32 %15, i32 %16, i32 %17, i8* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @sg_err_category(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = shl i32 %0, 1
%7 = and i32 %6, 126
%8 = tail call i32 @sg_err_category_new(i32 %7, i32 %1, i32 %2, i8* %3, i32 %4)
ret i32 %8
}
/* Variables and functions */
int ATMtoMB(double);
double ATMtoKPA(double ATM) {
  double KPA = ATMtoMB(ATM) / 10;
  return KPA;
}


x86 assembly (clang, -O0):
<ATMtoKPA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ATMtoMB@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ATMtoKPA>:
push   %rax
call   1030 <ATMtoMB@plt>
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ATMtoKPA(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @ATMtoMB(double %4)
%6 = sdiv i32 %5, 10
%7 = sitofp i32 %6 to double
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @ATMtoKPA(double %0) {
%2 = tail call i32 @ATMtoMB(double %0)
%3 = sdiv i32 %2, 10
%4 = sitofp i32 %3 to double
ret double %4
}