xunge/DecIR huggingface dataset:
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void *bgbrpi_malloc(int sz) {
  void *ptr;
  ptr = malloc(sz);
  memset(ptr, 0, sz);
  return (ptr);
}


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

x86 assembly (clang, -O2):
<bgbrpi_malloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @bgbrpi_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @memset(i8* %6, i32 0, i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @bgbrpi_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
ret i8* %2
}
int fn4(int p[]) { return sizeof p; }


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

x86 assembly (clang, -O2):
<fn4>:
mov    $0x8,%eax
ret

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

LLVM IR (-O2):
define i32 @fn4(i32* nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ generic_handle_irq_desc(unsigned int, int /*<<< orphan*/);
int /*<<< orphan*/ irq_to_desc(unsigned int);
__attribute__((always_)) void generic_handle_irq(unsigned int irq) {
  generic_handle_irq_desc(irq, irq_to_desc(irq));
}


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

x86 assembly (clang, -O2):
<generic_handle_irq>:
push   %rbx
mov    %edi,%ebx
call   1030 <irq_to_desc@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <generic_handle_irq_desc@plt>

LLVM IR (-O0):
define void @generic_handle_irq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @irq_to_desc(i32 %4)
%6 = call i32 @generic_handle_irq_desc(i32 %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @generic_handle_irq(i32 %0) {
%2 = tail call i32 @irq_to_desc(i32 %0)
%3 = tail call i32 @generic_handle_irq_desc(i32 %0, i32 %2)
ret void
}
void exitUptime(void) {}


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

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

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

LLVM IR (-O2):
define void @exitUptime() {
ret void
}
int CPU_getCPUIDFeatures() {
  int features = 0;
  return features;
}


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

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

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

LLVM IR (-O2):
define i32 @CPU_getCPUIDFeatures() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
void imprimeascii() {
  setlocale(LC_ALL, "Portuguese");
  int i;
  for (i = 0; i <= 255; i++)
    printf("%i : %c\n", i, i);
}


x86 assembly (clang, -O0):
<imprimeascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1040 <setlocale@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     1171 <imprimeascii+0x51>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <imprimeascii+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeascii>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <setlocale@plt>
xor    %ebx,%ebx
lea    0xec9(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1150 <imprimeascii+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [9 x i8] c"%i : %c\0A\00"
define void @imprimeascii() {
%1 = alloca i32
%2 = load i32, i32* @LC_ALL
%3 = call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %1
%6 = icmp sle i32 %5, 255
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [9 x i8] c"%i : %c\0A\00"
define void @imprimeascii() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 256
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ puts(char *);
int main(int argc, const char *argv[]) {
  puts(getchar() & 1 ? "YES" : "NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,%ecx
and    $0x1,%ecx
lea    0xebb(%rip),%rdi
lea    0xeb0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
test   $0x1,%al
lea    0xed3(%rip),%rax
lea    0xec8(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\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 = call i32 (...) @getchar()
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}
int get_mem_len(unsigned ModRM) {
  switch (ModRM & 0xc0) {
  case 0x00:
    return ((ModRM & 0x07) == 6) ? 2 : 0;
  case 0x40:
    return 1;
  case 0x80:
    return 2;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<get_mem_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xc0,%eax
mov    %eax,-0xc(%rbp)
je     1141 <get_mem_len+0x41>
jmp    111d <get_mem_len+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     115c <get_mem_len+0x5c>
jmp    112e <get_mem_len+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
je     1168 <get_mem_len+0x68>
jmp    1174 <get_mem_len+0x74>
mov    -0x8(%rbp),%edx
and    $0x7,%edx
xor    %eax,%eax
mov    $0x2,%ecx
cmp    $0x6,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <get_mem_len+0x7b>
movl   $0x1,-0x4(%rbp)
jmp    117b <get_mem_len+0x7b>
movl   $0x2,-0x4(%rbp)
jmp    117b <get_mem_len+0x7b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mem_len>:
mov    %edi,%eax
and    $0xc0,%al
cmp    $0x80,%al
je     111e <get_mem_len+0x1e>
cmp    $0x40,%al
je     1124 <get_mem_len+0x24>
test   %al,%al
jne    112a <get_mem_len+0x2a>
and    $0x7,%edi
xor    %eax,%eax
cmp    $0x6,%edi
sete   %al
add    %eax,%eax
ret
mov    $0x2,%eax
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @get_mem_len(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 192
switch i32 %5, label %14 [
i32 0, label %6
i32 64, label %12
i32 128, label %13
]
6: ; preds = %1
%7 = load i32, i32* %3
%8 = and i32 %7, 7
%9 = icmp eq i32 %8, 6
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 2, i32 0
store i32 %11, i32* %2
br label %15
12: ; preds = %1
store i32 1, i32* %2
br label %15
13: ; preds = %1
store i32 2, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13, %12, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_mem_len(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = and i8 %2, -64
switch i8 %3, label %9 [
i8 0, label %4
i8 64, label %10
i8 -128, label %8
]
4: ; preds = %1
%5 = and i32 %0, 7
%6 = icmp eq i32 %5, 6
%7 = select i1 %6, i32 2, i32 0
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %4
%11 = phi i32 [ 0, %9 ], [ 2, %8 ], [ %7, %4 ], [ 1, %1 ]
ret i32 %11
}
double myabs(double in) {
  if (in < 0.00) {
    in *= -1;
  }
  return in;
}


x86 assembly (clang, -O0):
<myabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <myabs+0x29>
movsd  0xee1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<myabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @myabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fmul double %6, -1.000000e+00
store double %7, double* %2
br label %8
8: ; preds = %5, %1
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @myabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
void usb_amd_quirk_pll_disable(void) {}


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

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

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

LLVM IR (-O2):
define void @usb_amd_quirk_pll_disable() {
ret void
}
/* Variables and functions */
char *strstr(char const *, char const *);
int soru_7(const char s[], const char aranan[]) {
  char *adres = strstr(s, aranan);
  if (adres != NULL) {
    return adres - s;
  }
  return -1;
}


x86 assembly (clang, -O0):
<soru_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114f <soru_7+0x3f>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    1156 <soru_7+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_7>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @soru_7(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @strstr(i8* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %19
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = load i8*, i8** %4
%15 = ptrtoint i8* %13 to i64
%16 = ptrtoint i8* %14 to i64
%17 = sub i64 %15, %16
%18 = trunc i64 %17 to i32
store i32 %18, i32* %3
br label %20
19: ; preds = %2
store i32 -1, i32* %3
br label %20
20: ; preds = %19, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @soru_7(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = select i1 %4, i32 -1, i32 %8
ret i32 %9
}
void updateADS() {}


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

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

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

LLVM IR (-O2):
define void @updateADS() {
ret void
}
void gtk_hbutton_box_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hbutton_box_get_type() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int ms08_067(int /*<<< orphan*/ *);
int read(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int main() {
  wchar_t buffer[128] = {0};
  int i;
  i = read(0, buffer, sizeof(buffer));
  return ms08_067(buffer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1030 <memset@plt>
lea    -0x210(%rbp),%rsi
xor    %edi,%edi
mov    $0x200,%edx
call   1040 <read@plt>
mov    %eax,-0x214(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <ms08_067@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x200,%rsp
mov    %rsp,%rbx
mov    $0x200,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x200,%edx
call   1040 <read@plt>
mov    %rbx,%rdi
call   1050 <ms08_067@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [128 x i32]* %2 to i8*
%5 = getelementptr inbounds [128 x i32], [128 x i32]* %2, i64 0, i64 0
%6 = call i32 @read(i32 0, i32* %5, i32 512)
store i32 %6, i32* %3
%7 = getelementptr inbounds [128 x i32], [128 x i32]* %2, i64 0, i64 0
%8 = call i32 @ms08_067(i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [128 x i32]
%2 = bitcast [128 x i32]* %1 to i8*
%3 = getelementptr inbounds [128 x i32], [128 x i32]* %1, i64 0, i64 0
%4 = call i32 @read(i32 0, i32* %3, i32 512)
%5 = call i32 @ms08_067(i32* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xea() {
  Assert_real((isalnum(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_isalnum.c",
              1175, ("isalnum should be 0 for 0xea"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xea>:
push   %rbp
mov    %rsp,%rbp
mov    $0xea,%edi
call   1030 <isalnum@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_isalnum_0xea>:
push   %rax
mov    $0xea,%edi
call   1030 <isalnum@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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xea\00"
define void @t_isalnum_0xea() {
%1 = call i64 @isalnum(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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xea\00"
define void @t_isalnum_0xea() {
%1 = tail call i64 @isalnum(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
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void TXC3_interrupt_event(void) {}


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

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

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

LLVM IR (-O2):
define void @TXC3_interrupt_event() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *);
int /*<<< orphan*/ stderr;
int _grep_error(char const *message, int ret) {
  fprintf(stderr, "%s: %s\n", "grep", message);
  return ret;
}


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

x86 assembly (clang, -O2):
<_grep_error>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rcx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
lea    0xedb(%rip),%rdx
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [5 x i8] c"grep\00"
define i32 @_grep_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [5 x i8] c"grep\00"
define i32 @_grep_error(i8* %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ subcycle2();
void subcycle1(void) { subcycle2(); }


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

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

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

LLVM IR (-O2):
define void @subcycle1() {
%1 = tail call i32 (...) @subcycle2()
ret void
}
int imx_mmdc_get_ddr_type(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @imx_mmdc_get_ddr_type() {
ret i32 0
}
const char *fizz(int i) {
  if ((i % 3) == 0) {
    return "Fizz";
  } else {
    return "";
  }
}


x86 assembly (clang, -O0):
<fizz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112b <fizz+0x2b>
lea    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1136 <fizz+0x36>
lea    0xed2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fizz>:
imul   $0xaaaaaaab,%edi,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555555,%eax
lea    0xee9(%rip),%rcx
lea    0xee6(%rip),%rax
cmovb  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Fizz\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @fizz(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"Fizz\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @fizz(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void check_malloc(void *p, int line) {
  if (p == NULL) {
    fprintf(stderr, "malloc returned null at line %d", line);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1160 <check_malloc+0x40>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_malloc>:
test   %rdi,%rdi
je     1126 <check_malloc+0x6>
ret
push   %rax
mov    %esi,%edx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"malloc returned null at line %d\00"
@EXIT_FAILURE = global i32 0
define void @check_malloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i32, i32* %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"malloc returned null at line %d\00"
@EXIT_FAILURE = global i32 0
define void @check_malloc(i8* readnone %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret void
}
int dllimport_fn_knrarg(arg)
int arg __attribute__((dllimport));
{ return 0; }


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

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

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

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

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xconfigurerequest_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xconfigurerequest.window;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xconfigurerequest_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xconfigurerequest_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xconfigurerequest_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
float ss2qar();
float ss2qar_() { return ss2qar(); }


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

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

LLVM IR (-O0):
define float @ss2qar_() {
%1 = call float (...) @ss2qar()
ret float %1
}

LLVM IR (-O2):
define float @ss2qar_() {
%1 = tail call float (...) @ss2qar()
ret float %1
}
/* Type definitions */
typedef char int32_t;

/* Variables and functions */
scalar_t__ islower(char const);
int32_t toupper(const int32_t c) { return islower(c) ? 'A' + (c - 'a') : c; }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1143 <toupper+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <toupper+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @toupper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @islower(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 97
%10 = add nsw i32 65, %9
br label %14
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
br label %14
14: ; preds = %11, %6
%15 = phi i32 [ %10, %6 ], [ %13, %11 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @toupper(i8 signext %0) {
%2 = tail call i64 @islower(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void b4(int n) { malloc(n); }


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

x86 assembly (clang, -O2):
<b4>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define void @b4(i32 %0) {
%2 = tail call i32 @malloc(i32 %0)
ret void
}
unsigned long ixp2000_reg_read(volatile void *reg) {
  return *((volatile unsigned long *)reg);
}


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

x86 assembly (clang, -O2):
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @ixp2000_reg_read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @ixp2000_reg_read(i8* %0) {
%2 = bitcast i8* %0 to i64*
%3 = load volatile i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, float *);
int main() {
  int a, b;
  float c;
  scanf("%d %d %f", &a, &b, &c);
  printf("NUMBER = %d\nSALARY = U$ %.2f\n", a, b * c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
cvtsi2ssl -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%edx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
cvtsi2ssl 0x10(%rsp),%xmm0
mulss  0xc(%rsp),%xmm0
cvttss2si %xmm0,%edx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %f\00"
@.str.1 = [30 x i8] c"NUMBER = %d\0ASALARY = U$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, float* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to float
%9 = load float, float* %4
%10 = fmul float %8, %9
%11 = fptosi float %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %f\00"
@.str.1 = [30 x i8] c"NUMBER = %d\0ASALARY = U$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, float* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to float
%11 = load float, float* %3
%12 = fmul float %11, %10
%13 = fptosi float %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LogTextMessage(char *);
__attribute__((no)) void jho_trace_logHeader() {
  LogTextMessage("\tLINE\tTYPE\tNAME\tFIRST_VAL\tLAST_VAL\tMIN\tMAX\tCOUNT");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"\09LINE\09TYPE\09NAME\09FIRST_VAL\09LAST_VAL\09MIN\09MAX\09COUNT\00"
define void @jho_trace_logHeader() {
%1 = call i32 @LogTextMessage(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"\09LINE\09TYPE\09NAME\09FIRST_VAL\09LAST_VAL\09MIN\09MAX\09COUNT\00"
define void @jho_trace_logHeader() {
%1 = tail call i32 @LogTextMessage(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
char *TclpAlloc(unsigned int nbytes) { return (char *)malloc(nbytes); }


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

x86 assembly (clang, -O2):
<TclpAlloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define i8* @TclpAlloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
void display(struct rbnode *node) {}


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

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

LLVM IR (-O0):
%struct.rbnode = type opaque
define void @display(%struct.rbnode* %0) {
%2 = alloca %struct.rbnode*
store %struct.rbnode* %0, %struct.rbnode** %2
ret void
}

LLVM IR (-O2):
%struct.rbnode = type opaque
define void @display(%struct.rbnode* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void *shmemalign(size_t alignment, size_t size) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define noalias i8* @shmemalign(i64 %0, i64 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
/* Type definitions */
typedef int uid_t;

/* Variables and functions */
uid_t geteuid(void) { return 42; }


x86 assembly (clang, -O0):
<geteuid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<geteuid>:
mov    $0x2a,%eax
ret

LLVM IR (-O0):
define i32 @geteuid() {
ret i32 42
}

LLVM IR (-O2):
define i32 @geteuid() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ runMeanderMenu();
void main(int argc, char **argv) { runMeanderMenu(); }


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

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

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @runMeanderMenu()
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @runMeanderMenu()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void pusage(const char *argv0) {
  fprintf(stderr, "USAGE: %s INTERFACE_NAME\n\n", argv0);
  fprintf(stderr, "Exiting execution.\n");
}


x86 assembly (clang, -O0):
<pusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pusage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee7(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"USAGE: %s INTERFACE_NAME\0A\0A\00"
@.str.1 = [20 x i8] c"Exiting execution.\0A\00"
define void @pusage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"USAGE: %s INTERFACE_NAME\0A\0A\00"
@.str.1 = [20 x i8] c"Exiting execution.\0A\00"
define void @pusage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  const int data[5] = {1, 2, 3, 4, 5};
  int i, sum;
  for (i = 0; i >= 0; ++i)
    sum += data[i];
  printf("sum = %i\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     116b <main+0x5b>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
mov    -0x28(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@__const.main.data = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@.str = [10 x i8] c"sum = %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [5 x i32]* %2 to i8*
store i32 0, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %4
%15 = add nsw i32 %14, %13
store i32 %15, i32* %4
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = load i32, i32* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int uint32_t;

/* Variables and functions */
scalar_t__ bm_check(int /*<<< orphan*/ *, int);
int pbm_check(uint64_t **b, uint32_t v) {
  uint32_t top = v >> 16;
  uint32_t bottom = v & 0xFFFF;
  return b[top] && bm_check(b[top], bottom);
}


x86 assembly (clang, -O0):
<pbm_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
xor    %eax,%eax
cmpq   $0x0,(%rcx,%rdx,8)
mov    %al,-0x15(%rbp)
je     1169 <pbm_check+0x59>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x14(%rbp),%esi
call   1030 <bm_check@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbm_check>:
push   %rax
mov    %esi,%eax
sar    $0x10,%eax
cltq
mov    (%rdi,%rax,8),%rdi
test   %rdi,%rdi
je     1136 <pbm_check+0x26>
movzwl %si,%esi
call   1030 <bm_check@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pbm_check(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 16
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 65535
store i32 %10, i32* %6
%11 = load i32**, i32*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32*, i32** %11, i64 %13
%15 = load i32*, i32** %14
%16 = icmp ne i32* %15, null
br i1 %16, label %17, label %26
17: ; preds = %2
%18 = load i32**, i32*** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32*, i32** %18, i64 %20
%22 = load i32*, i32** %21
%23 = load i32, i32* %6
%24 = call i64 @bm_check(i32* %22, i32 %23)
%25 = icmp ne i64 %24, 0
br label %26
26: ; preds = %17, %2
%27 = phi i1 [ false, %2 ], [ %25, %17 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @pbm_check(i32** nocapture %0, i32 %1) {
%3 = ashr i32 %1, 16
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32*, i32** %0, i64 %4
%6 = load i32*, i32** %5
%7 = icmp eq i32* %6, null
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = and i32 %1, 65535
%10 = tail call i64 @bm_check(i32* %6, i32 %9)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %2
%14 = phi i32 [ 0, %2 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ CPUwfi();
void SysCtlDeepSleep(void) {
  (*((volatile unsigned long *)(0xE000ED10))) |= 0x00000004;
  CPUwfi();
  (*((volatile unsigned long *)(0xE000ED10))) &= ~(0x00000004);
}


x86 assembly (clang, -O0):
<SysCtlDeepSleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed10,%eax
mov    (%rax),%rcx
or     $0x4,%rcx
mov    $0xe000ed10,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <CPUwfi@plt>
mov    $0xe000ed10,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffb,%rcx
mov    $0xe000ed10,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlDeepSleep>:
push   %rbx
mov    $0xe000ed10,%ebx
orq    $0x4,(%rbx)
xor    %eax,%eax
call   1030 <CPUwfi@plt>
andq   $0xfffffffffffffffb,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @SysCtlDeepSleep() {
%1 = load volatile i64, i64* inttoptr (i64 3758157072 to i64*)
%2 = or i64 %1, 4
store volatile i64 %2, i64* inttoptr (i64 3758157072 to i64*)
%3 = call i32 (...) @CPUwfi()
%4 = load volatile i64, i64* inttoptr (i64 3758157072 to i64*)
%5 = and i64 %4, -5
store volatile i64 %5, i64* inttoptr (i64 3758157072 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlDeepSleep() {
%1 = load volatile i64, i64* inttoptr (i64 3758157072 to i64*)
%2 = or i64 %1, 4
store volatile i64 %2, i64* inttoptr (i64 3758157072 to i64*)
%3 = tail call i32 (...) @CPUwfi()
%4 = load volatile i64, i64* inttoptr (i64 3758157072 to i64*)
%5 = and i64 %4, -5
store volatile i64 %5, i64* inttoptr (i64 3758157072 to i64*)
ret void
}
int calc_g(int month) {
  int g;
  if (month <= 2) {
    g = month + 13;
  } else {
    g = month + 1;
  }
  return g;
}


x86 assembly (clang, -O0):
<calc_g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     111f <calc_g+0x1f>
mov    -0x4(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x8(%rbp)
jmp    1128 <calc_g+0x28>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_g>:
lea    0x1(%rdi),%ecx
lea    0xd(%rdi),%eax
cmp    $0x3,%edi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @calc_g(i32 %0) {
%2 = icmp slt i32 %0, 3
%3 = select i1 %2, i32 13, i32 1
%4 = add nsw i32 %3, %0
ret i32 %4
}
void gdk_x11_grab_server() {}


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

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

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

LLVM IR (-O2):
define void @gdk_x11_grab_server() {
ret void
}
/* Variables and functions */
char req_swa_char(char *, char const *, char const *, char const *);
char switch_state(const char *hostname, const char *session_id,
                  const char *ain) {
  return req_swa_char("getswitchstate", hostname, session_id, ain);
}


x86 assembly (clang, -O0):
<switch_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdi
call   1030 <req_swa_char@plt>
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"getswitchstate\00"
define signext i8 @switch_state(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call signext i8 @req_swa_char(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
ret i8 %10
}

LLVM IR (-O2):
@.str = [15 x i8] c"getswitchstate\00"
define signext i8 @switch_state(i8* %0, i8* %1, i8* %2) {
%4 = tail call signext i8 @req_swa_char(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret i8 %4
}
void INT_Excep_TPU3_TGI3D(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU3_TGI3D() {
ret void
}