xunge/DecIR huggingface dataset:
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *, char const *);
scalar_t__ stat(char const *, struct stat *);
void xstat(const char *path, struct stat *sb) {
  if (stat(path, sb))
    error(1, errno, "stat %s", path);
}


x86 assembly (clang, -O0):
<xstat>:
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 <stat@plt>
cmp    $0x0,%rax
je     1165 <xstat+0x45>
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edi
lea    0xea0(%rip),%rdx
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstat>:
push   %rbx
mov    %rdi,%rbx
call   1030 <stat@plt>
test   %rax,%rax
je     114c <xstat+0x2c>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdx
mov    $0x1,%edi
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <error@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i32 0
@.str = [8 x i8] c"stat %s\00"
define void @xstat(i8* %0, %struct.stat* %1) {
%3 = tail call i64 @stat(i8* %0, %struct.stat* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @error(i32 1, i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a(int);
int main(void) {
  a(10);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @a(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello YearOfProgramming!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [25 x i8] c"Hello YearOfProgramming!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_top(int x) {
  ft_putchar('A');
  while (x > 2) {
    ft_putchar('B');
    x--;
  }
  if (x > 1) {
    ft_putchar('A');
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_print_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x41,%edi
call   1030 <ft_putchar@plt>
cmpl   $0x2,-0x4(%rbp)
jle    1147 <ft_print_top+0x37>
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <ft_print_top+0x15>
cmpl   $0x1,-0x4(%rbp)
jle    115b <ft_print_top+0x4b>
mov    $0x41,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_top>:
push   %rbx
mov    %edi,%ebx
mov    $0x41,%edi
call   1030 <ft_putchar@plt>
cmp    $0x3,%ebx
jl     1144 <ft_print_top+0x34>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1130 <ft_print_top+0x20>
jmp    1149 <ft_print_top+0x39>
cmp    $0x2,%ebx
jne    1153 <ft_print_top+0x43>
mov    $0x41,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_print_top(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ft_putchar(i8 signext 65)
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 @ft_putchar(i8 signext 66)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @ft_putchar(i8 signext 65)
br label %16
16: ; preds = %14, %11
%17 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_print_top(i32 %0) {
%2 = tail call i32 @ft_putchar(i8 signext 65)
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @ft_putchar(i8 signext 66)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %4, label %11
9: ; preds = %1
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %4, %9
%12 = tail call i32 @ft_putchar(i8 signext 65)
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ int64_t;
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ ext_memcpy(scalar_t__ *, int *, int);
int64_t __attribute__((used)) __attribute__((visibility("default")))
test_memcpy(void) {
  int64_t x = 0;
  int32_t low = 0x01234567;
  int32_t high = 0x89abcdef;
  ext_memcpy(&x, &low, 4);
  ext_memcpy(((uint8_t *)&x) + 4, &high, 4);
  return x;
}


x86 assembly (clang, -O0):
<test_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0x1234567,-0xc(%rbp)
movl   $0x89abcdef,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <ext_memcpy@plt>
lea    -0x8(%rbp),%rdi
add    $0x20,%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <ext_memcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_memcpy>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
movl   $0x1234567,0x14(%rsp)
01
movl   $0x89abcdef,0x10(%rsp)
89
lea    0x8(%rsp),%rdi
lea    0x14(%rsp),%rsi
mov    $0x4,%edx
call   1030 <ext_memcpy@plt>
lea    0x28(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x4,%edx
call   1030 <ext_memcpy@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i64 ()* @test_memcpy to i8*)], section "llvm.metadata"
define i64 @test_memcpy() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i32
store i64 0, i64* %1
store i32 19088743, i32* %2
store i32 -1985229329, i32* %3
%4 = call i32 @ext_memcpy(i64* %1, i32* %2, i32 4)
%5 = getelementptr inbounds i64, i64* %1, i64 4
%6 = call i32 @ext_memcpy(i64* %5, i32* %3, i32 4)
%7 = load i64, i64* %1
ret i64 %7
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i64 ()* @test_memcpy to i8*)], section "llvm.metadata"
define i64 @test_memcpy() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%5 = bitcast i32* %2 to i8*
store i32 19088743, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 -1985229329, i32* %3
%7 = call i32 @ext_memcpy(i64* %1, i32* %2, i32 4)
%8 = getelementptr inbounds i64, i64* %1, i64 4
%9 = call i32 @ext_memcpy(i64* %8, i32* %3, i32 4)
%10 = load i64, i64* %1
ret i64 %10
}
unsigned short int f70(unsigned short int x, long int y) {
  return (x << y) + (x >> (8 * 2 - y));
}


x86 assembly (clang, -O0):
<f70>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    $0x10,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f70>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x10,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f70(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = load i64, i64* %4
%13 = sub nsw i64 16, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %11, %14
%16 = add nsw i32 %9, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f70(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 16, %4
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %5
%9 = trunc i32 %8 to i16
ret i16 %9
}
void _chomp(char *str) {
  while (*str && *str != '\n' && *str != '\r')
    str++;
  *str = '\0';
}


x86 assembly (clang, -O0):
<_chomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1142 <_chomp+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     1142 <_chomp+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <_chomp+0x52>
jmp    1163 <_chomp+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <_chomp+0x8>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_chomp>:
mov    $0x2401,%eax
jmp    1114 <_chomp+0x14>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0xd,%rcx
ja     1110 <_chomp+0x10>
bt     %rcx,%rax
jae    1110 <_chomp+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @_chomp(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 10, label %7
i8 13, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
store i8 0, i8* %3
ret void
}
long long give_me_sum(long long a, long long b) {
  long long ret = 0;
  while (a--) {
    ret++;
  }
  return ret + b;
  while (b--) {
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<give_me_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
cmp    $0x0,%rax
je     113e <give_me_sum+0x3e>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <give_me_sum+0x14>
mov    -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<give_me_sum>:
lea    (%rdi,%rsi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @give_me_sum(i64 %0, i64 %1) {
%3 = add nsw i64 %0, %1
ret i64 %3
}
void RTMpIsCpuPossible(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMpIsCpuPossible() {
ret void
}
/* Variables and functions */
scalar_t__ cos(float);
scalar_t__ sin(float);
void Q_sincos(float angle, float *s, float *c) {
  *s = (float)sin(angle);
  *c = (float)cos(angle);
}


x86 assembly (clang, -O0):
<Q_sincos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sin@plt>
cvtsi2ss %rax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
call   1040 <cos@plt>
cvtsi2ss %rax,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_sincos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  %xmm0,0x4(%rsp)
call   1030 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1040 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Q_sincos(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = call i64 @sin(float %7)
%9 = sitofp i64 %8 to float
%10 = load float*, float** %5
store float %9, float* %10
%11 = load float, float* %4
%12 = call i64 @cos(float %11)
%13 = sitofp i64 %12 to float
%14 = load float*, float** %6
store float %13, float* %14
ret void
}

LLVM IR (-O2):
define void @Q_sincos(float %0, float* nocapture writeonly %1, float* nocapture writeonly %2) {
%4 = tail call i64 @sin(float %0)
%5 = sitofp i64 %4 to float
store float %5, float* %1
%6 = tail call i64 @cos(float %0)
%7 = sitofp i64 %6 to float
store float %7, float* %2
ret void
}
float f_cycle(float b_num) {
  float x;
  float y;
  float z;
  y = 3.14;
  z = 2.0;
  x = z * y * b_num;
  return x;
}


x86 assembly (clang, -O0):
<f_cycle>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @f_cycle(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %2
store float 0x40091EB860000000, float* %4
store float 2.000000e+00, float* %5
%6 = load float, float* %5
%7 = load float, float* %4
%8 = fmul float %6, %7
%9 = load float, float* %2
%10 = fmul float %8, %9
store float %10, float* %3
%11 = load float, float* %3
ret float %11
}

LLVM IR (-O2):
define float @f_cycle(float %0) {
%2 = fmul float %0, 0x40191EB860000000
ret float %2
}
/* Variables and functions */
scalar_t__ get_mempolicy(int *, int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int);
int numa_get_interleave_node(void) {
  int nd;
  if (get_mempolicy(&nd, NULL, 0, 0, (1 << 0)) == 0)
    return nd;
  return 0;
}


x86 assembly (clang, -O0):
<numa_get_interleave_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <get_mempolicy@plt>
cmp    $0x0,%rax
jne    1144 <numa_get_interleave_node+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <numa_get_interleave_node+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numa_get_interleave_node>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
lea    0xc(%rsp),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <get_mempolicy@plt>
test   %rax,%rax
jne    1136 <numa_get_interleave_node+0x26>
mov    0xc(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @numa_get_interleave_node() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @get_mempolicy(i32* %1, i32* null, i32 0, i32 0, i32 1)
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* %1
%6 = select i1 %4, i32 %5, i32 0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void swap_elems(void *a, void *b, size_t size, void *swap_space) {
  if (a != b) {
    memcpy(swap_space, a, size);
    memcpy(a, b, size);
    memcpy(b, swap_space, size);
  }
}


x86 assembly (clang, -O0):
<swap_elems>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1169 <swap_elems+0x59>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_elems>:
cmp    %rsi,%rdi
je     115b <swap_elems+0x4b>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    %rcx,%rdi
mov    %rbx,%rsi
call   1030 <memcpy@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>
ret

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

LLVM IR (-O2):
define void @swap_elems(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = icmp eq i8* %0, %1
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %2)
%8 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%9 = tail call i32 @memcpy(i8* %1, i8* %3, i64 %2)
br label %10
10: ; preds = %6, %4
ret void
}
void smash_tilde(char *str) {
  for (; *str != '\0'; str++) {
    if (*str == '~')
      *str = '-';
  }
  return;
}


x86 assembly (clang, -O0):
<smash_tilde>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <smash_tilde+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jne    112f <smash_tilde+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x2d,(%rax)
jmp    1134 <smash_tilde+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <smash_tilde+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smash_tilde>:
jmp    1117 <smash_tilde+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2d,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x7e,%al
je     1110 <smash_tilde+0x10>
test   %al,%al
jne    1113 <smash_tilde+0x13>
ret

LLVM IR (-O0):
define void @smash_tilde(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 126
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %2
store i8 45, i8* %14
br label %15
15: ; preds = %13, %8
br label %16
16: ; preds = %15
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @smash_tilde(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 126, label %5
]
5: ; preds = %2
store i8 45, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
double _Complex fun_double_complex(void) { return 2.5 + 3.5i; }


x86 assembly (clang, -O0):
<fun_double_complex>:
push   %rbp
mov    %rsp,%rbp
movabs $0x4004000000000000,%rax
mov    %rax,-0x10(%rbp)
movabs $0x400c000000000000,%rax
mov    %rax,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_double_complex>:
movsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
ret

LLVM IR (-O0):
define { double, double } @fun_double_complex() {
%1 = alloca { double, double }
%2 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%3 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 2.500000e+00, double* %2
store double 3.500000e+00, double* %3
%4 = load { double, double }, { double, double }* %1
ret { double, double } %4
}

LLVM IR (-O2):
define { double, double } @fun_double_complex() {
ret { double, double } { double 2.500000e+00, double 3.500000e+00 }
}
int check_ptrace() {
  int ret;
  asm("int $0x80" : "=a"(ret) : "a"(26), "b"(0), "c"(0), "d"(0), "S"(0));
  return ret;
}


x86 assembly (clang, -O0):
<check_ptrace>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x1a,%eax
xor    %esi,%esi
mov    %esi,%ebx
mov    %esi,%ecx
mov    %esi,%edx
int    $0x80
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ptrace>:
push   %rbx
mov    $0x1a,%eax
xor    %ebx,%ebx
xor    %ecx,%ecx
xor    %esi,%esi
xor    %edx,%edx
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_ptrace() {
%1 = alloca i32
%2 = call i32 asm "int $$0x80", "={ax},{ax},{bx},{cx},{dx},{si},~{dirflag},~{fpsr},~{flags}"(i32 26, i32 0, i32 0, i32 0, i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @check_ptrace() {
%1 = tail call i32 asm "int $$0x80", "={ax},{ax},{bx},{cx},{dx},{si},~{dirflag},~{fpsr},~{flags}"(i32 26, i32 0, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xe3() {
  Assert_real((isascii(227) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              1140, ("isascii should be 0 for 0xe3"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xe3>:
push   %rax
mov    $0xe3,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x474,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xe3\00"
define void @t_isascii_0xe3() {
%1 = call i64 @isascii(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xe3\00"
define void @t_isascii_0xe3() {
%1 = tail call i64 @isascii(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float check_value(float new) {
  if (new < 1.0) {
    return 1.0;
  } else if (new > 10.0) {
    return 10.0;
  }
  return new;
}


x86 assembly (clang, -O0):
<check_value>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <check_value+0x36>
movss  0xee8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <check_value+0x72>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1163 <check_value+0x63>
movss  0xeb7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <check_value+0x72>
jmp    1168 <check_value+0x68>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_value>:
movss  0xef8(%rip),%xmm1
minss  %xmm0,%xmm1
movss  0xef0(%rip),%xmm2
cmpltss %xmm2,%xmm0
movaps %xmm0,%xmm3
andnps %xmm1,%xmm3
andps  %xmm2,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @check_value(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp olt double %5, 1.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store float 1.000000e+00, float* %2
br label %16
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fcmp ogt double %10, 1.000000e+01
br i1 %11, label %12, label %13
12: ; preds = %8
store float 1.000000e+01, float* %2
br label %16
13: ; preds = %8
br label %14
14: ; preds = %13
%15 = load float, float* %3
store float %15, float* %2
br label %16
16: ; preds = %14, %12, %7
%17 = load float, float* %2
ret float %17
}

LLVM IR (-O2):
define float @check_value(float %0) {
%2 = fcmp olt float %0, 1.000000e+00
%3 = fcmp ogt float %0, 1.000000e+01
%4 = select i1 %3, float 1.000000e+01, float %0
%5 = select i1 %2, float 1.000000e+00, float %4
ret float %5
}
/* Variables and functions */
void *exibeMsgErro(char *msg, int linha, int coluna, char *esperado,
                   char *encontrado) {
  return NULL;
}


x86 assembly (clang, -O0):
<exibeMsgErro>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @exibeMsgErro(i8* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @exibeMsgErro(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA2_Stream5_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @DMA2_Stream5_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @DMA2_Stream5_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
void gtk_list_store_set_valist() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @PrintMemoryStatistics() {
ret void
}
void vnum_test4(int *data) {
  int n;
  int j = data[1] * data[3];
  int i = data[3];
  int m = data[1];
  int k = data[2];
  data[k] = 2;
  n = i * m;
  data[0] = n - j;
}


x86 assembly (clang, -O0):
<vnum_test4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
imul   0xc(%rcx),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnum_test4>:
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @vnum_test4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %2
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 3
%13 = load i32, i32* %12
%14 = mul nsw i32 %10, %13
store i32 %14, i32* %4
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 3
%17 = load i32, i32* %16
store i32 %17, i32* %5
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* %19
store i32 %20, i32* %6
%21 = load i32*, i32** %2
%22 = getelementptr inbounds i32, i32* %21, i64 2
%23 = load i32, i32* %22
store i32 %23, i32* %7
%24 = load i32*, i32** %2
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
store i32 2, i32* %27
%28 = load i32, i32* %5
%29 = load i32, i32* %6
%30 = mul nsw i32 %28, %29
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = sub nsw i32 %31, %32
%34 = load i32*, i32** %2
%35 = getelementptr inbounds i32, i32* %34, i64 0
store i32 %33, i32* %35
ret void
}

LLVM IR (-O2):
define void @vnum_test4(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 2, i32* %5
store i32 0, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, char *);
void htmlcolor(int r, int g, int b, char *name) {
  printf("R: %d, G: %d, B: %d (%s)\n", r, g, b, name);
}


x86 assembly (clang, -O0):
<htmlcolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htmlcolor>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"R: %d, G: %d, B: %d (%s)\0A\00"
define void @htmlcolor(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"R: %d, G: %d, B: %d (%s)\0A\00"
define void @htmlcolor(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ log_end();
void test_fail() {
  log_end();
  exit(200);
}


x86 assembly (clang, -O0):
<test_fail>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <log_end@plt>
mov    $0xc8,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test_fail>:
push   %rax
xor    %eax,%eax
call   1030 <log_end@plt>
mov    $0xc8,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @test_fail() {
%1 = call i32 (...) @log_end()
%2 = call i32 @exit(i32 200)
unreachable
}

LLVM IR (-O2):
define void @test_fail() {
%1 = tail call i32 (...) @log_end()
%2 = tail call i32 @exit(i32 200)
unreachable
}
int voidptr_copy(void *dst, void *src) {
  *((void **)dst) = *((void **)src);
  return 0;
}


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

x86 assembly (clang, -O2):
<voidptr_copy>:
mov    (%rsi),%rax
mov    %rax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @voidptr_copy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i8**
store i8* %7, i8** %9
ret i32 0
}

LLVM IR (-O2):
define i32 @voidptr_copy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %0 to i8**
store i8* %4, i8** %5
ret i32 0
}
int B(int k, int j) { return ~A(k) << j; }


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <A@plt>
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
call   1030 <A@plt>
not    %eax
mov    %ebx,%ecx
shl    %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @B(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @A to i32 (i32, ...)*)(i32 %5)
%7 = xor i32 %6, -1
%8 = load i32, i32* %4
%9 = shl i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @B(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @A to i32 (i32, ...)*)(i32 %0)
%4 = xor i32 %3, -1
%5 = shl i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ core10_swap(char *, int);
void U_EMRPOLYPOLYLINE16_swap(char *record, int torev) {
  core10_swap(record, torev);
}


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

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

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

LLVM IR (-O2):
define void @U_EMRPOLYPOLYLINE16_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core10_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ complete_option_name(char const *, int /*<<< orphan*/,
                                        int /*<<< orphan*/);
void complete_real_option_names(const char beginning[]) {
  complete_option_name(beginning, 0, 0);
}


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

x86 assembly (clang, -O2):
<complete_real_option_names>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <complete_option_name@plt>

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

LLVM IR (-O2):
define void @complete_real_option_names(i8* %0) {
%2 = tail call i32 @complete_option_name(i8* %0, i32 0, i32 0)
ret void
}
int process_cach_fin() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @process_cach_fin() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int gamma_dummy_set_option(void *state, const char *key, const char *value) {
  fprintf(stderr, "Unknown method parameter: `%s'.\n", key);
  return -1;
}


x86 assembly (clang, -O0):
<gamma_dummy_set_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_dummy_set_option>:
push   %rax
mov    %rsi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Unknown method parameter: `%s'.\0A\00"
define i32 @gamma_dummy_set_option(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Unknown method parameter: `%s'.\0A\00"
define i32 @gamma_dummy_set_option(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 -1
}
void signal_swallow(int num) {}


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

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

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

LLVM IR (-O2):
define void @signal_swallow(i32 %0) {
ret void
}
void foo814(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo814(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gumbo_user_free(void *);
void gumbo_free(void *ptr) { gumbo_user_free(ptr); }


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

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

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

LLVM IR (-O2):
define void @gumbo_free(i8* %0) {
%2 = tail call i32 @gumbo_user_free(i8* %0)
ret void
}
void s3c_pm_saved_gpios(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
size_t fwrite(void const *, size_t, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void xfwrite(const void *str, size_t len, size_t count, FILE *out) {
  if (fwrite(str, len, count, out) < count)
    fprintf(stderr, "\nError in writing or end of file.\n");
}


x86 assembly (clang, -O0):
<xfwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <fwrite@plt>
cmp    -0x18(%rbp),%rax
jae    116c <xfwrite+0x4c>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfwrite>:
push   %rbx
mov    %rdx,%rbx
call   1040 <fwrite@plt>
cmp    %rbx,%rax
jae    1144 <xfwrite+0x24>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"\0AError in writing or end of file.\0A\00"
define void @xfwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fwrite(i8* %9, i64 %10, i64 %11, i32* %12)
%14 = load i64, i64* %7
%15 = icmp ult i64 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %4
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %16, %4
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"\0AError in writing or end of file.\0A\00"
define void @xfwrite(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = icmp ult i64 %5, %2
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ df_du(double);
double fmax(int /*<<< orphan*/, int);
double fplus(double u) { return fmax(df_du(u), 0.); }


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

x86 assembly (clang, -O2):
<fplus>:
push   %rax
call   1030 <df_du@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <fmax@plt>

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

LLVM IR (-O2):
define double @fplus(double %0) {
%2 = tail call i32 @df_du(double %0)
%3 = tail call double @fmax(i32 %2, i32 0)
ret double %3
}
/* Variables and functions */
int r0n(int);
int rnm(int n, int m) {
  int k;
  do {
    k = r0n(m + 1);
  } while (k < n || k > m);
  return k;
}


x86 assembly (clang, -O0):
<rnm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <r0n@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%al
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jl     1149 <rnm+0x39>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    111e <rnm+0xe>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnm>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
lea    0x1(%r14),%ebx
nopl   (%rax)
mov    %ebx,%edi
call   1030 <r0n@plt>
cmp    %ebp,%eax
jl     1120 <rnm+0x10>
cmp    %r14d,%eax
jg     1120 <rnm+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rnm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = call i32 @r0n(i32 %8)
store i32 %9, i32* %5
br label %10
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = icmp sgt i32 %15, %16
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ true, %10 ], [ %17, %14 ]
br i1 %19, label %6, label %20
20: ; preds = %18
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @rnm(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 1
br label %4
4: ; preds = %4, %2
%5 = tail call i32 @r0n(i32 %3)
%6 = icmp slt i32 %5, %0
%7 = icmp sgt i32 %5, %1
%8 = or i1 %6, %7
br i1 %8, label %4, label %9
9: ; preds = %4
ret i32 %5
}
void iiEllisInit(void) {}


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

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

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

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