xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x98() {
  Assert_real((isxdigit(152) == 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_isxdigit.c",
              765, ("isxdigit should be 0 for 0x98"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x98>:
push   %rax
mov    $0x98,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2fd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x98\00"
define void @t_isxdigit_0x98() {
%1 = call i64 @isxdigit(i32 152)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 765, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x98\00"
define void @t_isxdigit_0x98() {
%1 = tail call i64 @isxdigit(i32 152)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 765, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pci_config_type(void) {
  printf("pci_config_type: generic function call\n");
  return 0xFFFF;
}


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

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

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

LLVM IR (-O2):
@str = [39 x i8] c"pci_config_type: generic function call\00"
define i32 @pci_config_type() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 65535
}
/* Variables and functions */
int /*<<< orphan*/ MyGeneratedFunction();
int main() {
  MyGeneratedFunction();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @MyGeneratedFunction()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void init_gpio() {
  (*((volatile uint32_t *)0xE0200C00)) = 0x00001111;
  (*((volatile uint32_t *)0xE0200C04)) = 0x0f;
}


x86 assembly (clang, -O0):
<init_gpio>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0200c00,%eax
movl   $0x1111,(%rax)
mov    $0xe0200c04,%eax
movl   $0xf,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_gpio>:
mov    $0xe0200c00,%eax
movl   $0x1111,(%rax)
movl   $0xf,0x4(%rax)
ret

LLVM IR (-O0):
define void @init_gpio() {
store volatile i32 4369, i32* inttoptr (i64 3760196608 to i32*)
store volatile i32 15, i32* inttoptr (i64 3760196612 to i32*)
ret void
}

LLVM IR (-O2):
define void @init_gpio() {
store volatile i32 4369, i32* inttoptr (i64 3760196608 to i32*)
store volatile i32 15, i32* inttoptr (i64 3760196612 to i32*)
ret void
}
int eci_test_6(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @eci_test_6() {
ret i32 0
}

LLVM IR (-O2):
define i32 @eci_test_6() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fill_config_req(unsigned char *, int);
int fill_init_cmd(unsigned char *buf) {
  fill_config_req(buf, 0x12);
  buf[0x04] = 0x15;
  buf[0x05] = 0x04;
  buf += 6;
  buf[0x0c] = 0x15;
  buf[0x0d] = 0x04;
  buf[0x0e] = 0x50;
  buf[0x0f] = 0x04;
  return 6 + 0x12;
}


x86 assembly (clang, -O0):
<fill_init_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x12,%esi
call   1030 <fill_config_req@plt>
mov    -0x8(%rbp),%rax
movb   $0x15,0x4(%rax)
mov    -0x8(%rbp),%rax
movb   $0x4,0x5(%rax)
mov    -0x8(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x15,0xc(%rax)
mov    -0x8(%rbp),%rax
movb   $0x4,0xd(%rax)
mov    -0x8(%rbp),%rax
movb   $0x50,0xe(%rax)
mov    -0x8(%rbp),%rax
movb   $0x4,0xf(%rax)
mov    $0x18,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_init_cmd>:
push   %rbx
mov    %rdi,%rbx
mov    $0x12,%esi
call   1030 <fill_config_req@plt>
movw   $0x415,0x4(%rbx)
movl   $0x4500415,0x12(%rbx)
mov    $0x18,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fill_init_cmd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fill_config_req(i8* %3, i32 18)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8 21, i8* %6
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 5
store i8 4, i8* %8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 6
store i8* %10, i8** %2
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 12
store i8 21, i8* %12
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 13
store i8 4, i8* %14
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 14
store i8 80, i8* %16
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 15
store i8 4, i8* %18
ret i32 24
}

LLVM IR (-O2):
define i32 @fill_init_cmd(i8* %0) {
%2 = tail call i32 @fill_config_req(i8* %0, i32 18)
%3 = getelementptr inbounds i8, i8* %0, i64 4
store i8 21, i8* %3
%4 = getelementptr inbounds i8, i8* %0, i64 5
store i8 4, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 18
store i8 21, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 19
store i8 4, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 20
store i8 80, i8* %7
%8 = getelementptr inbounds i8, i8* %0, i64 21
store i8 4, i8* %8
ret i32 24
}
void tasgn() {
  asm volatile("movq $0x0123456789abcdef, %%rax\n\t"
               "movq %%rax, (%%r11)\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<tasgn>:
push   %rbp
mov    %rsp,%rbp
movabs $0x123456789abcdef,%rax
45 23 01
mov    %rax,(%r11)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tasgn>:
movabs $0x123456789abcdef,%rax
45 23 01
mov    %rax,(%r11)
ret

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

LLVM IR (-O2):
define void @tasgn() {
tail call void asm sideeffect "movq $$0x0123456789abcdef, %rax\0A\09movq %rax, (%r11)\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ execv(char const *, char *const *);
int /*<<< orphan*/ printf(char *, ...);
int test_spawn_prog(const char *prog, const char *const args[]) {
  execv(prog, (char *const *)args);
  printf("TESTSUITE: "
         "ERR: "
         "failed to spawn %s\n",
         prog);
  printf("TESTSUITE: "
         "ERR: "
         "did you forget to build tools?\n");
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<test_spawn_prog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <execv@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_spawn_prog>:
push   %rbx
mov    %rdi,%rbx
call   1050 <execv@plt>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"TESTSUITE: ERR: failed to spawn %s\0A\00"
@.str.1 = [48 x i8] c"TESTSUITE: ERR: did you forget to build tools?\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @test_spawn_prog(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call i32 @execv(i8* %5, i8** %6)
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
ret i32 %11
}

LLVM IR (-O2):
@.str = [36 x i8] c"TESTSUITE: ERR: failed to spawn %s\0A\00"
@EXIT_FAILURE = global i32 0
@str = [47 x i8] c"TESTSUITE: ERR: did you forget to build tools?\00"
define i32 @test_spawn_prog(i8* %0, i8** %1) {
%3 = tail call i32 @execv(i8* %0, i8** %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}
/* Type definitions */
typedef void memory;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void *shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
struct memory *attach_memory(int shmid) {
  struct memory *shared_mem_ptr;
  if ((shared_mem_ptr = shmat(shmid, NULL, 0)) == (void *)-1) {
    perror("shmat()");
    exit(EXIT_FAILURE);
  }
  return shared_mem_ptr;
}


x86 assembly (clang, -O0):
<attach_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <shmat@plt>
mov    %rax,-0x10(%rbp)
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    1177 <attach_memory+0x47>
lea    0xe9c(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attach_memory>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1040 <shmat@plt>
cmp    $0xffffffffffffffff,%rax
je     1142 <attach_memory+0x12>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.memory = type opaque
@.str = [8 x i8] c"shmat()\00"
@EXIT_FAILURE = global i32 0
define %struct.memory* @attach_memory(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.memory*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @shmat(i32 %4, i32* null, i32 0)
%6 = bitcast i8* %5 to %struct.memory*
store %struct.memory* %6, %struct.memory** %3
%7 = icmp eq %struct.memory* %6, inttoptr (i64 -1 to %struct.memory*)
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load %struct.memory*, %struct.memory** %3
ret %struct.memory* %13
}

LLVM IR (-O2):
%struct.memory = type opaque
@.str = [8 x i8] c"shmat()\00"
@EXIT_FAILURE = global i32 0
define %struct.memory* @attach_memory(i32 %0) {
%2 = tail call i8* @shmat(i32 %0, i32* null, i32 0)
%3 = icmp eq i8* %2, inttoptr (i64 -1 to i8*)
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = bitcast i8* %2 to %struct.memory*
ret %struct.memory* %9
}
long gcd(long x, long y) {
  long tmp;
  while (y) {
    tmp = x % y;
    x = y;
    y = tmp;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113a <gcd+0x3a>
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    110c <gcd+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <gcd+0x35>
mov    %rsi,%rdx
jmp    111d <gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <gcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = srem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}
void kolibri_mark_modified(void *bitmap) {}


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

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

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

LLVM IR (-O2):
define void @kolibri_mark_modified(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
scalar_t__ strtol(char const *, char **, int);
float read_float(const char *sn) {
  char *end;
  float n;
  n = (float)strtol(sn, &end, 10);
  if (sn == end) {
    fprintf(stderr, "%s is not a valid number\n", sn);
    exit(1);
  }
  return n;
}


x86 assembly (clang, -O0):
<read_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1189 <read_float+0x59>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe86(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_float>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
cmp    %rbx,0x8(%rsp)
je     1159 <read_float+0x29>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"%s is not a valid number\0A\00"
define float @read_float(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtol(i8* %5, i8** %3, i32 10)
%7 = sitofp i64 %6 to float
store float %7, float* %4
%8 = load i8*, i8** %2
%9 = load i8*, i8** %3
%10 = icmp eq i8* %8, %9
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %2
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %1
%17 = load float, float* %4
ret float %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"%s is not a valid number\0A\00"
define float @read_float(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, %0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = sitofp i64 %4 to float
ret float %12
}
int att_f(int g(int) __attribute__((stdcall)), int i) { return g(i); }


x86 assembly (clang, -O0):
<att_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<att_f>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @att_f(i32 (i32)* nocapture %0, i32 %1) {
%3 = tail call i32 %0(i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x08() {
  Assert_real((islower(8) == 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_islower.c",
              45, ("islower should be 0 for 0x08"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x08>:
push   %rax
mov    $0x8,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2d,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x08\00"
define void @t_islower_0x08() {
%1 = call i64 @islower(i32 8)
%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 45, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x08\00"
define void @t_islower_0x08() {
%1 = tail call i64 @islower(i32 8)
%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 45, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("debug %d\n", argc);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"debug %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
int abs(int number) { return number < 0 ? -number : number; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ acc_delete(unsigned char *, int const);
void *acc_present_or_create(int /*<<< orphan*/, int const);
int /*<<< orphan*/ free(unsigned char *);
scalar_t__ malloc(int const);
int main(int argc, char **argv) {
  const int N = 256;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  d = acc_present_or_create(0, N);
  if (!d)
    abort();
  acc_delete(h, N);
  free(h);
  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)
movl   $0x100,-0x14(%rbp)
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
xor    %edi,%edi
mov    $0x100,%esi
call   1050 <acc_present_or_create@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    119d <main+0x4d>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x20(%rbp),%rdi
mov    $0x100,%esi
call   1070 <acc_delete@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x100,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
mov    $0x100,%esi
call   1050 <acc_present_or_create@plt>
test   %rax,%rax
je     1188 <main+0x38>
mov    %rbx,%rdi
mov    $0x100,%esi
call   1070 <acc_delete@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 256, i32* %6
%9 = call i64 @malloc(i32 256)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = call i8* @acc_present_or_create(i32 0, i32 256)
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %2
%17 = load i8*, i8** %7
%18 = call i32 @acc_delete(i8* %17, i32 256)
%19 = load i8*, i8** %7
%20 = call i32 @free(i8* %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 256)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i8* @acc_present_or_create(i32 0, i32 256)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = tail call i32 @acc_delete(i8* %4, i32 256)
%11 = tail call i32 @free(i8* %4)
ret i32 0
}
void ff_hevc_put_hevc_uni_epel_hv32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xea() {
  Assert_real((isprint(234) == 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_isprint.c",
              1175, ("isprint should be 0 for 0xea"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xea>:
push   %rax
mov    $0xea,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x497,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xea\00"
define void @t_isprint_0xea() {
%1 = call i64 @isprint(i32 234)
%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 1175, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xea\00"
define void @t_isprint_0xea() {
%1 = tail call i64 @isprint(i32 234)
%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 1175, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};
struct stat {
  int dummy;
};

/* Variables and functions */
struct timespec get_stat_birthtime(struct stat const *st) {
  struct timespec t;
  (void)st;
  t.tv_sec = -1;
  t.tv_nsec = -1;
  return t;
}


x86 assembly (clang, -O0):
<get_stat_birthtime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_stat_birthtime>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.timespec = type { i32, i32 }
define i64 @get_stat_birthtime(%struct.stat* %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %3
%4 = load %struct.stat*, %struct.stat** %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
store i32 -1, i32* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
store i32 -1, i32* %6
%7 = bitcast %struct.timespec* %2 to i64*
%8 = load i64, i64* %7
ret i64 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i64 @get_stat_birthtime(%struct.stat* nocapture readnone %0) {
ret i64 -1
}
void time_subtract(long *tv_sec_from, long *tv_nsec_from, long tv_sec,
                   long tv_nsec) {
  if (*tv_nsec_from < tv_nsec) {
    *tv_sec_from = *tv_sec_from - 1;
    *tv_nsec_from = *tv_nsec_from + 1000000000L;
  }
  *tv_sec_from = *tv_sec_from - tv_sec;
  *tv_nsec_from = *tv_nsec_from - tv_nsec;
  return;
}


x86 assembly (clang, -O0):
<time_subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x20(%rbp),%rax
jge    114c <time_subtract+0x4c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
sub    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x3b9aca00,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
sub    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
sub    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_subtract>:
cmp    %rcx,(%rsi)
jge    1110 <time_subtract+0x10>
addq   $0xffffffffffffffff,(%rdi)
addq   $0x3b9aca00,(%rsi)
sub    %rdx,(%rdi)
sub    %rcx,(%rsi)
ret

LLVM IR (-O0):
define void @time_subtract(i64* %0, i64* %1, i64 %2, i64 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i64
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64*, i64** %6
%10 = load i64, i64* %9
%11 = load i64, i64* %8
%12 = icmp slt i64 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %4
%14 = load i64*, i64** %5
%15 = load i64, i64* %14
%16 = sub nsw i64 %15, 1
%17 = load i64*, i64** %5
store i64 %16, i64* %17
%18 = load i64*, i64** %6
%19 = load i64, i64* %18
%20 = add nsw i64 %19, 1000000000
%21 = load i64*, i64** %6
store i64 %20, i64* %21
br label %22
22: ; preds = %13, %4
%23 = load i64*, i64** %5
%24 = load i64, i64* %23
%25 = load i64, i64* %7
%26 = sub nsw i64 %24, %25
%27 = load i64*, i64** %5
store i64 %26, i64* %27
%28 = load i64*, i64** %6
%29 = load i64, i64* %28
%30 = load i64, i64* %8
%31 = sub nsw i64 %29, %30
%32 = load i64*, i64** %6
store i64 %31, i64* %32
ret void
}

LLVM IR (-O2):
define void @time_subtract(i64* nocapture %0, i64* nocapture %1, i64 %2, i64 %3) {
%5 = load i64, i64* %1
%6 = icmp slt i64 %5, %3
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i64, i64* %0
%9 = add nsw i64 %8, -1
store i64 %9, i64* %0
%10 = load i64, i64* %1
%11 = add nsw i64 %10, 1000000000
store i64 %11, i64* %1
br label %12
12: ; preds = %7, %4
%13 = load i64, i64* %0
%14 = sub nsw i64 %13, %2
store i64 %14, i64* %0
%15 = load i64, i64* %1
%16 = sub nsw i64 %15, %3
store i64 %16, i64* %1
ret void
}
/* Variables and functions */
int *uninit();
void interprocedural_uninit_in_callee_bad() {
  int *p = uninit();
  if (p) {
    int x = *p;
  }
}


x86 assembly (clang, -O0):
<interprocedural_uninit_in_callee_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <uninit@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <interprocedural_uninit_in_callee_bad+0x27>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @interprocedural_uninit_in_callee_bad() {
%1 = tail call i32* (...) @uninit()
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int, char *, int);
char *signal_itoa(int);
void callback(int signum) {
  printf("callback:pid=%3d: reception du signal %s (%d).\n", getpid(),
         signal_itoa(signum), signum);
}


x86 assembly (clang, -O0):
<callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <signal_itoa@plt>
mov    -0x8(%rbp),%esi
mov    %rax,%rdx
mov    -0x4(%rbp),%ecx
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <signal_itoa@plt>
lea    0xeb4(%rip),%rdi
mov    %ebp,%esi
mov    %rax,%rdx
mov    %ebx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"callback:pid=%3d: reception du signal %s (%d).\0A\00"
define void @callback(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = load i32, i32* %2
%5 = call i8* @signal_itoa(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"callback:pid=%3d: reception du signal %s (%d).\0A\00"
define void @callback(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i8* @signal_itoa(i32 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int age;
  printf("Digite a idade de uma pessoa:\n");
  scanf("%d", &age);
  printf("A idade digitada foi: %d\n", age);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Digite a idade de uma pessoa:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"A idade digitada foi: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"A idade digitada foi: %d\0A\00"
@str = [30 x i8] c"Digite a idade de uma pessoa:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
scalar_t__ malloc(int);
void f(pthread_mutex_t *q) {
  pthread_mutex_t *r;
  r = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
  ;
  q = r;
}


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

x86 assembly (clang, -O2):
<f>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define void @f(i32* nocapture readnone %0) {
%2 = tail call i64 @malloc(i32 4)
ret void
}
void ConsoleGetWindowSize() {}


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

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

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

LLVM IR (-O2):
define void @ConsoleGetWindowSize() {
ret void
}
/* Type definitions */
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int NSS_STATUS_SUCCESS;
enum nss_status _nss_noenum_setgrent(void) { return NSS_STATUS_SUCCESS; }


x86 assembly (clang, -O0):
<_nss_noenum_setgrent>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_noenum_setgrent>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@NSS_STATUS_SUCCESS = global i32 0
define i32 @_nss_noenum_setgrent() {
%1 = load i32, i32* @NSS_STATUS_SUCCESS
ret i32 %1
}

LLVM IR (-O2):
@NSS_STATUS_SUCCESS = global i32 0
define i32 @_nss_noenum_setgrent() {
%1 = load i32, i32* @NSS_STATUS_SUCCESS
ret i32 %1
}
void dump_INTC_regs(void) {}


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

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

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

LLVM IR (-O2):
define void @dump_INTC_regs() {
ret void
}
int main(void) {
  static unsigned char char_values[3][6][4][5] = {
      {{
          {0},
      }},
      {{{0}},
       {{0}, {0, ' '}},
       {{0}, {1}, {0, 0, 0, 'A'}, {0, 0, 0, 0, 'x'}},
       {{0}, {0}, {0, 0, 0363}},
       {{0}, {0}, {0, 0, 0, '\n'}}},
      {{{0}},
       {{0}, {0, 0, 0320}},
       {{0}, {0, '0'}, {0, 0, '\''}, {0, '\121'}},
       {{0}},
       {{0}, {0}, {0}, {0, 0, '3', 3}},
       {{0}, {0}, {0}, {0, 0, 0, 0, ')'}}},
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@main.char_values = internal global [3 x [6 x [4 x [5 x i8]]]] [[6 x [4 x [5 x i8]]] zeroinitializer, [6 x [4 x [5 x i8]]] [[4 x [5 x i8]] zeroinitializer, [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] c"\00 \00\00\00", [5 x i8] zeroinitializer, [5 x i8] zeroinitializer], [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] c"\01\00\00\00\00", [5 x i8] c"\00\00\00A\00", [5 x i8] c"\00\00\00\00x"], [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] c"\00\00\F3\00\00", [5 x i8] zeroinitializer], [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] c"\00\00\00\0A\00", [5 x i8] zeroinitializer], [4 x [5 x i8]] zeroinitializer], [6 x [4 x [5 x i8]]] [[4 x [5 x i8]] zeroinitializer, [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] c"\00\00\D0\00\00", [5 x i8] zeroinitializer, [5 x i8] zeroinitializer], [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] c"\000\00\00\00", [5 x i8] c"\00\00'\00\00", [5 x i8] c"\00Q\00\00\00"], [4 x [5 x i8]] zeroinitializer, [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] c"\00\003\03\00"], [4 x [5 x i8]] [[5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] zeroinitializer, [5 x i8] c"\00\00\00\00)"]]]
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int delta;
};
typedef TYPE_1__ XTextItem16;

/* Variables and functions */
void set_XTextItem16_delta(void *_p, int _v) {
  ((XTextItem16 *)_p)->delta = (int)_v;
}


x86 assembly (clang, -O0):
<set_XTextItem16_delta>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XTextItem16_delta>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XTextItem16_delta(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XTextItem16_delta(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_addSin() {
  CALC_appendString("sin");
  CALC_appendString("(");
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"sin\00"
@.str.1 = [2 x i8] c"(\00"
define void @CALC_addSin() {
%1 = call i32 @CALC_appendString(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"sin\00"
@.str.1 = [2 x i8] c"(\00"
define void @CALC_addSin() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int xmlSysIDExists(const char *URL) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @xmlSysIDExists(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ collect_register(int /*<<< orphan*/, void *);
int /*<<< orphan*/ find_regno(char const *);
void collect_register_by_name(const char *name, void *buf) {
  collect_register(find_regno(name), buf);
}


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

x86 assembly (clang, -O2):
<collect_register_by_name>:
push   %rbx
mov    %rsi,%rbx
call   1030 <find_regno@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <collect_register@plt>

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

LLVM IR (-O2):
define void @collect_register_by_name(i8* %0, i8* %1) {
%3 = tail call i32 @find_regno(i8* %0)
%4 = tail call i32 @collect_register(i32 %3, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void print_usage(char *argv) {
  printf("Usage: %s -c perf_hw_counter -n length\n"
         "%s - read perf hardware counters from userspace\n\n"
         "-c\t perf_hw_counter is enum value of hw counter for platform\n"
         "Refer to 'enum perf_hw_id'[file <linux/perf_event.h>] for hw\n"
         "counter enum value in range of 0 to PERF_COUNT_HW_MAX\n"
         "-n\t Length size array will implement busyloop\n"
         "-s\t Sample period [> 1000000 samples]\n"
         "e.g.\n"
         "\t%s -c 0 -n 64 -s 1000000\n",
         argv, argv, argv);
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [380 x i8] c"Usage: %s -c perf_hw_counter -n length\0A%s - read perf hardware counters from userspace\0A\0A-c\09 perf_hw_counter is enum value of hw counter for platform\0ARefer to 'enum perf_hw_id'[file <linux/perf_event.h>] for hw\0Acounter enum value in range of 0 to PERF_COUNT_HW_MAX\0A-n\09 Length size array will implement busyloop\0A-s\09 Sample period [> 1000000 samples]\0Ae.g.\0A\09%s -c 0 -n 64 -s 1000000\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([380 x i8], [380 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [380 x i8] c"Usage: %s -c perf_hw_counter -n length\0A%s - read perf hardware counters from userspace\0A\0A-c\09 perf_hw_counter is enum value of hw counter for platform\0ARefer to 'enum perf_hw_id'[file <linux/perf_event.h>] for hw\0Acounter enum value in range of 0 to PERF_COUNT_HW_MAX\0A-n\09 Length size array will implement busyloop\0A-s\09 Sample period [> 1000000 samples]\0Ae.g.\0A\09%s -c 0 -n 64 -s 1000000\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([380 x i8], [380 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getche();
char get_char_necho() { getche(); }


x86 assembly (clang, -O0):
<get_char_necho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getche@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @get_char_necho() {
%1 = alloca i8
%2 = call i32 (...) @getche()
%3 = load i8, i8* %1
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @get_char_necho() {
%1 = tail call i32 (...) @getche()
ret i8 undef
}