xunge/DecIR huggingface dataset:
void kill_anon_super(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<kill_anon_super>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill_anon_super>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.kill_anon_super = [16 x i8] c"kill_anon_super\00"
define void @kill_anon_super() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.kill_anon_super, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.kill_anon_super = [16 x i8] c"kill_anon_super\00"
define void @kill_anon_super() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.kill_anon_super, i64 0, i64 0))
ret void
}
int file_shutdown(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @file_shutdown() {
ret i32 0
}
void g_date_to_struct_tm() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ write(int, unsigned char *, int);
ssize_t WriteDword(int hFilename, unsigned dValue) {
  unsigned char cBuffer[4];
  cBuffer[0] = dValue & 0xFF;
  cBuffer[1] = (dValue >> 8) & 0xFF;
  cBuffer[2] = (dValue >> 16) & 0xFF;
  cBuffer[3] = (dValue >> 24) & 0xFF;
  return write(hFilename, cBuffer, 4);
}


x86 assembly (clang, -O0):
<WriteDword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x9(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteDword>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @WriteDword(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 1
store i8 %13, i8* %14
%15 = load i32, i32* %4
%16 = lshr i32 %15, 16
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 2
store i8 %18, i8* %19
%20 = load i32, i32* %4
%21 = lshr i32 %20, 24
%22 = and i32 %21, 255
%23 = trunc i32 %22 to i8
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 3
store i8 %23, i8* %24
%25 = load i32, i32* %3
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%27 = call i32 @write(i32 %25, i8* %26, i32 4)
ret i32 %27
}

LLVM IR (-O2):
define i32 @WriteDword(i32 %0, i32 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %1 to i8
store i8 %5, i8* %4
%6 = lshr i32 %1, 8
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = lshr i32 %1, 16
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %10, i8* %11
%12 = lshr i32 %1, 24
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %13, i8* %14
%15 = call i32 @write(i32 %0, i8* %4, i32 4)
ret i32 %15
}
int ft_isalnum(int c) {
  if (c >= 'a' && c <= 'z')
    return (1);
  if (c >= 'A' && c <= 'Z')
    return (1);
  if (c >= 48 && c <= 57)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <ft_isalnum+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <ft_isalnum+0x27>
movl   $0x1,-0x4(%rbp)
jmp    116e <ft_isalnum+0x6e>
cmpl   $0x41,-0x8(%rbp)
jl     1147 <ft_isalnum+0x47>
cmpl   $0x5a,-0x8(%rbp)
jg     1147 <ft_isalnum+0x47>
movl   $0x1,-0x4(%rbp)
jmp    116e <ft_isalnum+0x6e>
cmpl   $0x30,-0x8(%rbp)
jl     1167 <ft_isalnum+0x67>
cmpl   $0x39,-0x8(%rbp)
jg     1167 <ft_isalnum+0x67>
movl   $0x1,-0x4(%rbp)
jmp    116e <ft_isalnum+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %25
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 65
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 90
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %2
br label %25
17: ; preds = %13, %10
%18 = load i32, i32* %3
%19 = icmp sge i32 %18, 48
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sle i32 %21, 57
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 1, i32* %2
br label %25
24: ; preds = %20, %17
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23, %16, %9
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const, char const);
void gotoxy(const char row, const char col) {
  printf("\e["
         "%d;%dH",
         row + 1, col + 1);
}


x86 assembly (clang, -O0):
<gotoxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,%cl
movsbl -0x2(%rbp),%eax
add    $0x1,%eax
lea    0xec5(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotoxy>:
add    $0x1,%dil
add    $0x1,%sil
movsbl %dil,%eax
movsbl %sil,%edx
lea    0xed9(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %8, i8 signext %12)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i8 signext %0, i8 signext %1) {
%3 = add i8 %0, 1
%4 = add i8 %1, 1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %3, i8 signext %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void dump(void *p, int s) {
  int i;
  for (i = s; --i >= 0;)
    printf("%02X", ((unsigned char *)p)[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jl     1156 <dump+0x46>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1125 <dump+0x15>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    115c <dump+0x3c>
mov    %rdi,%r15
mov    %esi,%ebx
add    $0x1,%rbx
lea    0xec7(%rip),%r14
nopl   0x0(%rax)
lea    -0x2(%rbx),%eax
movzbl (%r15,%rax,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1140 <dump+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02X\00"
define void @dump(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = icmp ugt i64 %7, 1
br i1 %14, label %6, label %15
15: ; preds = %6, %2
%16 = tail call i32 @putchar(i32 10)
ret void
}
void scu_dsp_init(void) {}


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

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

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

LLVM IR (-O2):
define void @scu_dsp_init() {
ret void
}
__attribute__((no)) void test(char *p, char c, int len) {
  __builtin_memset(p, c, len);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%eax
movslq -0x10(%rbp),%rdx
movzbl %al,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movslq %edx,%rdx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @test(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = trunc i32 %9 to i8
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
ret void
}

LLVM IR (-O2):
define void @test(i8* nocapture writeonly %0, i8 signext %1, i32 %2) {
%4 = sext i32 %2 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 %1, i64 %4, i1 false)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("unix _");
  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 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"unix _\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned char eeread(int);
int /*<<< orphan*/ eewrite(int, unsigned char);
int /*<<< orphan*/ initTaskList();
void nukeeeprom(void) {
  initTaskList();
  int addr = 0;
  while (addr <= 2047) {
    if (eeread(addr) != ((unsigned char)255))
      eewrite(addr, ((unsigned char)255));
    addr++;
  }
}


x86 assembly (clang, -O0):
<nukeeeprom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <initTaskList@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7ff,-0x4(%rbp)
jg     1184 <nukeeeprom+0x54>
mov    -0x4(%rbp),%edi
call   1050 <eeread@plt>
movzbl %al,%eax
cmp    $0xff,%eax
je     1176 <nukeeeprom+0x46>
mov    -0x4(%rbp),%edi
mov    $0xff,%esi
call   1040 <eewrite@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <nukeeeprom+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nukeeeprom>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <initTaskList@plt>
jmp    114b <nukeeeprom+0x1b>
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x800,%ebx
je     1164 <nukeeeprom+0x34>
mov    %ebx,%edi
call   1050 <eeread@plt>
cmp    $0xff,%al
je     1140 <nukeeeprom+0x10>
mov    %ebx,%edi
mov    $0xff,%esi
call   1040 <eewrite@plt>
jmp    1140 <nukeeeprom+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @nukeeeprom() {
%1 = alloca i32
%2 = call i32 (...) @initTaskList()
store i32 0, i32* %1
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 2047
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call zeroext i8 @eeread(i32 %7)
%9 = zext i8 %8 to i32
%10 = icmp ne i32 %9, 255
br i1 %10, label %11, label %14
11: ; preds = %6
%12 = load i32, i32* %1
%13 = call i32 @eewrite(i32 %12, i8 zeroext -1)
br label %14
14: ; preds = %11, %6
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @nukeeeprom() {
%1 = tail call i32 (...) @initTaskList()
br label %2
2: ; preds = %0, %8
%3 = phi i32 [ 0, %0 ], [ %9, %8 ]
%4 = tail call zeroext i8 @eeread(i32 %3)
%5 = icmp eq i8 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @eewrite(i32 %3, i8 zeroext -1)
br label %8
8: ; preds = %6, %2
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 2048
br i1 %10, label %11, label %2
11: ; preds = %8
ret void
}
/* Variables and functions */
scalar_t__ isupper(int);
int toupper(int c) { return isupper(c) ? (c - 'A' + 'a') : c; }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113e <toupper+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <toupper+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int _sl4_hash_comp_ptr(const void *key1, const void *key2) {
  return (int)(key1 - key2);
}


x86 assembly (clang, -O0):
<_sl4_hash_comp_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sl4_hash_comp_ptr>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @_sl4_hash_comp_ptr(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 = ptrtoint i8* %5 to i64
%8 = ptrtoint i8* %6 to i64
%9 = sub i64 %7, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @_sl4_hash_comp_ptr(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
int struct_get_endian(void) {
  int i = 0x00000001;
  if (((char *)&i)[0]) {
    return 2;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<struct_get_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
cmpb   $0x0,-0x8(%rbp)
je     1121 <struct_get_endian+0x21>
movl   $0x2,-0x4(%rbp)
jmp    1128 <struct_get_endian+0x28>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @struct_get_endian() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 2, i32* %1
br label %9
8: ; preds = %0
store i32 1, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @struct_get_endian() {
ret i32 2
}
void gtk_icon_theme_set_screen() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_set_screen() {
ret void
}
void f(void) {
#pragma acc update
  int i = 0;
  int a[10];
#pragma acc update device(i)
#pragma acc update host(i)
#pragma acc update self(i)
#pragma acc update device(a [1:3])
#pragma acc update host(a [1:3])
#pragma acc update self(a [1:3])
#pragma acc update device(a(1 : 3))
#pragma acc update host(a(1 : 3))
#pragma acc update self(a(1 : 3))
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @malloc_stats() {
ret void
}
double umrechnung_km_in_land_mi(double strecke) {
  const double umrechnungsfaktor = 0.621371;
  double strecke_in_land_mi = strecke * umrechnungsfaktor;
  return strecke_in_land_mi;
}


x86 assembly (clang, -O0):
<umrechnung_km_in_land_mi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @umrechnung_km_in_land_mi(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 6.213710e-01, double* %3
%5 = load double, double* %2
%6 = fmul double %5, 6.213710e-01
store double %6, double* %4
%7 = load double, double* %4
ret double %7
}

LLVM IR (-O2):
define double @umrechnung_km_in_land_mi(double %0) {
%2 = fmul double %0, 6.213710e-01
ret double %2
}
/* Variables and functions */
scalar_t__ is_space_or_tab(char);
char *skip_spaces(char *s) {
  while (is_space_or_tab(*s))
    s++;
  return s;
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_space_or_tab@plt>
cmp    $0x0,%rax
je     1143 <skip_spaces+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_spaces+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <is_space_or_tab@plt>
test   %rax,%rax
jne    1120 <skip_spaces+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_spaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @is_space_or_tab(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @skip_spaces(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @is_space_or_tab(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ clock();
clock_t getTime() { return clock(); }


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

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

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

LLVM IR (-O2):
define i32 @getTime() {
%1 = tail call i32 (...) @clock()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ open_dest_file(char *, int *);
int /*<<< orphan*/ open_src_file(char *, int *);
void file_stuff(char *filename, int *src_fd, int *dest_fd) {
  open_src_file(filename, src_fd);
  open_dest_file(filename, dest_fd);
}


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

x86 assembly (clang, -O2):
<file_stuff>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <open_src_file@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <open_dest_file@plt>

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

LLVM IR (-O2):
define void @file_stuff(i8* %0, i32* %1, i32* %2) {
%4 = tail call i32 @open_src_file(i8* %0, i32* %1)
%5 = tail call i32 @open_dest_file(i8* %0, i32* %2)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
char *_strtok(char const *, char *, int /*<<< orphan*/ *);
int main(void) {
  char const *str = "Hello;World;!";
  char *s;
  s = _strtok(str, ";", NULL);
  return (EXIT_SUCCESS);
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello;World;!\00"
@.str.1 = [2 x i8] c";\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @_strtok(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
store i8* %5, i8** %3
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello;World;!\00"
@.str.1 = [2 x i8] c";\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i8* @_strtok(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void msg_end(void) {
  printf("\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<msg_end>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_end>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@stdout = global i32 0
define void @msg_end() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @msg_end() {
%1 = tail call i32 @putchar(i32 10)
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
int DEC_OP(int x) { return x--; }


x86 assembly (clang, -O0):
<DEC_OP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DEC_OP(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @DEC_OP(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct quickHeap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quickHeapBalanceWithChildren(struct quickHeap *,
                                                int /*<<< orphan*/);
void quickHeapTopChanged(struct quickHeap *h) {
  quickHeapBalanceWithChildren(h, 0);
}


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

x86 assembly (clang, -O2):
<quickHeapTopChanged>:
xor    %esi,%esi
jmp    1030 <quickHeapBalanceWithChildren@plt>

LLVM IR (-O0):
%struct.quickHeap = type { i32 }
define void @quickHeapTopChanged(%struct.quickHeap* %0) {
%2 = alloca %struct.quickHeap*
store %struct.quickHeap* %0, %struct.quickHeap** %2
%3 = load %struct.quickHeap*, %struct.quickHeap** %2
%4 = call i32 @quickHeapBalanceWithChildren(%struct.quickHeap* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.quickHeap = type { i32 }
define void @quickHeapTopChanged(%struct.quickHeap* %0) {
%2 = tail call i32 @quickHeapBalanceWithChildren(%struct.quickHeap* %0, i32 0)
ret void
}
/* Type definitions */
struct xdr_stream {
  int dummy;
};
typedef enum reject_stat { ____Placeholder_reject_stat } reject_stat;

/* Variables and functions */
int xdr_uint(struct xdr_stream *, int *);
int xdr_reject_stat(struct xdr_stream *stream, enum reject_stat *value) {
  return xdr_uint(stream, value);
}


x86 assembly (clang, -O0):
<xdr_reject_stat>:
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   1030 <xdr_uint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_reject_stat>:
jmp    1030 <xdr_uint@plt>

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

LLVM IR (-O2):
%struct.xdr_stream = type { i32 }
define i32 @xdr_reject_stat(%struct.xdr_stream* %0, i32* %1) {
%3 = tail call i32 @xdr_uint(%struct.xdr_stream* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ myExit(int);
int main() {
  myExit(12);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
call   1030 <myExit@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @myExit(i32 12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_IllegalNumberOfArgumentsForOpcode(long p_position) {
  _Error(p_position, "Wrong number of arguments for opcode");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"Wrong number of arguments for opcode\00"
define void @Error_IllegalNumberOfArgumentsForOpcode(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Wrong number of arguments for opcode\00"
define void @Error_IllegalNumberOfArgumentsForOpcode(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gfx_inb(int);
int /*<<< orphan*/ gfx_outb(int, int);
int gfx_vga_set_graphics_bits(void) {
  gfx_outb(0x3CE, 0x06);
  gfx_outb(0x3CF, 0x01);
  gfx_inb(0x3BA);
  gfx_inb(0x3DA);
  gfx_outb(0x3C0, 0x10);
  gfx_outb(0x3C0, 0x01);
  return (0);
}


x86 assembly (clang, -O0):
<gfx_vga_set_graphics_bits>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ce,%edi
mov    $0x6,%esi
call   1040 <gfx_outb@plt>
mov    $0x3cf,%edi
mov    $0x1,%esi
call   1040 <gfx_outb@plt>
mov    $0x3ba,%edi
call   1030 <gfx_inb@plt>
mov    $0x3da,%edi
call   1030 <gfx_inb@plt>
mov    $0x3c0,%edi
mov    $0x10,%esi
call   1040 <gfx_outb@plt>
mov    $0x3c0,%edi
mov    $0x1,%esi
call   1040 <gfx_outb@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_vga_set_graphics_bits>:
push   %rax
mov    $0x3ce,%edi
mov    $0x6,%esi
call   1040 <gfx_outb@plt>
mov    $0x3cf,%edi
mov    $0x1,%esi
call   1040 <gfx_outb@plt>
mov    $0x3ba,%edi
call   1030 <gfx_inb@plt>
mov    $0x3da,%edi
call   1030 <gfx_inb@plt>
mov    $0x3c0,%edi
mov    $0x10,%esi
call   1040 <gfx_outb@plt>
mov    $0x3c0,%edi
mov    $0x1,%esi
call   1040 <gfx_outb@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gfx_vga_set_graphics_bits() {
%1 = call i32 @gfx_outb(i32 974, i32 6)
%2 = call i32 @gfx_outb(i32 975, i32 1)
%3 = call i32 @gfx_inb(i32 954)
%4 = call i32 @gfx_inb(i32 986)
%5 = call i32 @gfx_outb(i32 960, i32 16)
%6 = call i32 @gfx_outb(i32 960, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @gfx_vga_set_graphics_bits() {
%1 = tail call i32 @gfx_outb(i32 974, i32 6)
%2 = tail call i32 @gfx_outb(i32 975, i32 1)
%3 = tail call i32 @gfx_inb(i32 954)
%4 = tail call i32 @gfx_inb(i32 986)
%5 = tail call i32 @gfx_outb(i32 960, i32 16)
%6 = tail call i32 @gfx_outb(i32 960, i32 1)
ret i32 0
}
/* Variables and functions */
scalar_t__ mkdir(char const *, int);
int /*<<< orphan*/ panic(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ perror(char const *);
void mkdir_or_die(const char *path) {
  if (mkdir(path, 0777) != 0) {
    perror(path);
    panic(NULL,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/bjarneh/organice/refs/heads/master/src/"
          "utilz/handy.c",
          224);
  }
}


x86 assembly (clang, -O0):
<mkdir_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
je     1172 <mkdir_or_die+0x42>
mov    -0x8(%rbp),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe98(%rip),%rsi
mov    $0xe0,%edx
call   1040 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir_or_die>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
jne    1145 <mkdir_or_die+0x15>
pop    %rbx
ret
mov    %rbx,%rdi
call   1050 <perror@plt>
lea    0xeac(%rip),%rsi
xor    %edi,%edi
mov    $0xe0,%edx
pop    %rbx
jmp    1040 <panic@plt>

LLVM IR (-O0):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bjarneh/organice/refs/heads/master/src/utilz/handy.c\00"
define void @mkdir_or_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mkdir(i8* %3, i32 511)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @perror(i8* %7)
%9 = call i32 @panic(i32* null, i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 224)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bjarneh/organice/refs/heads/master/src/utilz/handy.c\00"
define void @mkdir_or_die(i8* nocapture %0) {
%2 = tail call i64 @mkdir(i8* %0, i32 511)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
%6 = tail call i32 @panic(i32* null, i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 224)
br label %7
7: ; preds = %4, %1
ret void
}
int get_parent_index(int i) { return (i - 1) >> 1; }


x86 assembly (clang, -O0):
<get_parent_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_parent_index>:
lea    -0x1(%rdi),%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @get_parent_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = ashr i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_parent_index(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
ret i32 %3
}
int test_imm_28uint8_mem(unsigned char *val) {
  return ((*val) & (0x28 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_28uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 40
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void INT_Excep_PERIA_INTA248(void) {}


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

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

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

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

/* Variables and functions */
void exception_handler(uint32_t cause, void *epc, void *regbase) {}


x86 assembly (clang, -O0):
<exception_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @exception_handler(i32 %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
unsigned int convert_endian(unsigned int i) {
  return (i << 24) | ((i << 8) & 0x00ff0000) | ((i >> 8) & 0x0000ff00) |
         ((i >> 24) & 0x000000ff);
}


x86 assembly (clang, -O0):
<convert_endian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_endian>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @convert_endian(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = and i32 %6, 16711680
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = lshr i32 %9, 8
%11 = and i32 %10, 65280
%12 = or i32 %8, %11
%13 = load i32, i32* %2
%14 = lshr i32 %13, 24
%15 = and i32 %14, 255
%16 = or i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @convert_endian(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
const char *Process_Name(void) { return "Process"; }


x86 assembly (clang, -O0):
<Process_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Process_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Process\00"
define i8* @Process_Name() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"Process\00"
define i8* @Process_Name() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
ftn(char *sp) {
  char status;
  while (1) {
    *sp = 0xE8;
    status = *(volatile char *)sp;
    if (status & 0x80)
      break;
  }
}


x86 assembly (clang, -O0):
<ftn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0xe8,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     112f <ftn+0x2f>
jmp    1134 <ftn+0x34>
jmp    1108 <ftn+0x8>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftn>:
movb   $0xe8,(%rdi)
cmpb   $0x0,(%rdi)
jns    1100 <ftn>
ret

LLVM IR (-O0):
define i32 @ftn(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
br label %5
5: ; preds = %1, %14
%6 = load i8*, i8** %3
store i8 -24, i8* %6
%7 = load i8*, i8** %3
%8 = load volatile i8, i8* %7
store i8 %8, i8* %4
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = and i32 %10, 128
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %5
br label %15
14: ; preds = %5
br label %5
15: ; preds = %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ftn(i8* %0) {
br label %2
2: ; preds = %2, %1
store i8 -24, i8* %0
%3 = load volatile i8, i8* %0
%4 = icmp sgt i8 %3, -1
br i1 %4, label %2, label %5
5: ; preds = %2
ret i32 undef
}
/* Variables and functions */
unsigned int hasYearafterTheOffset(unsigned int, int);
int getLastYearOffset(unsigned int startOffset, int limit) {
  int offset = 0;
  while ((startOffset = hasYearafterTheOffset(startOffset, limit)) != 0) {
    offset = startOffset;
  }
  return offset;
}


x86 assembly (clang, -O0):
<getLastYearOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <hasYearafterTheOffset@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1147 <getLastYearOffset+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <getLastYearOffset+0x15>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLastYearOffset>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%ebp
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <hasYearafterTheOffset@plt>
mov    %eax,%ecx
test   %eax,%eax
jne    1120 <getLastYearOffset+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @getLastYearOffset(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = phi i32 [ 0, %2 ], [ %6, %3 ]
%6 = tail call i32 @hasYearafterTheOffset(i32 %4, i32 %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
/* Type definitions */
struct sampler {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct sampler *);
int bmp_close(struct sampler *sampler) {
  free(sampler);
  return 0;
}


x86 assembly (clang, -O0):
<bmp_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sampler = type { i32 }
define i32 @bmp_close(%struct.sampler* %0) {
%2 = alloca %struct.sampler*
store %struct.sampler* %0, %struct.sampler** %2
%3 = load %struct.sampler*, %struct.sampler** %2
%4 = call i32 @free(%struct.sampler* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.sampler = type { i32 }
define i32 @bmp_close(%struct.sampler* nocapture %0) {
%2 = tail call i32 @free(%struct.sampler* %0)
ret i32 0
}
void av_opt_set_q() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_set_q() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void child_timeout_signal(int sig) { exit(1); }


x86 assembly (clang, -O0):
<child_timeout_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<child_timeout_signal>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @child_timeout_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @child_timeout_signal(i32 %0) {
%2 = tail call i32 @exit(i32 1)
unreachable
}
int fun1223() { return 1223; }


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

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

LLVM IR (-O0):
define i32 @fun1223() {
ret i32 1223
}

LLVM IR (-O2):
define i32 @fun1223() {
ret i32 1223
}
int main() {
  int ko = 0;
  auto int g = 2;
  printf("%d", g);
  printf("%d", &g);
  if (1) {
    auto int g = 4;
    if (1) {
      auto int g = 5;
    }
  }
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x2,0xc(%rsp)
lea    0xedc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 0
}