xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_InputSyntaxArgumentMustBindToInParameter(long p_position) {
  _Error(p_position, "'input' syntax argument must bind to in parameter");
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"'input' syntax argument must bind to in parameter\00"
define void @Error_InputSyntaxArgumentMustBindToInParameter(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"'input' syntax argument must bind to in parameter\00"
define void @Error_InputSyntaxArgumentMustBindToInParameter(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("the size of a pointer is %lu", sizeof(int *));
  return 0;
}


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

LLVM IR (-O0):
@.str = [29 x i8] c"the size of a pointer is %lu\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"the size of a pointer is %lu\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_once_t;

/* Variables and functions */
int /*<<< orphan*/ gptp(char *, int);
void g_pthread_once_t() { gptp("pthread_once_t", sizeof(pthread_once_t)); }


x86 assembly (clang, -O0):
<g_pthread_once_t>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <gptp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_pthread_once_t>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <gptp@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"pthread_once_t\00"
define void @g_pthread_once_t() {
%1 = call i32 @gptp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"pthread_once_t\00"
define void @g_pthread_once_t() {
%1 = tail call i32 @gptp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, int);
void Move_Ret_To_Foreign_L(int index) {
  Inst_Printf("addis",
              "r"
              "4"
              ",0,"
              "ha16("
              "_"
              "pl_foreign_long+%d"
              ")",
              index * 4);
  Inst_Printf("stw",
              "r"
              "3"
              ","
              "lo16("
              "_"
              "pl_foreign_long+%d"
              ")"
              "("
              "r"
              "4"
              ")",
              index * 4);
}


x86 assembly (clang, -O0):
<Move_Ret_To_Foreign_L>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
shl    $0x2,%edx
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <Inst_Printf@plt>
mov    -0x4(%rbp),%edx
shl    $0x2,%edx
lea    0xee4(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Move_Ret_To_Foreign_L>:
push   %rbx
lea    0x0(,%rdi,4),%ebx
lea    0xee1(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    %ebx,%edx
call   1030 <Inst_Printf@plt>
lea    0xef1(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"addis\00"
@.str.1 = [31 x i8] c"r4,0,ha16(_pl_foreign_long+%d)\00"
@.str.2 = [4 x i8] c"stw\00"
@.str.3 = [33 x i8] c"r3,lo16(_pl_foreign_long+%d)(r4)\00"
define void @Move_Ret_To_Foreign_L(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = call i32 @Inst_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, 4
%8 = call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"addis\00"
@.str.1 = [31 x i8] c"r4,0,ha16(_pl_foreign_long+%d)\00"
@.str.2 = [4 x i8] c"stw\00"
@.str.3 = [33 x i8] c"r3,lo16(_pl_foreign_long+%d)(r4)\00"
define void @Move_Ret_To_Foreign_L(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drv_Noritake_list(void) {
  printf("GU311 GU311_Graphic");
  return 0;
}


x86 assembly (clang, -O0):
<drv_Noritake_list>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"GU311 GU311_Graphic\00"
define i32 @drv_Noritake_list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"GU311 GU311_Graphic\00"
define i32 @drv_Noritake_list() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void outofmem(char *at) {
  fprintf(stderr, "\nfatal: %s: out of memory\n", at);
  abort();
}


x86 assembly (clang, -O0):
<outofmem>:
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   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"\0Afatal: %s: out of memory\0A\00"
define void @outofmem(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 ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"\0Afatal: %s: out of memory\0A\00"
define void @outofmem(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
double asin(double);
double acos(double x) {
  double y;
  y = 3.14159265358979323846 / 2 - asin(x);
  return y;
}


x86 assembly (clang, -O0):
<acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <asin@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acos>:
push   %rax
call   1030 <asin@plt>
movsd  0xee2(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @acos(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @asin(double %4)
%6 = fsub double 0x3FF921FB54442D18, %5
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @acos(double %0) {
%2 = tail call double @asin(double %0)
%3 = fsub double 0x3FF921FB54442D18, %2
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int totalNQueens(int);
int main(void) {
  printf("%d\n", totalNQueens(4));
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <totalNQueens@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <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 @totalNQueens(i32 4)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @totalNQueens(i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
scalar_t__ printf(char *, ...);
int /*<<< orphan*/ stdout;
void catchInterruptParent(int sig) {
  0 && printf("Parent caught signal %d\n", sig);
  printf("\n");
  fflush(stdout);
  return;
}


x86 assembly (clang, -O0):
<catchInterruptParent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@stdout = global i32 0
define void @catchInterruptParent(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
strlen2(char *s) {
  int i = 0;
  for (; *s; s++, i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<strlen2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113b <strlen2+0x3b>
jmp    1121 <strlen2+0x21>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen2+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @strlen2(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 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
%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 @strlen2(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
}
/* Variables and functions */
int /*<<< orphan*/ loHi(int, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num1, num2, num3;
  printf("Please input integers: \n");
  scanf("%d", &num1);
  scanf("%d", &num2);
  scanf("%d", &num3);
  loHi(num1, num2, num3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeb7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <loHi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
call   1040 <loHi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [24 x i8] c"Please input integers: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @loHi(i32 %11, i32 %12, i32 %13)
ret i32 0
}
int avx_os_support(void) {
  unsigned int eax, edx;
  __asm__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(0));
  return (eax & 6) == 6;
}


x86 assembly (clang, -O0):
<avx_os_support>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
xgetbv
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x6,%eax
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avx_os_support>:
xor    %ecx,%ecx
xgetbv
not    %eax
xor    %ecx,%ecx
test   $0x6,%al
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @avx_os_support() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm "xgetbv", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 0)
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = and i32 %6, 6
%8 = icmp eq i32 %7, 6
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @avx_os_support() {
%1 = tail call { i32, i32 } asm "xgetbv", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 0)
%2 = extractvalue { i32, i32 } %1, 0
%3 = and i32 %2, 6
%4 = icmp eq i32 %3, 6
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int abs(int);
int AproxDistance(int dx, int dy) {
  dx = abs(dx);
  dy = abs(dy);
  if (dx < dy)
    return dx + dy - (dx >> 1);
  return dx + dy - (dy >> 1);
}


x86 assembly (clang, -O0):
<AproxDistance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1156 <AproxDistance+0x46>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <AproxDistance+0x57>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AproxDistance>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
mov    %esi,%edx
neg    %edx
cmovs  %esi,%edx
lea    (%rdx,%rcx,1),%eax
cmp    %edx,%ecx
cmovb  %ecx,%edx
shr    %edx
sub    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @AproxDistance(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%5 = icmp ult i32 %3, %4
%6 = add nuw nsw i32 %4, %3
%7 = select i1 %5, i32 %3, i32 %4
%8 = lshr i32 %7, 1
%9 = sub nsw i32 %6, %8
ret i32 %9
}
int test_imm_30int16_reg(short val) {
  return ((val) & (0x30 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_30int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x30,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_30int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 48
%6 = icmp ne i32 %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_30int16_reg(i16 signext %0) {
%2 = and i16 %0, 48
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ch;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char ch = 'x';
  int s = sizeof('x');
  printf("\nsizeof('x') = %d\n", s);
  printf("\nsizeof(ch) = %d\n", sizeof(ch));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x78,-0x5(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x1,%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>
lea    0xeea(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"\0Asizeof('x') = %d\0A\00"
@.str.1 = [18 x i8] c"\0Asizeof(ch) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
int test1(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @test1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x4e() {
  Assert_real((isodigit(78) == 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_isodigit.c",
              395, ("isodigit should be 0 for N"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x4e>:
push   %rax
mov    $0x4e,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x18b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for N\00"
define void @t_isodigit_0x4e() {
%1 = call i64 @isodigit(i32 78)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 395, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for N\00"
define void @t_isodigit_0x4e() {
%1 = tail call i64 @isodigit(i32 78)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 395, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *hpgs_i18n_n(const char *msg, const char *msg_plural,
                        unsigned long n) {
  return n == 1 ? msg : msg_plural;
}


x86 assembly (clang, -O0):
<hpgs_i18n_n>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
jne    1128 <hpgs_i18n_n+0x28>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1130 <hpgs_i18n_n+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpgs_i18n_n>:
mov    %rdi,%rax
cmp    $0x1,%rdx
cmovne %rsi,%rax
ret

LLVM IR (-O0):
define i8* @hpgs_i18n_n(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i8*, i8** %4
br label %13
11: ; preds = %3
%12 = load i8*, i8** %5
br label %13
13: ; preds = %11, %9
%14 = phi i8* [ %10, %9 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @hpgs_i18n_n(i8* readnone %0, i8* readnone %1, i64 %2) {
%4 = icmp eq i64 %2, 1
%5 = select i1 %4, i8* %0, i8* %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void ffexit_() { exit(0); }


x86 assembly (clang, -O0):
<ffexit_>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<ffexit_>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @ffexit_() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @ffexit_() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvgetn_wstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvgetn_wstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvgetn_wstr+0x2a>
jmp    1170 <cmd_mvgetn_wstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvgetn_wstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvgetn_wstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvgetn_wstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvgetn_wstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int is_unique(double *arr, int len, double val) {
  for (int i = 0; i < len; i++) {
    if (arr[i] == val) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_unique>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <is_unique+0x60>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    114d <is_unique+0x4d>
jp     114d <is_unique+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1167 <is_unique+0x67>
jmp    1152 <is_unique+0x52>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1117 <is_unique+0x17>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_unique>:
test   %esi,%esi
jle    1113 <is_unique+0x13>
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
jne    1119 <is_unique+0x19>
jp     1119 <is_unique+0x19>
ret
mov    $0x1,%eax
ret
mov    %esi,%ecx
mov    $0x1,%eax
mov    %rax,%rdx
cmp    %rax,%rcx
je     1139 <is_unique+0x39>
movsd  (%rdi,%rdx,8),%xmm1
lea    0x1(%rdx),%rax
ucomisd %xmm0,%xmm1
jne    1120 <is_unique+0x20>
jp     1120 <is_unique+0x20>
xor    %eax,%eax
cmp    %rcx,%rdx
setae  %al
ret

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

LLVM IR (-O2):
define i32 @is_unique(double* nocapture %0, i32 %1, double %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %1 to i64
%8 = load double, double* %0
%9 = fcmp oeq double %8, %2
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds double, double* %0, i64 %11
%15 = load double, double* %14
%16 = fcmp oeq double %15, %2
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp uge i64 %11, %6
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 1, %3 ], [ 0, %5 ], [ %20, %18 ]
ret i32 %22
}
/* Type definitions */
typedef int int32_t;

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


x86 assembly (clang, -O0):
<test_rewrite_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_rewrite_file+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1153 <test_rewrite_file+0x33>
mov    -0x8(%rbp),%edi
call   1030 <rewrite_file@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_rewrite_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 @rewrite_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_rewrite_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 @rewrite_file(i32 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
ret i32 %6
}
void ExttFieldAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttFieldAuxTable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_screen();
int /*<<< orphan*/ demo();
int /*<<< orphan*/ setup_screen();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ timer_pause(int);
int main() {
  setup_screen();
  srand(time(NULL));
  demo();
  timer_pause(5000);
  cleanup_screen();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <setup_screen@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1040 <demo@plt>
mov    $0x1388,%edi
call   1070 <timer_pause@plt>
mov    $0x0,%al
call   1030 <cleanup_screen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <setup_screen@plt>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1040 <demo@plt>
mov    $0x1388,%edi
call   1070 <timer_pause@plt>
xor    %eax,%eax
call   1030 <cleanup_screen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @setup_screen()
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @demo()
%6 = call i32 @timer_pause(i32 5000)
%7 = call i32 (...) @cleanup_screen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup_screen()
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @demo()
%5 = tail call i32 @timer_pause(i32 5000)
%6 = tail call i32 (...) @cleanup_screen()
ret i32 0
}
void ff_hevc_put_hevc_bi_epel_hv64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv64_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abstraction_test_cas();
int /*<<< orphan*/ abstraction_test_dcas();
int /*<<< orphan*/ abstraction_test_increment();
int /*<<< orphan*/ printf(char *);
void test_lfds611_abstraction(void) {
  printf("\n"
         "Abstraction Tests\n"
         "=================\n");
  abstraction_test_increment();
  abstraction_test_cas();
  abstraction_test_dcas();
  return;
}


x86 assembly (clang, -O0):
<test_lfds611_abstraction>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1050 <abstraction_test_increment@plt>
mov    $0x0,%al
call   1040 <abstraction_test_cas@plt>
mov    $0x0,%al
call   1030 <abstraction_test_dcas@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lfds611_abstraction>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <abstraction_test_increment@plt>
xor    %eax,%eax
call   1050 <abstraction_test_cas@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <abstraction_test_dcas@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"\0AAbstraction Tests\0A=================\0A\00"
define void @test_lfds611_abstraction() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @abstraction_test_increment()
%3 = call i32 (...) @abstraction_test_cas()
%4 = call i32 (...) @abstraction_test_dcas()
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"\0AAbstraction Tests\0A=================\00"
define void @test_lfds611_abstraction() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @abstraction_test_increment()
%3 = tail call i32 (...) @abstraction_test_cas()
%4 = tail call i32 (...) @abstraction_test_dcas()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ play_music_sys();
void play_music() {
  play_music_sys();
  return;
}


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

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

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

LLVM IR (-O2):
define void @play_music() {
%1 = tail call i32 (...) @play_music_sys()
ret void
}
/* Variables and functions */
unsigned int hashlittle(void const *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(void const *);
unsigned int tld_hashfunc(const void *key) {
  return hashlittle(key, strlen(key), 0);
}


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

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

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

LLVM IR (-O2):
define i32 @tld_hashfunc(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @hashlittle(i8* %0, i32 %2, i32 0)
ret i32 %3
}
int isError(int code) {
  if (code == -1) {
    return code;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isError>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    111c <isError+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1123 <isError+0x23>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isError>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @isError(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ mock();
char *get_authority(void) { return (char *)mock(); }


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

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

LLVM IR (-O0):
define i8* @get_authority() {
%1 = call i64 (...) @mock()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @get_authority() {
%1 = tail call i64 (...) @mock()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
unsigned short int f13(unsigned short int x, unsigned int y) {
  return (x << y) | (x >> ((-y) & (8 * sizeof(unsigned short) - 1)));
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
mov    %ecx,%ecx
and    $0xf,%rcx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
and    $0xf,%cl
shr    %cl,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @f13(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = shl i32 %3, %1
%5 = sub i32 0, %1
%6 = and i32 %5, 15
%7 = lshr i32 %3, %6
%8 = or i32 %7, %4
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Variables and functions */
double scalbln(double, int);
double scalbn(double x, int n) { return scalbln(x, n); }


x86 assembly (clang, -O0):
<scalbn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <scalbln@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @scalbn(double %0, i32 %1) {
%3 = tail call double @scalbln(double %0, i32 %1)
ret double %3
}
void __DELETE_java_util_AbstractMap(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_util_AbstractMap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_util_AbstractMap(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void MEM_copy8(void *dst, const void *src) { memcpy(dst, src, 8); }


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

x86 assembly (clang, -O2):
<MEM_copy8>:
mov    $0x8,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @MEM_copy8(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 8)
ret void
}
void ____build_time_check_for_reserved_bits(void) {
  (void)(sizeof(
      int[(((((1ULL << 0) | (1ULL << 1) | (1ULL << 2) | (1ULL << 3) |
              (1ULL << 4) | (1ULL << 5) | (1ULL << 6) | (1ULL << 7) |
              (1ULL << 8) | (1ULL << 9) | (1ULL << 10) | (1ULL << 11) |
              (1ULL << 12) | (1ULL << 13) | (1ULL << 14) | (1ULL << 16) |
              (1ULL << 15) | (1ULL << 17) | (1ULL << 18) | (1ULL << 19) |
              (1ULL << 20) | (1ULL << 21) | (1ULL << 22) | (1ULL << 23) |
              (1ULL << 24) | (1ULL << 25) | (1ULL << 26) | (1ULL << 27) |
              (1ULL << 28) | (1ULL << 29) | (1ULL << 30) | (1ULL << 31) |
              (1ULL << 32) | (1ULL << 33) | (1ULL << 34) | (1ULL << 35) |
              (1ULL << 36) | (1ULL << 37) | (1ULL << 38) | (1ULL << 39) |
              (1ULL << 40) | (1ULL << 41) | (1ULL << 41) | (1ULL << 42) |
              (1ULL << 43) | (1ULL << 44) | (1ULL << 45) | (1ULL << 46) |
              (1ULL << 46) | (1ULL << 46) | (1ULL << 46) | (1ULL << 47) |
              (1ULL << 48) | (1ULL << 49) | (1ULL << 50) | (1ULL << 51) |
              (1ULL << 53) | (1ULL << 52) | (1ULL << 54) | (1ULL << 55) |
              0ULL) &
             ((1ULL << 62) | (1ULL << 61) | (1ULL << 63))) == 0) == 0)
              ? -1
              : 0]));
}


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

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

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

LLVM IR (-O2):
define void @____build_time_check_for_reserved_bits() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ sig_block(int /*<<< orphan*/);
extern void sig_hup_block(void) { sig_block(SIGHUP); }


x86 assembly (clang, -O0):
<sig_hup_block>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <sig_block@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_hup_block>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sig_block@plt>

LLVM IR (-O0):
@SIGHUP = global i32 0
define void @sig_hup_block() {
%1 = load i32, i32* @SIGHUP
%2 = call i32 @sig_block(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGHUP = global i32 0
define void @sig_hup_block() {
%1 = load i32, i32* @SIGHUP
%2 = tail call i32 @sig_block(i32 %1)
ret void
}
unsigned int btrl_mem(unsigned char *base, int bitno) {
  unsigned char res;
  __asm__ __volatile__("btrl\t%2, %0\n\t"
                       "setc\t%1"
                       : "=m"(*base), "=q"(res)
                       : "r"(bitno));
  return res;
}


x86 assembly (clang, -O0):
<btrl_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
btr    %ecx,(%rax)
setb   %al
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btrl_mem>:
btr    %esi,(%rdi)
setb   %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @btrl_mem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8 asm sideeffect "btrl\09$2, $0\0A\09setc\09$1", "=*m,=q,r,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %6, i32 %7)
store i8 %8, i8* %5
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @btrl_mem(i8* %0, i32 %1) {
%3 = tail call i8 asm sideeffect "btrl\09$2, $0\0A\09setc\09$1", "=*m,=q,r,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0, i32 %1)
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
wchar_t *fgetws(wchar_t *ws, int n, FILE *stream) {
  ;
  ws[0] = 0;
  return ws;
}


x86 assembly (clang, -O0):
<fgetws>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetws>:
mov    %rdi,%rax
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define i64* @fgetws(i64* %0, i32 %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i32*
store i64* %0, i64** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 0
store i64 0, i64* %8
%9 = load i64*, i64** %4
ret i64* %9
}

LLVM IR (-O2):
define i64* @fgetws(i64* returned writeonly %0, i32 %1, i32* nocapture readnone %2) {
store i64 0, i64* %0
ret i64* %0
}