xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i <= 255; i++) {
    printf("%c %d\n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
type_qualifier(q) int *q;
{
  switch (yyselect()) {
  case 21: {
    get_lexval();
    *q = 1;
  } break;
  case 22: {
    get_lexval();
    *q = 2;
  } break;
  }
}


x86 assembly (clang, -O0):
<type_qualifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
call   1030 <yyselect@plt>
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
sub    $0x15,%eax
je     1157 <type_qualifier+0x37>
jmp    1146 <type_qualifier+0x26>
mov    -0x14(%rbp),%eax
sub    $0x16,%eax
je     116d <type_qualifier+0x4d>
jmp    117e <type_qualifier+0x5e>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    117e <type_qualifier+0x5e>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type_qualifier>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <yyselect@plt>
cmp    $0x15,%eax
je     113e <type_qualifier+0x1e>
cmp    $0x16,%eax
jne    114c <type_qualifier+0x2c>
mov    $0x2,%ebp
jmp    1143 <type_qualifier+0x23>
mov    $0x1,%ebp
xor    %eax,%eax
call   1040 <get_lexval@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @type_qualifier(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = call i32 (...) @yyselect()
switch i32 %4, label %11 [
i32 21, label %5
i32 22, label %8
]
5: ; preds = %1
%6 = call i32 (...) @get_lexval()
%7 = load i32*, i32** %3
store i32 1, i32* %7
br label %11
8: ; preds = %1
%9 = call i32 (...) @get_lexval()
%10 = load i32*, i32** %3
store i32 2, i32* %10
br label %11
11: ; preds = %1, %8, %5
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @type_qualifier(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @yyselect()
switch i32 %2, label %7 [
i32 21, label %4
i32 22, label %3
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ 2, %3 ], [ 1, %1 ]
%6 = tail call i32 (...) @get_lexval()
store i32 %5, i32* %0
br label %7
7: ; preds = %4, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ calltrap(int);
int HardReset(void) { calltrap(3); }


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

x86 assembly (clang, -O2):
<HardReset>:
mov    $0x3,%edi
jmp    1030 <calltrap@plt>

LLVM IR (-O0):
define i32 @HardReset() {
%1 = alloca i32
%2 = call i32 @calltrap(i32 3)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @HardReset() {
%1 = tail call i32 @calltrap(i32 3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int strlen(char *);
char *corta_string(char *apuntador) {
  int longitud_string;
  longitud_string = strlen(apuntador);
  if (longitud_string > 0) {
    apuntador = apuntador + 1;
  } else {
    printf("Error, el resultado no es correcto por el tamaño del string");
  }
  return apuntador;
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1153 <corta_string+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    115f <corta_string+0x3f>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    1133 <corta_string+0x13>
add    $0x1,%rbx
jmp    113f <corta_string+0x1f>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Error, el resultado no es correcto por el tama\C3\B1o del string\00"
define i8* @corta_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %2
br label %13
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [61 x i8] c"Error, el resultado no es correcto por el tama\C3\B1o del string\00"
define i8* @corta_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
br label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %0, %6 ]
ret i8* %9
}
void invlpg(void *address) {
  asm volatile("invlpg (%0);" ::"r"(address) : "memory");
}


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

x86 assembly (clang, -O2):
<invlpg>:
invlpg (%rdi)
ret

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

LLVM IR (-O2):
define void @invlpg(i8* %0) {
tail call void asm sideeffect "invlpg ($0);", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
int strequ(char *str1, char *str2, int count) {
  while (count--)
    if (*str1++ != *str2++)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<strequ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1160 <strequ+0x60>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     115b <strequ+0x5b>
movl   $0x0,-0x4(%rbp)
jmp    1167 <strequ+0x67>
jmp    110f <strequ+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strequ>:
mov    %edx,%r8d
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %ecx,%r8d
je     1128 <strequ+0x28>
movzbl (%rdi,%rcx,1),%edx
lea    0x1(%rcx),%rax
cmp    (%rsi,%rcx,1),%dl
mov    %rax,%rcx
je     1110 <strequ+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @strequ(i8* nocapture %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %11, %9 ]
%6 = phi i8* [ %1, %3 ], [ %13, %9 ]
%7 = phi i32 [ %2, %3 ], [ %10, %9 ]
%8 = icmp eq i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %4
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %6
%15 = icmp eq i8 %12, %14
br i1 %15, label %4, label %16
16: ; preds = %4, %9
%17 = phi i32 [ 0, %9 ], [ 1, %4 ]
ret i32 %17
}
/* Variables and functions */
short lswap2(short);
int /*<<< orphan*/ memmove(unsigned char *, unsigned char *, int);
void write_size2blk(unsigned char *datablk, short size) {
  size = lswap2(size);
  memmove(datablk, (unsigned char *)&size, sizeof(short));
}


x86 assembly (clang, -O0):
<write_size2blk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%edi
call   1030 <lswap2@plt>
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xa(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memmove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_size2blk>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <lswap2@plt>
mov    %ax,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <memmove@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @write_size2blk(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = call signext i16 @lswap2(i16 signext %5)
store i16 %6, i16* %4
%7 = load i8*, i8** %3
%8 = bitcast i16* %4 to i8*
%9 = call i32 @memmove(i8* %7, i8* %8, i32 2)
ret void
}

LLVM IR (-O2):
define void @write_size2blk(i8* %0, i16 signext %1) {
%3 = alloca i16
%4 = tail call signext i16 @lswap2(i16 signext %1)
store i16 %4, i16* %3
%5 = bitcast i16* %3 to i8*
%6 = call i32 @memmove(i8* %0, i8* %5, i32 2)
ret void
}
int foo(int x) { return x * 11; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xb,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,4),%eax
lea    (%rdi,%rax,2),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = mul nsw i32 %0, 11
ret i32 %2
}
void pwmWriteDummy(struct wiringPiNodeStruct *node, int pin, int value) {
  return;
}


x86 assembly (clang, -O0):
<pwmWriteDummy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.wiringPiNodeStruct = type opaque
define void @pwmWriteDummy(%struct.wiringPiNodeStruct* %0, i32 %1, i32 %2) {
%4 = alloca %struct.wiringPiNodeStruct*
%5 = alloca i32
%6 = alloca i32
store %struct.wiringPiNodeStruct* %0, %struct.wiringPiNodeStruct** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.wiringPiNodeStruct = type opaque
define void @pwmWriteDummy(%struct.wiringPiNodeStruct* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FMSTR_ProcessSCI();
void FMSTR_Isr(void) { FMSTR_ProcessSCI(); }


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

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

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

LLVM IR (-O2):
define void @FMSTR_Isr() {
%1 = tail call i32 (...) @FMSTR_ProcessSCI()
ret void
}
strcpy7(s1, s2) char *s1, *s2;
{
  do {
    *s1 = *s2;
    if (!*(s2 + 1)) {
      *s1 |= 0x80;
      break;
    }
    ++s1;
  } while (!(*s2++ & 0x80));
}


x86 assembly (clang, -O0):
<strcpy7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
cmpb   $0x0,0x1(%rax)
jne    113a <strcpy7+0x3a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
or     $0x80,%ecx
mov    %cl,(%rax)
jmp    116d <strcpy7+0x6d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    110c <strcpy7+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy7>:
mov    (%rsi),%cl
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %cl,(%rdi,%rax,1)
movzbl 0x1(%rsi,%rax,1),%edx
test   %dl,%dl
je     1129 <strcpy7+0x29>
cmpb   $0x0,(%rsi,%rax,1)
lea    0x1(%rax),%rax
mov    %edx,%ecx
jns    1110 <strcpy7+0x10>
ret
or     $0x80,%cl
mov    %cl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define i32 @strcpy7(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %6
6: ; preds = %23, %2
%7 = load i8*, i8** %5
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
store i8 %8, i8* %9
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %20, label %14
14: ; preds = %6
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = or i32 %17, 128
%19 = trunc i32 %18 to i8
store i8 %19, i8* %15
br label %31
20: ; preds = %6
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
br label %23
23: ; preds = %20
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %5
%26 = load i8, i8* %24
%27 = sext i8 %26 to i32
%28 = and i32 %27, 128
%29 = icmp ne i32 %28, 0
%30 = xor i1 %29, true
br i1 %30, label %6, label %31
31: ; preds = %23, %14
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @strcpy7(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
br label %4
4: ; preds = %13, %2
%5 = phi i8 [ %3, %2 ], [ %9, %13 ]
%6 = phi i8* [ %0, %2 ], [ %14, %13 ]
%7 = phi i8* [ %1, %2 ], [ %8, %13 ]
store i8 %5, i8* %6
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = or i8 %5, -128
store i8 %12, i8* %6
br label %17
13: ; preds = %4
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %7
%16 = icmp sgt i8 %15, -1
br i1 %16, label %4, label %17
17: ; preds = %13, %11
ret i32 undef
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  printf("for test git \n");
  puts("!!!Hello World!!!");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"for test git \0A\00"
@.str.1 = [18 x i8] c"!!!Hello World!!!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"!!!Hello World!!!\00"
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"for test git \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
unsigned int murmur_hash2(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
unsigned int util_string_hash32(const char *str) {
  return murmur_hash2(str, strlen(str), 0);
}


x86 assembly (clang, -O0):
<util_string_hash32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <murmur_hash2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_string_hash32>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1040 <murmur_hash2@plt>

LLVM IR (-O0):
define i32 @util_string_hash32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @murmur_hash2(i8* %3, i32 %5, i32 0)
ret i32 %6
}

LLVM IR (-O2):
define i32 @util_string_hash32(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @murmur_hash2(i8* %0, i32 %2, i32 0)
ret i32 %3
}
void rdu_tfree(void *node) {}


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

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

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

LLVM IR (-O2):
define void @rdu_tfree(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_a_number(int (*number_source)(void)) {
  printf("%d\n", number_source());
}


x86 assembly (clang, -O0):
<print_a_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
mov    %eax,%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_a_number>:
push   %rax
call   *%rdi
lea    0xee6(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @print_a_number(i32 ()* nocapture %0) {
%2 = tail call i32 %0()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
int coord_to_square(const char *coord) {
  return 8 * ((coord[1] | ' ') - 49) + ((coord[0] | ' ') - 97);
}


x86 assembly (clang, -O0):
<coord_to_square>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
or     $0x20,%eax
sub    $0x31,%eax
shl    $0x3,%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
or     $0x20,%ecx
sub    $0x61,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coord_to_square>:
movsbl 0x1(%rdi),%eax
or     $0x20,%eax
shl    $0x3,%eax
movsbl (%rdi),%ecx
or     $0x20,%ecx
add    %ecx,%eax
add    $0xfffffe17,%eax
ret

LLVM IR (-O0):
define i32 @coord_to_square(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = or i32 %6, 32
%8 = sub nsw i32 %7, 49
%9 = mul nsw i32 8, %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = or i32 %13, 32
%15 = sub nsw i32 %14, 97
%16 = add nsw i32 %9, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @coord_to_square(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, 32
%5 = sext i8 %4 to i32
%6 = shl nsw i32 %5, 3
%7 = load i8, i8* %0
%8 = or i8 %7, 32
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, -489
%11 = add nsw i32 %10, %6
ret i32 %11
}
void fd107(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  a:;
    typedef int(*e)[n];
  p014A:
    goto p014A;
    goto a;
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd107>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd107+0x7>

x86 assembly (clang, -O2):
<fd107>:
jmp    1100 <fd107>

LLVM IR (-O0):
define void @fd107(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; No predecessors!
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %20, %17
br label %20
21: ; preds = %21
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd107(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
scalar_t__ mg_unhexn(char const *, int);
void mg_unhex(const char *buf, int len, unsigned char *to) {
  int i;
  for (i = 0; i < len; i += 2) {
    to[i >> 1] = (unsigned char)mg_unhexn(&buf[i], 2);
  }
}


x86 assembly (clang, -O0):
<mg_unhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116b <mg_unhex+0x5b>
mov    -0x8(%rbp),%rdi
movslq -0x1c(%rbp),%rax
add    %rax,%rdi
mov    $0x2,%esi
call   1030 <mg_unhexn@plt>
mov    %al,%dl
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sar    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <mg_unhex+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_unhex>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    114d <mg_unhex+0x3d>
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
lea    (%r14,%rbp,1),%rdi
mov    $0x2,%esi
call   1030 <mg_unhexn@plt>
mov    %al,(%rbx)
add    $0x2,%rbp
add    $0x1,%rbx
cmp    %r15d,%ebp
jl     1130 <mg_unhex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @mg_unhex(i8* %0, i32 %1, i8* nocapture writeonly %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3, %5
%6 = phi i64 [ %12, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i64 @mg_unhexn(i8* %7, i32 2)
%9 = trunc i64 %8 to i8
%10 = lshr exact i64 %6, 1
%11 = getelementptr inbounds i8, i8* %2, i64 %10
store i8 %9, i8* %11
%12 = add nuw i64 %6, 2
%13 = trunc i64 %12 to i32
%14 = icmp slt i32 %13, %1
br i1 %14, label %5, label %15
15: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FP_COMPARE_MEM();
int /*<<< orphan*/ addbyte(int);
void FP_COMPARE_S() {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x6e);
  addbyte(0xc8);
  addbyte(0xf3);
  addbyte(0x0f);
  addbyte(0x5a);
  addbyte(0xc9);
  FP_COMPARE_MEM();
}


x86 assembly (clang, -O0):
<FP_COMPARE_S>:
push   %rbp
mov    %rsp,%rbp
mov    $0x66,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x6e,%edi
call   1040 <addbyte@plt>
mov    $0xc8,%edi
call   1040 <addbyte@plt>
mov    $0xf3,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x5a,%edi
call   1040 <addbyte@plt>
mov    $0xc9,%edi
call   1040 <addbyte@plt>
mov    $0x0,%al
call   1030 <FP_COMPARE_MEM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_COMPARE_S>:
push   %rax
mov    $0x66,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x6e,%edi
call   1040 <addbyte@plt>
mov    $0xc8,%edi
call   1040 <addbyte@plt>
mov    $0xf3,%edi
call   1040 <addbyte@plt>
mov    $0xf,%edi
call   1040 <addbyte@plt>
mov    $0x5a,%edi
call   1040 <addbyte@plt>
mov    $0xc9,%edi
call   1040 <addbyte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <FP_COMPARE_MEM@plt>

LLVM IR (-O0):
define void @FP_COMPARE_S() {
%1 = call i32 @addbyte(i32 102)
%2 = call i32 @addbyte(i32 15)
%3 = call i32 @addbyte(i32 110)
%4 = call i32 @addbyte(i32 200)
%5 = call i32 @addbyte(i32 243)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 90)
%8 = call i32 @addbyte(i32 201)
%9 = call i32 (...) @FP_COMPARE_MEM()
ret void
}

LLVM IR (-O2):
define void @FP_COMPARE_S() {
%1 = tail call i32 @addbyte(i32 102)
%2 = tail call i32 @addbyte(i32 15)
%3 = tail call i32 @addbyte(i32 110)
%4 = tail call i32 @addbyte(i32 200)
%5 = tail call i32 @addbyte(i32 243)
%6 = tail call i32 @addbyte(i32 15)
%7 = tail call i32 @addbyte(i32 90)
%8 = tail call i32 @addbyte(i32 201)
%9 = tail call i32 (...) @FP_COMPARE_MEM()
ret void
}
unsigned int vied_bytepos_to_bitpos(unsigned int bytepos) {
  return bytepos * 8;
}


x86 assembly (clang, -O0):
<vied_bytepos_to_bitpos>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vied_bytepos_to_bitpos>:
lea    0x0(,%rdi,8),%eax
ret

LLVM IR (-O0):
define i32 @vied_bytepos_to_bitpos(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 8
ret i32 %4
}

LLVM IR (-O2):
define i32 @vied_bytepos_to_bitpos(i32 %0) {
%2 = shl i32 %0, 3
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ipsortitp(int **, int *, int, int, int /*<<< orphan*/ *);
void ipsortit(int **a, int *ind, int len, int rlen) {
  ipsortitp(a, ind, len, rlen, NULL);
}


x86 assembly (clang, -O0):
<ipsortit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <ipsortitp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipsortit>:
xor    %r8d,%r8d
jmp    1030 <ipsortitp@plt>

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

LLVM IR (-O2):
define void @ipsortit(i32** %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @ipsortitp(i32** %0, i32* %1, i32 %2, i32 %3, i32* null)
ret void
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  while (*str++) {
    ++len;
  }
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <strlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
long monte_is_odd(long val) {
  if (val == 0) {
    return (0);
  }
  if ((((long)(val / 2)) * 2) == val) {
    return (0);
  } else {
    return (1);
  }
  return (1);
}


x86 assembly (clang, -O0):
<monte_is_odd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <monte_is_odd+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1151 <monte_is_odd+0x51>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
shl    $0x1,%rax
cmp    -0x10(%rbp),%rax
jne    1149 <monte_is_odd+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1151 <monte_is_odd+0x51>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<monte_is_odd>:
test   %rdi,%rdi
je     111c <monte_is_odd+0x1c>
mov    %rdi,%rcx
shr    $0x3f,%rcx
add    %rdi,%rcx
and    $0xfffffffffffffffe,%rcx
xor    %eax,%eax
cmp    %rdi,%rcx
setne  %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @monte_is_odd(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = sdiv i64 %0, 2
%5 = shl nsw i64 %4, 1
%6 = icmp ne i64 %5, %0
%7 = zext i1 %6 to i64
br label %8
8: ; preds = %3, %1
%9 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %9
}
/* Variables and functions */
int japi_getwidth(int);
int j_getwidth(int arg0) { return (japi_getwidth(arg0)); }


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

x86 assembly (clang, -O2):
<j_getwidth>:
jmp    1030 <japi_getwidth@plt>

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

LLVM IR (-O2):
define i32 @j_getwidth(i32 %0) {
%2 = tail call i32 @japi_getwidth(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void sigchld_handler(int sig) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0)
    printf("child %d terminated\n", pid);
  return;
}


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1162 <sigchld_handler+0x42>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <sigchld_handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigchld_handler>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2eb8(%rip),%r15
mov    (%r15),%edx
lea    0xc(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
test   %eax,%eax
jle    117e <sigchld_handler+0x5e>
lea    0xeb3(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1160 <sigchld_handler+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [21 x i8] c"child %d terminated\0A\00"
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [21 x i8] c"child %d terminated\0A\00"
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 -1, i32* %2, i32 %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ %5, %1 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @WNOHANG
%11 = call i32 @waitpid(i32 -1, i32* %2, i32 %10)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %7, %1
ret void
}
/* Variables and functions */
double strtod(char const *, char **);
double atof(const char *s) { return strtod(s, (char **)NULL); }


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

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

LLVM IR (-O0):
define double @atof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @strtod(i8* %3, i8** null)
ret double %4
}

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i8** null)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ w5100_writeSUBR(int /*<<< orphan*/ *);
void w5100_setSubnetMask(uint8_t *addr) { w5100_writeSUBR(addr); }


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

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

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

LLVM IR (-O2):
define void @w5100_setSubnetMask(i32* %0) {
%2 = tail call i32 @w5100_writeSUBR(i32* %0)
ret void
}
/* Variables and functions */
int MinInt(int const, int const);
int MinInt4(const int x, const int y, const int z, const int w) {
  return MinInt(MinInt(x, y), MinInt(z, w));
}


x86 assembly (clang, -O0):
<MinInt4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <MinInt@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <MinInt@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <MinInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MinInt4>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
call   1030 <MinInt@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <MinInt@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <MinInt@plt>

LLVM IR (-O0):
define i32 @MinInt4(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @MinInt(i32 %9, i32 %10)
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @MinInt(i32 %12, i32 %13)
%15 = call i32 @MinInt(i32 %11, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @MinInt4(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @MinInt(i32 %0, i32 %1)
%6 = tail call i32 @MinInt(i32 %2, i32 %3)
%7 = tail call i32 @MinInt(i32 %5, i32 %6)
ret i32 %7
}
void ideintr(void) {}


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

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

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

LLVM IR (-O2):
define void @ideintr() {
ret void
}
/* Variables and functions */
int PnameDef();
PlayerNameDef() {
  int b = -1;
  ;
  b = PnameDef();
  return (b);
}


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

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

LLVM IR (-O0):
define i32 @PlayerNameDef() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i32 (...) @PnameDef()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @PlayerNameDef() {
%1 = tail call i32 (...) @PnameDef()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ init();
void init_master() { init(); }


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

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

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

LLVM IR (-O2):
define void @init_master() {
%1 = tail call i32 (...) @init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void test60_PrintImpl_printReal__E(float f) { printf("%f", (float)f); }


x86 assembly (clang, -O0):
<test60_PrintImpl_printReal__E>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define void @test60_PrintImpl_printReal__E(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @test60_PrintImpl_printReal__E(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int UINT64_C(int);
int next(int *);
double randXorshift(uint64_t s[2]) {
  const union {
    uint64_t i;
    double d;
  } u = {.i = UINT64_C(0x3FF) << 52 | next(s) >> 12};
  return 2.0 * (u.d - 1.5);
}


x86 assembly (clang, -O0):
<randXorshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3ff,%edi
call   1030 <UINT64_C@plt>
mov    $0x34,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <next@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sar    $0xc,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xea5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randXorshift>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3ff,%edi
call   1030 <UINT64_C@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <next@plt>

LLVM IR (-O0):
%union.anon = type { double }
define double @randXorshift(i32* %0) {
%2 = alloca i32*
%3 = alloca %union.anon
store i32* %0, i32** %2
%4 = bitcast %union.anon* %3 to i32*
%5 = call i32 @UINT64_C(i32 1023)
%6 = shl i32 %5, 52
%7 = load i32*, i32** %2
%8 = call i32 @next(i32* %7)
%9 = ashr i32 %8, 12
%10 = or i32 %6, %9
store i32 %10, i32* %4
%11 = bitcast %union.anon* %3 to double*
%12 = load double, double* %11
%13 = fsub double %12, 1.500000e+00
%14 = fmul double 2.000000e+00, %13
ret double %14
}

LLVM IR (-O2):
define double @randXorshift(i32* %0) {
%2 = tail call i32 @UINT64_C(i32 1023)
%3 = tail call i32 @next(i32* %0)
ret double poison
}
int nngrk(long long a, long long b) { return ~(a & b) ? 23 : 42; }


x86 assembly (clang, -O0):
<nngrk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
and    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    $0x2a,%eax
mov    $0x17,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nngrk>:
and    %rsi,%rdi
cmp    $0xffffffffffffffff,%rdi
mov    $0x2a,%ecx
mov    $0x17,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @nngrk(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = and i64 %5, %6
%8 = xor i64 %7, -1
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 23, i32 42
ret i32 %11
}

LLVM IR (-O2):
define i32 @nngrk(i64 %0, i64 %1) {
%3 = and i64 %1, %0
%4 = icmp eq i64 %3, -1
%5 = select i1 %4, i32 42, i32 23
ret i32 %5
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void I2CMasterIntEnableEx(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000010))) |= ui32IntFlags;
}


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

x86 assembly (clang, -O2):
<I2CMasterIntEnableEx>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    -0x8(%rsp),%rcx
or     %rax,0x10(%rcx)
ret

LLVM IR (-O0):
define void @I2CMasterIntEnableEx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add i64 %6, 16
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @I2CMasterIntEnableEx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add i64 %6, 16
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}