xunge/DecIR huggingface dataset:
/* Variables and functions */
int atoi(char *);
int main(int argc, char *argv[]) {
  int max;
  void gen(int, int);
  max = (argc < 2) ? 63 : atoi(argv[1]);
  gen(1, max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114d <main+0x2d>
mov    $0x3f,%eax
mov    %eax,-0x18(%rbp)
jmp    115d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x1,%edi
call   1030 <gen@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsi,%rax
mov    $0x3f,%esi
cmp    $0x2,%edi
jl     1139 <main+0x19>
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   1030 <gen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
br label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
br label %15
15: ; preds = %10, %9
%16 = phi i32 [ 63, %9 ], [ %14, %10 ]
store i32 %16, i32* %6
%17 = load i32, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 63, %2 ]
tail call void @gen(i32 1, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float l;
  printf("Litro: ");
  scanf("%f", &l);
  printf("Metro Cúbico: %.2f", l / 1000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
divss  0xeb2(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Litro: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [20 x i8] c"Metro C\C3\BAbico: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fdiv float %5, 1.000000e+03
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Litro: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [20 x i8] c"Metro C\C3\BAbico: %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fdiv float %5, 1.000000e+03
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Variables and functions */
void CL_ShutdownAll(void) {}


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

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

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

LLVM IR (-O2):
define void @CL_ShutdownAll() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ getyn(char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ signal(int, void (*)(int));
void quit(int sig) {
  putchar('\n');
  if (getyn("Do you all really want to quit? ") == 0)
    exit(0);
  signal(2, quit);
}


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xea4(%rip),%rdi
call   1040 <getyn@plt>
cmp    $0x0,%rax
jne    1172 <quit+0x32>
xor    %edi,%edi
call   1060 <exit@plt>
mov    $0x2,%edi
mov    0x2e62(%rip),%rsi
call   1050 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quit>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeae(%rip),%rdi
call   1040 <getyn@plt>
test   %rax,%rax
je     116e <quit+0x2e>
mov    0x2e7d(%rip),%rsi
mov    $0x2,%edi
pop    %rax
jmp    1050 <signal@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Do you all really want to quit? \00"
define void @quit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @putchar(i8 signext 10)
%4 = call i64 @getyn(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %1
%9 = call i32 @signal(i32 2, void (i32)* @quit)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Do you all really want to quit? \00"
define void @quit(i32 %0) {
%2 = tail call i32 @putchar(i8 signext 10)
%3 = tail call i64 @getyn(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
%8 = tail call i32 @signal(i32 2, void (i32)* @quit)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void exec_once_0_block(void) { printf("Hello World From Foo\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Hello World From Foo\0A\00"
define void @exec_once_0_block() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Hello World From Foo\00"
define void @exec_once_0_block() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
char *theme(char *file) {
  char *dash;
  static char theme[1500];
  strcpy(theme, file);
  if ((dash = strchr(theme, '-')))
    *dash = '\0';
  return theme;
}


x86 assembly (clang, -O0):
<theme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2efd(%rip),%rdi
mov    $0x2d,%esi
call   1040 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1162 <theme+0x42>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2ed7(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<theme>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f15(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1148 <theme+0x28>
movb   $0x0,(%rax)
lea    0x2ef1(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@theme.theme = internal global [1500 x i8] zeroinitializer
define i8* @theme(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strcpy(i8* getelementptr inbounds ([1500 x i8], [1500 x i8]* @theme.theme, i64 0, i64 0), i8* %4)
%6 = call i8* @strchr(i8* getelementptr inbounds ([1500 x i8], [1500 x i8]* @theme.theme, i64 0, i64 0), i8 signext 45)
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
ret i8* getelementptr inbounds ([1500 x i8], [1500 x i8]* @theme.theme, i64 0, i64 0)
}

LLVM IR (-O2):
@theme.theme = internal global [1500 x i8] zeroinitializer
define i8* @theme(i8* %0) {
%2 = tail call i32 @strcpy(i8* getelementptr inbounds ([1500 x i8], [1500 x i8]* @theme.theme, i64 0, i64 0), i8* %0)
%3 = tail call i8* @strchr(i8* dereferenceable(1) getelementptr inbounds ([1500 x i8], [1500 x i8]* @theme.theme, i64 0, i64 0), i8 signext 45)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
store i8 0, i8* %3
br label %6
6: ; preds = %5, %1
ret i8* getelementptr inbounds ([1500 x i8], [1500 x i8]* @theme.theme, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_check_stability(float *, float *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  float a[] = {0, 0, 0, 0, 0};
  float b[] = {0, 0, 0, 0, 0};
  assert(__ESBMC_check_stability(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x30(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca [5 x float]
store i32 0, i32* %1
%4 = bitcast [5 x float]* %2 to i8*
%5 = bitcast [5 x float]* %3 to i8*
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
%8 = call i32 @__ESBMC_check_stability(float* %6, float* %7)
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x float]
%2 = alloca [5 x float]
%3 = bitcast [5 x float]* %1 to i8*
%4 = bitcast [5 x float]* %2 to i8*
%5 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = call i32 @__ESBMC_check_stability(float* %5, float* %6)
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_NOW;
void *dlopen(char const *, int /*<<< orphan*/);
void *Sys_Library_Open(const char *name) { return dlopen(name, RTLD_NOW); }


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

x86 assembly (clang, -O2):
<Sys_Library_Open>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <dlopen@plt>

LLVM IR (-O0):
@RTLD_NOW = global i32 0
define i8* @Sys_Library_Open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @RTLD_NOW
%5 = call i8* @dlopen(i8* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@RTLD_NOW = global i32 0
define i8* @Sys_Library_Open(i8* %0) {
%2 = load i32, i32* @RTLD_NOW
%3 = tail call i8* @dlopen(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void safe_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @safe_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
mkstemp(as) char *as;
{
  int fd;
  return (_gettemp(as, &fd) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <_gettemp@plt>
cmp    $0x0,%eax
je     113f <mkstemp+0x2f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <mkstemp+0x3c>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <mkstemp+0x3c>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <_gettemp@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i32*, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, ...)*)(i8* %4, i32* %3)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7
%11 = phi i32 [ %8, %7 ], [ -1, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i8*, i32*, ...) bitcast (i32 (...)* @_gettemp to i32 (i8*, i32*, ...)*)(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}
/* Variables and functions */
int stb__wildmatch_raw(char *, char *, int, int /*<<< orphan*/);
int stb_wildfind(char *expr, char *candidate) {
  return stb__wildmatch_raw(expr, candidate, 1, 0);
}


x86 assembly (clang, -O0):
<stb_wildfind>:
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    $0x1,%edx
xor    %ecx,%ecx
call   1030 <stb__wildmatch_raw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_wildfind>:
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1030 <stb__wildmatch_raw@plt>

LLVM IR (-O0):
define i32 @stb_wildfind(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 @stb__wildmatch_raw(i8* %5, i8* %6, i32 1, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @stb_wildfind(i8* %0, i8* %1) {
%3 = tail call i32 @stb__wildmatch_raw(i8* %0, i8* %1, i32 1, i32 0)
ret i32 %3
}
int isNumber(char *i) {
  switch (*i) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffd0,%eax
sub    $0x9,%eax
ja     112c <isNumber+0x2c>
jmp    1120 <isNumber+0x20>
movl   $0x1,-0x4(%rbp)
jmp    1133 <isNumber+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumber>:
movsbl (%rdi),%ecx
add    $0xffffffd0,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isNumber(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = add nsw i32 %3, -48
%5 = icmp ult i32 %4, 10
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ SetStateUnattached();
void SetStateDelayUnattached(void) {
  SetStateUnattached();
  return;
}


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

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

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

LLVM IR (-O2):
define void @SetStateDelayUnattached() {
%1 = tail call i32 (...) @SetStateUnattached()
ret void
}
/* Variables and functions */
int close(int);
int dkclose(int filedes) { return (close(filedes)); }


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

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

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

LLVM IR (-O2):
define i32 @dkclose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ set_recursive_depth(int);
void set_recursive_depth_3() { set_recursive_depth(3); }


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

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

LLVM IR (-O0):
define void @set_recursive_depth_3() {
%1 = call i32 @set_recursive_depth(i32 3)
ret void
}

LLVM IR (-O2):
define void @set_recursive_depth_3() {
%1 = tail call i32 @set_recursive_depth(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_rtclock_get() {
  printf("NOT IMPLEMENTED:"
         "pa_rtclock_get"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_rtclock_get\0A\00"
define i32 @pa_rtclock_get() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_rtclock_get\00"
define i32 @pa_rtclock_get() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int main(int argc, char **argv) {
  switch (argc) {
  case 1:
    __builtin_unreachable();
  case 4:
    __builtin_unreachable();
  default:
    __builtin_unreachable();
  }
  return 10;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1128 <_fini>
jmp    1123 <main+0x23>
jmp    1128 <_fini>

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
switch i32 %6, label %9 [
i32 1, label %7
i32 4, label %8
]
7: ; preds = %2
unreachable
8: ; preds = %2
unreachable
9: ; preds = %2
unreachable
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ ExportA();
int /*<<< orphan*/ ExportB();
int main() {
  ExportA();
  ExportB();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @ExportA()
%2 = call i32 (...) @ExportB()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ExportA()
%2 = tail call i32 (...) @ExportB()
ret i32 0
}
/* Variables and functions */
int core7_safe(char const *);
int U_EMRSETWINDOWORGEX_safe(const char *record) {
  return (core7_safe(record));
}


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

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

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

LLVM IR (-O2):
define i32 @U_EMRSETWINDOWORGEX_safe(i8* %0) {
%2 = tail call i32 @core7_safe(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void t1(int x) {
  if (x != 4100)
    abort();
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1004,-0x4(%rbp)
je     112f <t1+0x1f>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
cmp    $0x1004,%edi
jne    1119 <t1+0x9>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @t1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 4100
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @t1(i32 %0) {
%2 = icmp eq i32 %0, 4100
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
int pci_check_direct();
int pci_init(void) {
  int result;
  result = pci_check_direct();
  return result;
}


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

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

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

LLVM IR (-O2):
define i32 @pci_init() {
%1 = tail call i32 (...) @pci_check_direct()
ret i32 %1
}
int Object_init(void *self) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @Object_init(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
int sca_close(int FileDescriptor) {
  int value;
  value = -1;
  errno = EINTR;
  while (value == -1 && errno == EINTR) {
    value = close(FileDescriptor);
  }
  return (value);
}


x86 assembly (clang, -O0):
<sca_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%rcx
mov    0x2ead(%rip),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
cmpl   $0xffffffff,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jne    115f <sca_close+0x4f>
mov    0x2e94(%rip),%rax
mov    (%rax),%rax
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116f <sca_close+0x5f>
jmp    117f <sca_close+0x6f>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
jmp    1136 <sca_close+0x26>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sca_close>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2eba(%rip),%r14
mov    (%r14),%rax
mov    0x2eb8(%rip),%r15
mov    %rax,(%r15)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1144 <sca_close+0x34>
mov    (%r14),%rcx
cmp    %rcx,(%r15)
je     1130 <sca_close+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EINTR = global i64 0
@errno = global i64 0
define i32 @sca_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i64, i64* @EINTR
store i64 %4, i64* @errno
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i64, i64* @errno
%10 = load i64, i64* @EINTR
%11 = icmp eq i64 %9, %10
br label %12
12: ; preds = %8, %5
%13 = phi i1 [ false, %5 ], [ %11, %8 ]
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = load i32, i32* %2
%16 = call i32 @close(i32 %15)
store i32 %16, i32* %3
br label %5
17: ; preds = %12
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@EINTR = global i64 0
@errno = global i64 0
define i32 @sca_close(i32 %0) {
%2 = load i64, i64* @EINTR
store i64 %2, i64* @errno
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @close(i32 %0)
%5 = icmp eq i32 %4, -1
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3
ret i32 %4
}
void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
                      int mapped_ents, int direction) {}


x86 assembly (clang, -O0):
<debug_dma_map_sg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device = type opaque
%struct.scatterlist = type opaque
define void @debug_dma_map_sg(%struct.device* %0, %struct.scatterlist* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.device*
%7 = alloca %struct.scatterlist*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.device* %0, %struct.device** %6
store %struct.scatterlist* %1, %struct.scatterlist** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
%struct.scatterlist = type opaque
define void @debug_dma_map_sg(%struct.device* nocapture %0, %struct.scatterlist* nocapture %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int min2(int a, int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min2+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min2+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min2>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @min2(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 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min2(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int MYstrlen(char *source) {
  int i;
  char *s = source;
  for (; *source++;)
    ;
  return (source - s - 1);
}


x86 assembly (clang, -O0):
<MYstrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     112d <MYstrlen+0x2d>
jmp    1110 <MYstrlen+0x10>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @MYstrlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = xor i64 %9, -1
%11 = add i64 %8, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x3b() {
  Assert_real((isbdigit(59) == 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_isbdigit.c",
              300, ("isbdigit should be 0 for ;"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x3b>:
push   %rax
mov    $0x3b,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x12c,%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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for ;\00"
define void @t_isbdigit_0x3b() {
%1 = call i64 @isbdigit(i32 59)
%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 300, 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for ;\00"
define void @t_isbdigit_0x3b() {
%1 = tail call i64 @isbdigit(i32 59)
%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 300, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long long GetSubmission(long long playernum) { return 1 + playernum / 2; }


x86 assembly (clang, -O0):
<GetSubmission>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSubmission>:
mov    %rdi,%rax
shr    $0x3f,%rax
add    %rdi,%rax
sar    %rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @GetSubmission(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 2
%5 = add nsw i64 1, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @GetSubmission(i64 %0) {
%2 = sdiv i64 %0, 2
%3 = add nsw i64 %2, 1
ret i64 %3
}
/* Variables and functions */
__attribute__((section(".after_vectors"))) void UsageFault_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<UsageFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <UsageFault_Handler+0x9>
jmp    1109 <UsageFault_Handler+0x9>

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

LLVM IR (-O0):
define void @UsageFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @UsageFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
int test_imm_8Auint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x8A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Auint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 592705486848
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __NR_exit_group;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int);
__attribute__((noreturn)) void doexit(int status) {
  volatile unsigned i;
  syscall(__NR_exit_group, status);
  for (i = 0;; i++) {
  }
}


x86 assembly (clang, -O0):
<doexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
movl   $0x0,-0x8(%rbp)
jmp    1138 <doexit+0x28>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <doexit+0x23>

x86 assembly (clang, -O2):
<doexit>:
push   %rax
mov    %edi,%esi
mov    0x2ed6(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
movl   $0x0,0x4(%rsp)
nopl   0x0(%rax)
addl   $0x1,0x4(%rsp)
jmp    1130 <doexit+0x20>

LLVM IR (-O0):
@__NR_exit_group = global i32 0
define void @doexit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @__NR_exit_group
%5 = load i32, i32* %2
%6 = call i32 @syscall(i32 %4, i32 %5)
store volatile i32 0, i32* %3
br label %7
7: ; preds = %8, %1
br label %8
8: ; preds = %7
%9 = load volatile i32, i32* %3
%10 = add i32 %9, 1
store volatile i32 %10, i32* %3
br label %7
}

LLVM IR (-O2):
@__NR_exit_group = global i32 0
define void @doexit(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @__NR_exit_group
%5 = tail call i32 @syscall(i32 %4, i32 %0)
store volatile i32 0, i32* %2
br label %6
6: ; preds = %6, %1
%7 = load volatile i32, i32* %2
%8 = add i32 %7, 1
store volatile i32 %8, i32* %2
br label %6
}
void no_curor(void) {
  ;
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @no_curor() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t LROT(uint32_t x, uint32_t m) { return (x << m) | (x >> (32 - m)); }


x86 assembly (clang, -O0):
<LROT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LROT>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @LROT(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 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @LROT(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int test7() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test7() {
ret i32 0
}
int test_imm_B2uint32_mem(unsigned int *val) {
  return ((*val) & (0xB2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B2uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 178
%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_B2uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 178
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int atomic_get_and_set_int(volatile int *var, int v) {
  asm volatile("xchgl %1, %0"
               " \n\t"
               : "+q"(v), "=m"(*var)
               : "m"(*var)
               : "memory");
  return v;
}


x86 assembly (clang, -O0):
<atomic_get_and_set_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%rdx
xchg   %eax,(%rcx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_get_and_set_int>:
mov    %esi,%eax
xchg   %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @atomic_get_and_set_int(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 asm sideeffect "xchgl $1, $0 \0A\09", "=q,=*m,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %6, i32* elementtype(i32) %7, i32 %5)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @atomic_get_and_set_int(i32* %0, i32 %1) {
%3 = tail call i32 asm sideeffect "xchgl $1, $0 \0A\09", "=q,=*m,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32* elementtype(i32) %0, i32 %1)
ret i32 %3
}
int test_imm_2Dint64_highword_reg(long long val) {
  return ((val >> 32) & (0x2D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_2Dint64_highword_reg>:
movabs $0x2d00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Dint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 45
%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_2Dint64_highword_reg(i64 %0) {
%2 = and i64 %0, 193273528320
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int q0(char c) {
  if (c == 'a') {
    printf("*** state 0 ***\n");
    return 0;
  } else if (c == 'b') {
    return 1;
  }
}


x86 assembly (clang, -O0):
<q0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jne    1143 <q0+0x33>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1161 <q0+0x51>
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
jne    115c <q0+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1161 <q0+0x51>
jmp    1161 <q0+0x51>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q0>:
mov    $0x1,%eax
cmp    $0x61,%dil
jne    112e <q0+0x1e>
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"*** state 0 ***\0A\00"
define i32 @q0(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 97
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %15
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 98
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %2
br label %15
14: ; preds = %9
br label %15
15: ; preds = %7, %13, %14
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@str = [16 x i8] c"*** state 0 ***\00"
define i32 @q0(i8 signext %0) {
%2 = icmp eq i8 %0, 97
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %6
}
int mus_audio_initialize(void) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @mus_audio_initialize() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ _SC_OPEN_MAX;
int sysconf(int /*<<< orphan*/);
int max_fd(void) {
  int ret = sysconf(_SC_OPEN_MAX);
  return ret != -1 ? ret : 4096;
}


x86 assembly (clang, -O0):
<max_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     113e <max_fd+0x2e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114b <max_fd+0x3b>
mov    $0x1000,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <max_fd+0x3b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_fd>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
cmp    $0xffffffff,%eax
mov    $0x1000,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@_SC_OPEN_MAX = global i32 0
define i32 @max_fd() {
%1 = alloca i32
%2 = load i32, i32* @_SC_OPEN_MAX
%3 = call i32 @sysconf(i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %1
br label %9
8: ; preds = %0
br label %9
9: ; preds = %8, %6
%10 = phi i32 [ %7, %6 ], [ 4096, %8 ]
ret i32 %10
}

LLVM IR (-O2):
@_SC_OPEN_MAX = global i32 0
define i32 @max_fd() {
%1 = load i32, i32* @_SC_OPEN_MAX
%2 = tail call i32 @sysconf(i32 %1)
%3 = icmp eq i32 %2, -1
%4 = select i1 %3, i32 4096, i32 %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *exec) {
  fprintf(stderr,
          "%s: \n"
          "   agent mode\n"
          "    --agent -t <type> -a <active> -p <primary host> -d <primary "
          "device> -m <primary mountpoint>\n"
          "    -q <mirror host> -e <mirror device> -n <mirror mountpoint>\n",
          exec);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [179 x i8] c"%s: \0A agent mode\0A --agent -t <type> -a <active> -p <primary host> -d <primary device> -m <primary mountpoint>\0A -q <mirror host> -e <mirror device> -n <mirror mountpoint>\0A\00"
define void @usage(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 ([179 x i8], [179 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [179 x i8] c"%s: \0A agent mode\0A --agent -t <type> -a <active> -p <primary host> -d <primary device> -m <primary mountpoint>\0A -q <mirror host> -e <mirror device> -n <mirror mountpoint>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ time_clock_date_words();
int /*<<< orphan*/ time_clock_digital();
void init_time(void) {
  time_clock_digital();
  time_clock_date_words();
}


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

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

LLVM IR (-O0):
define void @init_time() {
%1 = call i32 (...) @time_clock_digital()
%2 = call i32 (...) @time_clock_date_words()
ret void
}

LLVM IR (-O2):
define void @init_time() {
%1 = tail call i32 (...) @time_clock_digital()
%2 = tail call i32 (...) @time_clock_date_words()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fail(const char *s) {
  fprintf(stderr, "%s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<fail>:
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    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fail>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fail(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void GNSTGIdle(void) {}


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

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

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

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