xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
void *checked_malloc(size_t nmemb, size_t size) {
  void *p;
  if (size > ((size_t)-1) / nmemb)
    abort();
  p = malloc(nmemb * size);
  if (!p)
    abort();
  return p;
}


x86 assembly (clang, -O0):
<checked_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x8(%rbp)
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jbe    115e <checked_malloc+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1182 <checked_malloc+0x62>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_malloc>:
push   %rax
mov    %rdi,%rax
mul    %rsi
jo     113c <checked_malloc+0x1c>
imul   %rdi,%rsi
mov    %rsi,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     113c <checked_malloc+0x1c>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @checked_malloc(i64 %0, i64 %1) {
%3 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)
%4 = extractvalue { i64, i1 } %3, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = mul i64 %1, %0
%9 = tail call i8* @malloc(i64 %8)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %7
ret i8* %9
}
adr0adr1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*((short *)10000000)) <= (*((short *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0adr1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x989680,%eax
movswl (%rax),%eax
mov    $0xa98ac7,%ecx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jg     1143 <adr0adr1+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <adr0adr1+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0adr1>:
movzwl 0x989680,%ecx
xor    %eax,%eax
cmp    0xa98ac7,%cx
setle  %al
ret

LLVM IR (-O0):
define i32 @adr0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* inttoptr (i64 10000000 to i16*)
%17 = sext i16 %16 to i32
%18 = load i16, i16* inttoptr (i64 11111111 to i16*)
%19 = sext i16 %18 to i32
%20 = icmp sle i32 %17, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @adr0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = load i16, i16* inttoptr (i64 10000000 to i16*)
%8 = load i16, i16* inttoptr (i64 11111111 to i16*)
%9 = icmp sle i16 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
char *level0_0_s(char *, size_t, int, char *, size_t *);
int /*<<< orphan*/ ntos(int, char *, size_t *);
char *level0_0(int num, int ge, char *regstr, size_t *reglen) {
  char str[128], *s = str, d;
  size_t len = sizeof str;
  ntos(num, str, &len);
  return level0_0_s(str, len, ge, regstr, reglen);
}


x86 assembly (clang, -O0):
<level0_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
lea    -0xa0(%rbp),%rax
mov    %rax,-0xa8(%rbp)
movq   $0x80,-0xb8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa0(%rbp),%rsi
lea    -0xb8(%rbp),%rdx
call   1030 <ntos@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1040 <level0_0_s@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<level0_0>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x98,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%ebp
movq   $0x80,0x8(%rsp)
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%rdx
mov    %r15,%rsi
call   1030 <ntos@plt>
mov    0x8(%rsp),%rsi
mov    %r15,%rdi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    %r14,%r8
call   1040 <level0_0_s@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @level0_0(i32 %0, i32 %1, i8* %2, i64* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca [128 x i8]
%10 = alloca i8*
%11 = alloca i8
%12 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64* %3, i64** %8
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
store i8* %13, i8** %10
store i64 128, i64* %12
%14 = load i32, i32* %5
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%16 = call i32 @ntos(i32 %14, i8* %15, i64* %12)
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%18 = load i64, i64* %12
%19 = load i32, i32* %6
%20 = load i8*, i8** %7
%21 = load i64*, i64** %8
%22 = call i8* @level0_0_s(i8* %17, i64 %18, i32 %19, i8* %20, i64* %21)
ret i8* %22
}

LLVM IR (-O2):
define i8* @level0_0(i32 %0, i32 %1, i8* %2, i64* %3) {
%5 = alloca [128 x i8]
%6 = alloca i64
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%8 = bitcast i64* %6 to i8*
store i64 128, i64* %6
%9 = call i32 @ntos(i32 %0, i8* %7, i64* %6)
%10 = load i64, i64* %6
%11 = call i8* @level0_0_s(i8* %7, i64 %10, i32 %1, i8* %2, i64* %3)
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
struct ip {
  int /*<<< orphan*/ ip_dst;
  int /*<<< orphan*/ ip_src;
};

/* Variables and functions */
int isOccasionalIPDst(int /*<<< orphan*/);
int isOccasionalIPSrc(int /*<<< orphan*/);
int isOccasionalIP(const u_char *p, int source) {
  return source ? isOccasionalIPSrc(((struct ip *)(p + 14))->ip_src)
                : isOccasionalIPDst(((struct ip *)(p + 14))->ip_dst);
}


x86 assembly (clang, -O0):
<isOccasionalIP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114d <isOccasionalIP+0x2d>
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%edi
call   1030 <isOccasionalIPSrc@plt>
mov    %eax,-0x10(%rbp)
jmp    115c <isOccasionalIP+0x3c>
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%edi
call   1040 <isOccasionalIPDst@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOccasionalIP>:
test   %esi,%esi
je     112c <isOccasionalIP+0xc>
mov    0x3c(%rdi),%edi
jmp    1030 <isOccasionalIPSrc@plt>
mov    0x38(%rdi),%edi
jmp    1040 <isOccasionalIPDst@plt>

LLVM IR (-O0):
%struct.ip = type { i32, i32 }
define i32 @isOccasionalIP(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 14
%10 = bitcast i32* %9 to %struct.ip*
%11 = getelementptr inbounds %struct.ip, %struct.ip* %10, i32 0, i32 1
%12 = load i32, i32* %11
%13 = call i32 @isOccasionalIPSrc(i32 %12)
br label %21
14: ; preds = %2
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 14
%17 = bitcast i32* %16 to %struct.ip*
%18 = getelementptr inbounds %struct.ip, %struct.ip* %17, i32 0, i32 0
%19 = load i32, i32* %18
%20 = call i32 @isOccasionalIPDst(i32 %19)
br label %21
21: ; preds = %14, %7
%22 = phi i32 [ %13, %7 ], [ %20, %14 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @isOccasionalIP(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i32, i32* %0, i64 15
%6 = load i32, i32* %5
%7 = tail call i32 @isOccasionalIPSrc(i32 %6)
br label %12
8: ; preds = %2
%9 = getelementptr inbounds i32, i32* %0, i64 14
%10 = load i32, i32* %9
%11 = tail call i32 @isOccasionalIPDst(i32 %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ %7, %4 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ heap_shutdown();
int /*<<< orphan*/ verify_heap();
void teardown() {
  verify_heap();
  heap_shutdown();
}


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

x86 assembly (clang, -O2):
<teardown>:
push   %rax
xor    %eax,%eax
call   1030 <verify_heap@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <heap_shutdown@plt>

LLVM IR (-O0):
define void @teardown() {
%1 = call i32 (...) @verify_heap()
%2 = call i32 (...) @heap_shutdown()
ret void
}

LLVM IR (-O2):
define void @teardown() {
%1 = tail call i32 (...) @verify_heap()
%2 = tail call i32 (...) @heap_shutdown()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_add_Rn(FILE *stream, unsigned char n) {
  fprintf(stream, "ADD   A, R%X                     ", n);
}


x86 assembly (clang, -O0):
<fprint_add_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_add_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"ADD A, R%X \00"
define void @fprint_add_Rn(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"ADD A, R%X \00"
define void @fprint_add_Rn(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
int util_do_nothing() { return 1; }


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

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

LLVM IR (-O0):
define i32 @util_do_nothing() {
ret i32 1
}

LLVM IR (-O2):
define i32 @util_do_nothing() {
ret i32 1
}
/* Variables and functions */
double atof(char *);
double getDoubleVar(char s[]) {
  int i;
  char tmp[100];
  for (i = 1; s[i] != '\0'; i++) {
    tmp[i - 1] = s[i];
  }
  return atof(tmp);
}


x86 assembly (clang, -O0):
<getDoubleVar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115d <getDoubleVar+0x4d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %cl,-0x70(%rbp,%rax,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <getDoubleVar+0x13>
lea    -0x70(%rbp),%rdi
call   1030 <atof@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getDoubleVar>:
sub    $0x68,%rsp
mov    0x1(%rdi),%al
test   %al,%al
je     1130 <getDoubleVar+0x20>
xor    %ecx,%ecx
nopl   (%rax)
mov    %al,(%rsp,%rcx,1)
movzbl 0x2(%rdi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1120 <getDoubleVar+0x10>
mov    %rsp,%rdi
call   1030 <atof@plt>
add    $0x68,%rsp
ret

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

LLVM IR (-O2):
define double @getDoubleVar(i8* nocapture %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %1, %7
%8 = phi i64 [ %12, %7 ], [ 1, %1 ]
%9 = phi i8 [ %14, %7 ], [ %5, %1 ]
%10 = add nsw i64 %8, -1
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %10
store i8 %9, i8* %11
%12 = add nuw nsw i64 %8, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %1
%17 = call double @atof(i8* %3)
ret double %17
}
/* Variables and functions */
int func1b();
int func2();
int main(int argc, char *argv[]) { return func2() + func1b() == 3 ? 0 : 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <func2@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <func1b@plt>
mov    -0x14(%rbp),%edx
add    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x3,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <func2@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <func1b@plt>
add    %ebx,%eax
xor    %ecx,%ecx
cmp    $0x3,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @func2()
%7 = call i32 (...) @func1b()
%8 = add nsw i32 %6, %7
%9 = icmp eq i32 %8, 3
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @func2()
%4 = tail call i32 (...) @func1b()
%5 = add nsw i32 %4, %3
%6 = icmp ne i32 %5, 3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void xlFreeString(char *str) { free(str); }


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

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

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

LLVM IR (-O2):
define void @xlFreeString(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ff_hevc_put_hevc_epel_h48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h48_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EMLINK;
int /*<<< orphan*/ errno;
int _link(char *old, char *newaddr) {
  errno = EMLINK;
  return -1;
}


x86 assembly (clang, -O0):
<_link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_link>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EMLINK = global i32 0
@errno = global i32 0
define i32 @_link(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @EMLINK
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EMLINK = global i32 0
@errno = global i32 0
define i32 @_link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EMLINK
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ nlz(scalar_t__);
uint8_t clog2(uint64_t u) { return 64 - nlz(u - !!u); }


x86 assembly (clang, -O0):
<clog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
sub    %rax,%rdi
call   1030 <nlz@plt>
mov    %rax,%rcx
mov    $0x40,%eax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clog2>:
push   %rax
cmp    $0x1,%rdi
adc    $0xffffffffffffffff,%rdi
call   1030 <nlz@plt>
mov    $0x40,%ecx
sub    %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @clog2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
%10 = sub nsw i64 %3, %9
%11 = call i64 @nlz(i64 %10)
%12 = sub nsw i64 64, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @clog2(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = sext i1 %2 to i64
%4 = add i64 %3, %0
%5 = tail call i64 @nlz(i64 %4)
%6 = sub nsw i64 64, %5
ret i64 %6
}
void test17_TimerManagerTest_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test17_TimerManagerTest_targetInit__I() {
ret void
}
int i_need_me() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @i_need_me() {
ret i32 0
}
void RTMemEfTmpAlloc(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfTmpAlloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
scalar_t__ pop();
int /*<<< orphan*/ stdout;
void apply_print(void) { fprintf(stdout, "%c", (char)pop()); }


x86 assembly (clang, -O0):
<apply_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pop@plt>
mov    -0x4(%rbp),%edi
lea    0xebb(%rip),%rsi
movsbl %al,%edx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_print>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <pop@plt>
movsbl %al,%edx
lea    0xec5(%rip),%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @apply_print() {
%1 = load i32, i32* @stdout
%2 = call i64 (...) @pop()
%3 = trunc i64 %2 to i8
%4 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @apply_print() {
%1 = load i32, i32* @stdout
%2 = tail call i64 (...) @pop()
%3 = trunc i64 %2 to i8
%4 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x7a() {
  Assert_real((isalnum(122)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              615, ("isalnum should be 1 for z"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x7a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x267,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x7a>:
push   %rax
mov    $0x7a,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x267,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for z\00"
define void @t_isalnum_0x7a() {
%1 = call i32 @isalnum(i32 122)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for z\00"
define void @t_isalnum_0x7a() {
%1 = tail call i32 @isalnum(i32 122)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned xrop3_138_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = S | stk3;
  stk1 = D & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_138_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_138_1_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
not    %cl
movzbl %cl,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_138_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %5
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_138_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
ret i32 %11
}
/* Type definitions */
struct pivec_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pivec_destroy(struct pivec_t *);
int /*<<< orphan*/ pivec_initfrom(struct pivec_t *, struct pivec_t const *);
void pivec_copy(struct pivec_t *dst, const struct pivec_t *src) {
  ;
  pivec_destroy(dst);
  pivec_initfrom(dst, src);
  { return; };
}


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

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

LLVM IR (-O0):
%struct.pivec_t = type { i32 }
define void @pivec_copy(%struct.pivec_t* %0, %struct.pivec_t* %1) {
%3 = alloca %struct.pivec_t*
%4 = alloca %struct.pivec_t*
store %struct.pivec_t* %0, %struct.pivec_t** %3
store %struct.pivec_t* %1, %struct.pivec_t** %4
%5 = load %struct.pivec_t*, %struct.pivec_t** %3
%6 = call i32 @pivec_destroy(%struct.pivec_t* %5)
%7 = load %struct.pivec_t*, %struct.pivec_t** %3
%8 = load %struct.pivec_t*, %struct.pivec_t** %4
%9 = call i32 @pivec_initfrom(%struct.pivec_t* %7, %struct.pivec_t* %8)
ret void
}

LLVM IR (-O2):
%struct.pivec_t = type { i32 }
define void @pivec_copy(%struct.pivec_t* %0, %struct.pivec_t* %1) {
%3 = tail call i32 @pivec_destroy(%struct.pivec_t* %0)
%4 = tail call i32 @pivec_initfrom(%struct.pivec_t* %0, %struct.pivec_t* %1)
ret void
}
float sqrf(const float x) { return x * x; }


x86 assembly (clang, -O0):
<sqrf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrf>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sqrf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
ret float %5
}

LLVM IR (-O2):
define float @sqrf(float %0) {
%2 = fmul float %0, %0
ret float %2
}
int test_imm_44uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x44 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_44uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x44,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_44uint64_lowword_reg>:
test   $0x44,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_44uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 68
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int __u64;

/* Variables and functions */
__u64 btrfs_qgroup_level(__u64 qgroupid) { return qgroupid >> 48; }


x86 assembly (clang, -O0):
<btrfs_qgroup_level>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x30,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @btrfs_qgroup_level(i32 %0) {
ret i32 poison
}
void foo(double decl1) {}


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

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

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

LLVM IR (-O2):
define void @foo(double %0) {
ret void
}
__attribute__((always_)) void smp_mb__after_lock(void) {}


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

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

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

LLVM IR (-O2):
define void @smp_mb__after_lock() {
ret void
}
int func(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @func() {
ret i32 1
}

LLVM IR (-O2):
define i32 @func() {
ret i32 1
}
/* Variables and functions */
char *strdup(char const *);
char *s_strdup(const char *s1) {
  if (!s1)
    return NULL;
  return strdup(s1);
}


x86 assembly (clang, -O0):
<s_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <s_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <s_strdup+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_strdup>:
test   %rdi,%rdi
je     111a <s_strdup+0xa>
jmp    1030 <strdup@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @s_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %2
br label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i8* @strdup(i8* %8)
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @s_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void perror_and_exit(const char *s) {
  perror(s);
  exit(1);
}


x86 assembly (clang, -O0):
<perror_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @perror_and_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @perror_and_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void f(int x) {
  if (x > 10)
    exit(100);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    112f <f+0x1f>
mov    $0x64,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0xb,%edi
jge    1116 <f+0x6>
ret
push   %rax
mov    $0x64,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @exit(i32 100)
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = icmp sgt i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @exit(i32 100)
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ automaticArrayInit();
int /*<<< orphan*/ staticArrayInit();
int main(void) {
  staticArrayInit();
  staticArrayInit();
  automaticArrayInit();
  automaticArrayInit();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @staticArrayInit()
%2 = tail call i32 (...) @staticArrayInit()
%3 = tail call i32 (...) @automaticArrayInit()
%4 = tail call i32 (...) @automaticArrayInit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", sizeof(float));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
void strcat(char *s, char *t) {
  while (*s)
    s++;
  while (*s++ = *t++)
    ;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <strcat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcat+0xc>
jmp    112f <strcat+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     115e <strcat+0x5e>
jmp    112f <strcat+0x2f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <strcat>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,-0x1(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcat+0x10>
ret

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

LLVM IR (-O2):
define void @strcat(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %13, %8 ], [ %4, %3 ]
%10 = phi i8* [ %11, %8 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret void
}
q() {
  int i;
  i = 3;
}


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

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

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

LLVM IR (-O2):
define i32 @q() {
ret i32 undef
}
/* Variables and functions */
scalar_t__ getaloc(int);
int getbyte(scalar_t__);
int getabyte(int act, int off) { return (getbyte(getaloc(act) + off)); }


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

x86 assembly (clang, -O2):
<getabyte>:
push   %rbx
mov    %esi,%ebx
call   1040 <getaloc@plt>
movslq %ebx,%rdi
add    %rax,%rdi
pop    %rbx
jmp    1030 <getbyte@plt>

LLVM IR (-O0):
define i32 @getabyte(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 i64 @getaloc(i32 %5)
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = add nsw i64 %6, %8
%10 = call i32 @getbyte(i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @getabyte(i32 %0, i32 %1) {
%3 = tail call i64 @getaloc(i32 %0)
%4 = sext i32 %1 to i64
%5 = add nsw i64 %3, %4
%6 = tail call i32 @getbyte(i64 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sscanf(char *, char *, char *, char *, char *);
void showversion() {
  char temp1[100];
  char rversion[100];
  char temp2[100];
  sscanf("$Revision: 1.3 $", "%s %s %s", temp1, rversion, temp2);
  printf("Version: %s\n", rversion);
}


x86 assembly (clang, -O0):
<showversion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
lea    -0x70(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
lea    -0x150(%rbp),%r8
lea    0xebc(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <sscanf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showversion>:
push   %rbx
sub    $0x150,%rsp
lea    0xed1(%rip),%rdi
lea    0xedb(%rip),%rsi
lea    0xe0(%rsp),%rdx
lea    0x70(%rsp),%rbx
mov    %rsp,%r8
mov    %rbx,%rcx
call   1040 <sscanf@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x150,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"$Revision: 1.3 $\00"
@.str.1 = [9 x i8] c"%s %s %s\00"
@.str.2 = [13 x i8] c"Version: %s\0A\00"
define void @showversion() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 @sscanf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"$Revision: 1.3 $\00"
@.str.1 = [9 x i8] c"%s %s %s\00"
@.str.2 = [13 x i8] c"Version: %s\0A\00"
define void @showversion() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32 @sscanf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, char const *);
void dbgprnt(const char *file, const char *line, const char *msg) {
  printf("%s:%s:\t%s\n", file, line, msg);
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"%s:%s:\09%s\0A\00"
define void @dbgprnt(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_unknown_arg(char *unknown) {
  clang_analyzer_eval(strcmp(unknown, unknown) == 0);
}


x86 assembly (clang, -O0):
<strcmp_unknown_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_unknown_arg>:
push   %rax
mov    %rdi,%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @strcmp_unknown_arg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
define void @strcmp_unknown_arg(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @clang_analyzer_eval(i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ td_thragent_t;
typedef int /*<<< orphan*/ td_notify_t;
typedef int /*<<< orphan*/ td_event_e;
typedef int /*<<< orphan*/ td_err_e;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ TD_NOEVENT;
td_err_e td_ta_event_addr(td_thragent_t const *agent, td_event_e event,
                          td_notify_t *notify_out) {
  int32_t err;
  return TD_NOEVENT;
}


x86 assembly (clang, -O0):
<td_ta_event_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@TD_NOEVENT = global i32 0
define i32 @td_ta_event_addr(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32, i32* @TD_NOEVENT
ret i32 %8
}

LLVM IR (-O2):
@TD_NOEVENT = global i32 0
define i32 @td_ta_event_addr(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @TD_NOEVENT
ret i32 %4
}
unsigned short f3(unsigned short a) {
  return ((a >> 8) & 0x00ff) | ((a << 8) & 0xff00);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movzwl -0x2(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @f3(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 8
%6 = and i32 %5, 255
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = shl i32 %8, 8
%10 = and i32 %9, 65280
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @f3(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
int isOctalDigit(char d) {
  int result = 1;
  switch (d) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
    break;
  default:
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<isOctalDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x1,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0x7,%eax
ja     112b <isOctalDigit+0x2b>
jmp    1126 <isOctalDigit+0x26>
jmp    1132 <isOctalDigit+0x32>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOctalDigit>:
and    $0xf8,%dil
xor    %eax,%eax
cmp    $0x30,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isOctalDigit(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 1, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 48, label %6
i32 49, label %6
i32 50, label %6
i32 51, label %6
i32 52, label %6
i32 53, label %6
i32 54, label %6
i32 55, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
br label %8
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @isOctalDigit(i8 signext %0) {
%2 = and i8 %0, -8
%3 = icmp eq i8 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int w5100_read_byte(int);
unsigned w5100_readRCR() { return w5100_read_byte(0x0019); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x19,%edi
call   1030 <w5100_read_byte@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @w5100_readRCR() {
%1 = call i32 @w5100_read_byte(i32 25)
ret i32 %1
}

LLVM IR (-O2):
define i32 @w5100_readRCR() {
%1 = tail call i32 @w5100_read_byte(i32 25)
ret i32 %1
}