xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ expression();
int /*<<< orphan*/ match(char);
void equals() {
  match('=');
  expression();
  emitln("pop\t%%ebx");
  emitln("cmp\t%%eax,%%ebx");
  emitln("sete\t%%eax");
}


x86 assembly (clang, -O0):
<equals>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d,%edi
call   1050 <match@plt>
mov    $0x0,%al
call   1040 <expression@plt>
lea    0xeb4(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb2(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb6(%rip),%rdi
call   1030 <emitln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<equals>:
push   %rax
mov    $0x3d,%edi
call   1050 <match@plt>
xor    %eax,%eax
call   1040 <expression@plt>
lea    0xeb7(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb5(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb9(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [16 x i8] c"cmp\09%%eax,%%ebx\00"
@.str.2 = [11 x i8] c"sete\09%%eax\00"
define void @equals() {
%1 = call i32 @match(i8 signext 61)
%2 = call i32 (...) @expression()
%3 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @emitln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [16 x i8] c"cmp\09%%eax,%%ebx\00"
@.str.2 = [11 x i8] c"sete\09%%eax\00"
define void @equals() {
%1 = tail call i32 @match(i8 signext 61)
%2 = tail call i32 (...) @expression()
%3 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @emitln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void DBGFR3OSDetect(void) {}


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

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

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

LLVM IR (-O2):
define void @DBGFR3OSDetect() {
ret void
}
int isBrace(char c) {
  return c == ']' || c == '[' || c == '}' || c == '{' || c == ')' || c == '(';
}


x86 assembly (clang, -O0):
<isBrace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5d,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBrace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBrace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7d,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBrace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7b,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBrace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x29,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBrace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x28,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBrace>:
mov    $0x1,%eax
lea    -0x5b(%rdi),%ecx
cmp    $0x22,%cl
ja     1120 <isBrace+0x20>
movzbl %cl,%ecx
movabs $0x500000005,%rdx
bt     %rcx,%rdx
jb     1126 <isBrace+0x26>
cmp    $0x29,%dil
jne    1127 <isBrace+0x27>
ret
xor    %eax,%eax
cmp    $0x28,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isBrace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 93
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 91
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 125
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 123
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 41
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 40
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @isBrace(i8 signext %0) {
switch i8 %0, label %2 [
i8 125, label %5
i8 123, label %5
i8 93, label %5
i8 91, label %5
i8 41, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 40
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void ff_hevc_put_hevc_qpel_v32_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v32_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void dunno(const char *p) {
  fprintf(stderr, "cc: don't know what to do with '%s'.\n", p);
  fatal();
}


x86 assembly (clang, -O0):
<dunno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dunno>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <fatal@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"cc: don't know what to do with '%s'.\0A\00"
define void @dunno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @fatal()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"cc: don't know what to do with '%s'.\0A\00"
define void @dunno(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @fatal()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helper_no_markers();
void lifetime_test() { helper_no_markers(); }


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

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

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

LLVM IR (-O2):
define void @lifetime_test() {
%1 = tail call i32 (...) @helper_no_markers()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printAns(int);
void doDiv(int a, int b) { printAns(a / (float)b); }


x86 assembly (clang, -O0):
<doDiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <printAns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doDiv>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
jmp    1030 <printAns@plt>

LLVM IR (-O0):
define void @doDiv(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 = sitofp i32 %5 to float
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = fdiv float %6, %8
%10 = fptosi float %9 to i32
%11 = call i32 @printAns(i32 %10)
ret void
}

LLVM IR (-O2):
define void @doDiv(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = fdiv float %3, %4
%6 = fptosi float %5 to i32
%7 = tail call i32 @printAns(i32 %6)
ret void
}
void foo614(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo614(i32 %0) {
ret void
}
int gcd(int a, int h) {
  int temp;
  while (1) {
    temp = a % h;
    if (temp == 0)
      return h;
    a = h;
    h = temp;
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1123 <gcd+0x23>
mov    -0x8(%rbp),%eax
pop    %rbp
ret
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%eax
mov    %edx,%edi
cltd
idiv   %edi
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @gcd(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 = %2, %14
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %6
%13 = load i32, i32* %4
ret i32 %13
14: ; preds = %6
%15 = load i32, i32* %4
store i32 %15, i32* %3
%16 = load i32, i32* %5
store i32 %16, i32* %4
br label %6
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %6, %3 ]
%5 = phi i32 [ %0, %2 ], [ %4, %3 ]
%6 = srem i32 %5, %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %4
}
char *logFileBaseName(const char *fileName) {
  char *ptr = (char *)fileName;
  while (*fileName != '\0') {
    if (*(fileName++) == '/')
      ptr = (char *)fileName;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<logFileBaseName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <logFileBaseName+0x48>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1143 <logFileBaseName+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <logFileBaseName+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logFileBaseName>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     1122 <logFileBaseName+0x22>
lea    0x1(%rax),%rdx
nopl   (%rax)
cmp    $0x2f,%cl
cmove  %rdx,%rax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <logFileBaseName+0x10>
ret

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

LLVM IR (-O2):
define i8* @logFileBaseName(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = icmp eq i8 %5, 47
%10 = select i1 %9, i8* %8, i8* %6
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i8* [ %0, %1 ], [ %10, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ log_stdout(char *, int, char *);
void show_env(char **envp) {
  int count = -1;
  while (envp[++count] != NULL) {
    log_stdout("Environ[%d] = %s\n", count, envp[count]);
  }
}


x86 assembly (clang, -O0):
<show_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     115e <show_env+0x4e>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeac(%rip),%rdi
call   1030 <log_stdout@plt>
jmp    1123 <show_env+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_env>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%rdx
test   %rdx,%rdx
je     1148 <show_env+0x38>
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed7(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <log_stdout@plt>
mov    0x8(%r14,%rbx,8),%rdx
add    $0x1,%rbx
test   %rdx,%rdx
jne    1130 <show_env+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Environ[%d] = %s\0A\00"
define void @show_env(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 -1, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8**, i8*** %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %5, i64 %8
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %20
12: ; preds = %4
%13 = load i32, i32* %3
%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 = call i32 @log_stdout(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %18)
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Environ[%d] = %s\0A\00"
define void @show_env(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8* [ %11, %4 ], [ %2, %1 ]
%7 = trunc i64 %5 to i32
%8 = tail call i32 @log_stdout(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %6)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
int my_strlen(str) const char *str;
{
  int n = 0;
  while (*str++)
    n++;
  return n;
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <my_strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
cmpb   $0x0,(%rdi)
je     111c <my_strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <my_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int test_imm_6Fint32_reg(int val) { return ((val) & (0x6F << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_6Fint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x6f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_6Fint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 111
%5 = icmp ne i32 %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_6Fint32_reg(i32 %0) {
%2 = and i32 %0, 111
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ POLLIN;
int ___poll(int, int /*<<< orphan*/, int);
int zwriteable(int fd) { return ___poll(fd, POLLIN, 1); }


x86 assembly (clang, -O0):
<zwriteable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <___poll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zwriteable>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
jmp    1030 <___poll@plt>

LLVM IR (-O0):
@POLLIN = global i32 0
define i32 @zwriteable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @POLLIN
%5 = call i32 @___poll(i32 %3, i32 %4, i32 1)
ret i32 %5
}

LLVM IR (-O2):
@POLLIN = global i32 0
define i32 @zwriteable(i32 %0) {
%2 = load i32, i32* @POLLIN
%3 = tail call i32 @___poll(i32 %0, i32 %2, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xdb() {
  Assert_real((isspace(219) == 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_isspace.c",
              1100, ("isspace should be 0 for 0xdb"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xdb>:
push   %rax
mov    $0xdb,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x44c,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xdb\00"
define void @t_isspace_0xdb() {
%1 = call i64 @isspace(i32 219)
%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 1100, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xdb\00"
define void @t_isspace_0xdb() {
%1 = tail call i64 @isspace(i32 219)
%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 1100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int len(char *str) {
  int i;
  i = 0;
  while (str[i])
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <len+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <len+0x10>
ret

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

LLVM IR (-O2):
define i32 @len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void swapMinHeapNode(struct MinHeapNode **a, struct MinHeapNode **b) {
  struct MinHeapNode *t = *a;
  *a = *b;
  *b = t;
}


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

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

LLVM IR (-O0):
%struct.MinHeapNode = type opaque
define void @swapMinHeapNode(%struct.MinHeapNode** %0, %struct.MinHeapNode** %1) {
%3 = alloca %struct.MinHeapNode**
%4 = alloca %struct.MinHeapNode**
%5 = alloca %struct.MinHeapNode*
store %struct.MinHeapNode** %0, %struct.MinHeapNode*** %3
store %struct.MinHeapNode** %1, %struct.MinHeapNode*** %4
%6 = load %struct.MinHeapNode**, %struct.MinHeapNode*** %3
%7 = load %struct.MinHeapNode*, %struct.MinHeapNode** %6
store %struct.MinHeapNode* %7, %struct.MinHeapNode** %5
%8 = load %struct.MinHeapNode**, %struct.MinHeapNode*** %4
%9 = load %struct.MinHeapNode*, %struct.MinHeapNode** %8
%10 = load %struct.MinHeapNode**, %struct.MinHeapNode*** %3
store %struct.MinHeapNode* %9, %struct.MinHeapNode** %10
%11 = load %struct.MinHeapNode*, %struct.MinHeapNode** %5
%12 = load %struct.MinHeapNode**, %struct.MinHeapNode*** %4
store %struct.MinHeapNode* %11, %struct.MinHeapNode** %12
ret void
}

LLVM IR (-O2):
%struct.MinHeapNode = type opaque
define void @swapMinHeapNode(%struct.MinHeapNode** nocapture %0, %struct.MinHeapNode** nocapture %1) {
%3 = load %struct.MinHeapNode*, %struct.MinHeapNode** %0
%4 = load %struct.MinHeapNode*, %struct.MinHeapNode** %1
store %struct.MinHeapNode* %4, %struct.MinHeapNode** %0
store %struct.MinHeapNode* %3, %struct.MinHeapNode** %1
ret void
}
int ftoc(int ftemp) { return 5 * (ftemp - 32) / 9; }


x86 assembly (clang, -O0):
<ftoc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftoc>:
lea    (%rdi,%rdi,4),%eax
add    $0xffffff60,%eax
cltq
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ftoc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 32
%5 = mul nsw i32 5, %4
%6 = sdiv i32 %5, 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @ftoc(i32 %0) {
%2 = mul i32 %0, 5
%3 = add i32 %2, -160
%4 = sdiv i32 %3, 9
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void exit_thread(void *value) { pthread_exit(value); }


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

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

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

LLVM IR (-O2):
define void @exit_thread(i8* %0) {
%2 = tail call i32 @pthread_exit(i8* %0)
ret void
}
float raw_linear_derivative(float x) { return 1.0; }


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

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

LLVM IR (-O0):
define float @raw_linear_derivative(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 1.000000e+00
}

LLVM IR (-O2):
define float @raw_linear_derivative(float %0) {
ret float 1.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fgetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ fsetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
unsigned long ftell(int /*<<< orphan*/ *);
unsigned long get_filesize(FILE *fp) {
  fpos_t pos;
  unsigned long fsize;
  fgetpos(fp, &pos);
  (void)fseek(fp, 0, SEEK_END);
  fsize = ftell(fp);
  fsetpos(fp, &pos);
  return (fsize);
}


x86 assembly (clang, -O0):
<get_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <fgetpos@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <fsetpos@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filesize>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%r14
mov    %r14,%rsi
call   1030 <fgetpos@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <fsetpos@plt>
mov    %r15,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @get_filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @fgetpos(i32* %5, i32* %3)
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = call i32 @fsetpos(i32* %12, i32* %3)
%14 = load i64, i64* %4
ret i64 %14
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @get_filesize(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fgetpos(i32* %0, i32* %2)
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %5)
%7 = tail call i64 @ftell(i32* %0)
%8 = call i32 @fsetpos(i32* %0, i32* %2)
ret i64 %7
}
/* Variables and functions */
int shellout(char const *, int, int);
int start_background_job(char const *, int /*<<< orphan*/);
int run_vim(const char cmd[], int bg, int use_term_multiplexer) {
  if (bg) {
    return start_background_job(cmd, 0);
  }
  return shellout(cmd, -1, use_term_multiplexer);
}


x86 assembly (clang, -O0):
<run_vim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114f <run_vim+0x2f>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <start_background_job@plt>
mov    %eax,-0x4(%rbp)
jmp    1163 <run_vim+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    $0xffffffff,%esi
call   1030 <shellout@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_vim>:
test   %esi,%esi
je     112b <run_vim+0xb>
xor    %esi,%esi
jmp    1040 <start_background_job@plt>
mov    $0xffffffff,%esi
jmp    1030 <shellout@plt>

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

LLVM IR (-O2):
define i32 @run_vim(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @start_background_job(i8* %0, i32 0)
br label %9
7: ; preds = %3
%8 = tail call i32 @shellout(i8* %0, i32 -1, i32 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
void alien_fixture_test_case_setup() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_toggle_action_new() {
ret void
}
foo() {
  extern int ex;
  struct a {
    int a, b;
  } k;
}


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

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

LLVM IR (-O0):
%struct.a = type { i32, i32 }
define i32 @foo() {
%1 = alloca i32
%2 = alloca %struct.a
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
%struct.a = type { i32, i32 }
define i32 @foo() {
ret i32 undef
}
double test_copysign(double x, double y) { return __builtin_copysign(x, y); }


x86 assembly (clang, -O0):
<test_copysign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movaps 0xee1(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xee6(%rip),%xmm2
pand   %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_copysign>:
andps  0xef9(%rip),%xmm1
andps  0xf02(%rip),%xmm0
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @test_copysign(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @llvm.copysign.f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @test_copysign(double %0, double %1) {
%3 = tail call double @llvm.copysign.f64(double %0, double %1)
ret double %3
}
void YUVToARGBScaleClip() {}


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

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

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

LLVM IR (-O2):
define void @YUVToARGBScaleClip() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reverse(int);
int main() {
  reverse(5170984);
  reverse(406567);
  reverse(368750);
  reverse(2369510);
  reverse(2183293);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4ee728,%edi
call   1030 <reverse@plt>
mov    $0x63427,%edi
call   1030 <reverse@plt>
mov    $0x5a06e,%edi
call   1030 <reverse@plt>
mov    $0x2427e6,%edi
call   1030 <reverse@plt>
mov    $0x21507d,%edi
call   1030 <reverse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @reverse(i32 5170984)
%3 = call i32 @reverse(i32 406567)
%4 = call i32 @reverse(i32 368750)
%5 = call i32 @reverse(i32 2369510)
%6 = call i32 @reverse(i32 2183293)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @reverse(i32 5170984)
%2 = tail call i32 @reverse(i32 406567)
%3 = tail call i32 @reverse(i32 368750)
%4 = tail call i32 @reverse(i32 2369510)
%5 = tail call i32 @reverse(i32 2183293)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char encode_digit(int c) {
  assert(c >= 0 && c <= 36 - 1);
  if (c > 25) {
    return c + 22;
  } else {
    return c + 'a';
  }
}


x86 assembly (clang, -O0):
<encode_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1134 <encode_digit+0x24>
cmpl   $0x23,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x19,-0x8(%rbp)
jle    1159 <encode_digit+0x49>
mov    -0x8(%rbp),%eax
add    $0x16,%eax
mov    %al,-0x1(%rbp)
jmp    1162 <encode_digit+0x52>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_digit>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x24,%ebx
setb   %dil
call   1030 <assert@plt>
cmp    $0x1a,%ebx
mov    $0x16,%ecx
mov    $0x61,%eax
cmovge %ecx,%eax
add    %bl,%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @encode_digit(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 35
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 25
br i1 %14, label %15, label %19
15: ; preds = %9
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 22
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
br label %23
19: ; preds = %9
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 97
%22 = trunc i32 %21 to i8
store i8 %22, i8* %2
br label %23
23: ; preds = %19, %15
%24 = load i8, i8* %2
ret i8 %24
}

LLVM IR (-O2):
define signext i8 @encode_digit(i32 %0) {
%2 = icmp ult i32 %0, 36
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp sgt i32 %0, 25
%6 = trunc i32 %0 to i8
%7 = select i1 %5, i8 22, i8 97
%8 = add i8 %7, %6
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ print();
void main() { print(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @print()
ret void
}
int test_imm_87int64_lowword_mem(long long *val) {
  return ((*val) & (0x87 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_87int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 135
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int HelpItem127(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem127() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_diff_length_2() {
  char *x = "12345";
  char *y = "123";
  clang_analyzer_eval(strcmp(x, y) > 0);
}


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

x86 assembly (clang, -O2):
<strcmp_diff_length_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strcmp_diff_length_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strcmp_diff_length_2() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
unsigned long string2long(char const *, char **, int, int /*<<< orphan*/);
unsigned long int strtoul(const char *s, char **endp, int base) {
  return (string2long(s, endp, base, 0));
}


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

x86 assembly (clang, -O2):
<strtoul>:
xor    %ecx,%ecx
jmp    1030 <string2long@plt>

LLVM IR (-O0):
define i64 @strtoul(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = call i64 @string2long(i8* %7, i8** %8, i32 %9, i32 0)
ret i64 %10
}

LLVM IR (-O2):
define i64 @strtoul(i8* %0, i8** %1, i32 %2) {
%4 = tail call i64 @string2long(i8* %0, i8** %1, i32 %2, i32 0)
ret i64 %4
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double doubleRand() { return (double)rand() / (double)RAND_MAX; }


x86 assembly (clang, -O0):
<doubleRand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleRand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @doubleRand() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @doubleRand() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
int /*<<< orphan*/ replace();
int main(int x) {
  f();
  replace();
  g();
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call i32 (...) @f()
%3 = tail call i32 (...) @replace()
%4 = tail call i32 (...) @g()
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int get_random_existing_file_index();
int remove_file(int);
bool test_remove_file() {
  int32_t index = get_random_existing_file_index();
  if (index == -1) {
    return true;
  }
  return remove_file(index);
}


x86 assembly (clang, -O0):
<test_remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <get_random_existing_file_index@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1148 <test_remove_file+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1153 <test_remove_file+0x33>
mov    -0x8(%rbp),%edi
call   1030 <remove_file@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_remove_file>:
push   %rax
xor    %eax,%eax
call   1040 <get_random_existing_file_index@plt>
cmp    $0xffffffff,%eax
je     1135 <test_remove_file+0x15>
mov    %eax,%edi
pop    %rax
jmp    1030 <remove_file@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_remove_file() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @get_random_existing_file_index()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @remove_file(i32 %8)
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_remove_file() {
%1 = tail call i32 (...) @get_random_existing_file_index()
%2 = icmp eq i32 %1, -1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @remove_file(i32 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
ret i32 %6
}
int has_feat_gc2d_on_gc_on(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @has_feat_gc2d_on_gc_on() {
ret i32 0
}
/* Variables and functions */
scalar_t__ memset(void *, int, size_t);
scalar_t__ ptr_to_vaddr(void *);
scalar_t__ vaddr_to_ptr(uintptr_t);
void *os_memset(void *s, int c, size_t n) {
  return ((void *)(ptr_to_vaddr(
      (void *)(memset(((void *)(vaddr_to_ptr((uintptr_t)(s)))), c, n)))));
}


x86 assembly (clang, -O0):
<os_memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vaddr_to_ptr@plt>
mov    %rax,%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <memset@plt>
mov    %rax,%rdi
call   1050 <ptr_to_vaddr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_memset>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
call   1030 <vaddr_to_ptr@plt>
mov    %rax,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1040 <memset@plt>
mov    %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <ptr_to_vaddr@plt>

LLVM IR (-O0):
define i8* @os_memset(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = call i64 @vaddr_to_ptr(i64 %8)
%10 = inttoptr i64 %9 to i8*
%11 = load i32, i32* %5
%12 = load i64, i64* %6
%13 = call i64 @memset(i8* %10, i32 %11, i64 %12)
%14 = inttoptr i64 %13 to i8*
%15 = call i64 @ptr_to_vaddr(i8* %14)
%16 = inttoptr i64 %15 to i8*
ret i8* %16
}

LLVM IR (-O2):
define i8* @os_memset(i8* %0, i32 %1, i64 %2) {
%4 = ptrtoint i8* %0 to i64
%5 = tail call i64 @vaddr_to_ptr(i64 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i64 @memset(i8* %6, i32 %1, i64 %2)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i64 @ptr_to_vaddr(i8* %8)
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ print_int(char);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  char x;
  x = 'Q';
  print_int(x);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x51,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <print_int@plt>
lea    0xec4(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x51,%edi
call   1040 <print_int@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <print_string@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @print_int(i8 signext 81)
%2 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EROFS;
int /*<<< orphan*/ errno;
char *tmpnam(char *s) {
  errno = EROFS;
  return NULL;
}


x86 assembly (clang, -O0):
<tmpnam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmpnam>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@EROFS = global i32 0
@errno = global i32 0
define i8* @tmpnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EROFS
store i32 %3, i32* @errno
ret i8* null
}

LLVM IR (-O2):
@EROFS = global i32 0
@errno = global i32 0
define noalias i8* @tmpnam(i8* nocapture readnone %0) {
%2 = load i32, i32* @EROFS
store i32 %2, i32* @errno
ret i8* null
}