xunge/DecIR huggingface dataset:
int instr_util_signx_short(unsigned int val) {
  if (val & 0x00008000)
    val |= 0xffff0000;
  else
    val &= 0x0000ffff;
  return (int)val;
}


x86 assembly (clang, -O0):
<instr_util_signx_short>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     1128 <instr_util_signx_short+0x28>
mov    -0x4(%rbp),%eax
or     $0xffff0000,%eax
mov    %eax,-0x4(%rbp)
jmp    1133 <instr_util_signx_short+0x33>
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<instr_util_signx_short>:
movswl %di,%eax
movzwl %ax,%ecx
and    $0xffff0000,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @instr_util_signx_short(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 32768
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, -65536
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = and i32 %10, 65535
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @instr_util_signx_short(i32 %0) {
%2 = and i32 %0, 32768
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 65535
%5 = select i1 %3, i32 0, i32 -65536
%6 = or i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ consoleClearAfterCmd(char *);
void consoleClearAfterCmdDefaultMsg() {
  consoleClearAfterCmd("Press any key or type command to continue");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"Press any key or type command to continue\00"
define void @consoleClearAfterCmdDefaultMsg() {
%1 = call i32 @consoleClearAfterCmd(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Press any key or type command to continue\00"
define void @consoleClearAfterCmdDefaultMsg() {
%1 = tail call i32 @consoleClearAfterCmd(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *, char *);
int main() {
  char a[10000], b[10000], c[10000];
  scanf("%s%s", a, b);
  add(a, b, c);
  printf("%s\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7540,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2720(%rbp),%rsi
lea    -0x4e30(%rbp),%rdx
lea    0xea9(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x2720(%rbp),%rdi
lea    -0x4e30(%rbp),%rsi
lea    -0x7540(%rbp),%rdx
call   1030 <add@plt>
lea    -0x7540(%rbp),%rsi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x7540,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x7530,%rsp
lea    0xebd(%rip),%rdi
lea    0x4e20(%rsp),%rbx
lea    0x2710(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <add@plt>
lea    0xe8f(%rip),%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x7530,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [10000 x i8]
%2 = alloca [10000 x i8]
%3 = alloca [10000 x i8]
%4 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%8 = call i32 @add(i8* %4, i8* %5, i8* %6)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}
char md_df(char *fname) { return (1); }


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

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

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

LLVM IR (-O2):
define signext i8 @md_df(i8* nocapture readnone %0) {
ret i8 1
}
void resist_context_compute(struct resist_context_t *ctx,
                            struct resist_setup_t *stp) {}


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

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

LLVM IR (-O0):
%struct.resist_context_t = type opaque
%struct.resist_setup_t = type opaque
define void @resist_context_compute(%struct.resist_context_t* %0, %struct.resist_setup_t* %1) {
%3 = alloca %struct.resist_context_t*
%4 = alloca %struct.resist_setup_t*
store %struct.resist_context_t* %0, %struct.resist_context_t** %3
store %struct.resist_setup_t* %1, %struct.resist_setup_t** %4
ret void
}

LLVM IR (-O2):
%struct.resist_context_t = type opaque
%struct.resist_setup_t = type opaque
define void @resist_context_compute(%struct.resist_context_t* nocapture %0, %struct.resist_setup_t* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
void create_file(const char *filename) {
  FILE *file = fopen(filename, "w");
  fprintf(file, "hello", 0);
  fclose(file);
}


x86 assembly (clang, -O0):
<create_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea7(%rip),%rsi
xor    %edx,%edx
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_file>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rsi
mov    %rax,%rdi
xor    %edx,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [6 x i8] c"hello\00"
define void @create_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [6 x i8] c"hello\00"
define void @create_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_assignop_exp(struct Cyc_Absyn_Exp *,
                                          int /*<<< orphan*/,
                                          struct Cyc_Absyn_Exp *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_assign_exp(struct Cyc_Absyn_Exp *e1,
                                           struct Cyc_Absyn_Exp *e2,
                                           unsigned loc) {
  return ({ Cyc_Absyn_assignop_exp(e1, 0, e2, loc); });
}


x86 assembly (clang, -O0):
<Cyc_Absyn_assign_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %esi,%esi
call   1030 <Cyc_Absyn_assignop_exp@plt>
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_assign_exp>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <Cyc_Absyn_assignop_exp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_assign_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca i32
%7 = alloca i32
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
store i32 %2, i32* %6
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%10 = load i32, i32* %6
%11 = call i32 @Cyc_Absyn_assignop_exp(%struct.Cyc_Absyn_Exp* %8, i32 0, %struct.Cyc_Absyn_Exp* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to %struct.Cyc_Absyn_Exp*
ret %struct.Cyc_Absyn_Exp* %14
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_assign_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = tail call i32 @Cyc_Absyn_assignop_exp(%struct.Cyc_Absyn_Exp* %0, i32 0, %struct.Cyc_Absyn_Exp* %1, i32 %2)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to %struct.Cyc_Absyn_Exp*
ret %struct.Cyc_Absyn_Exp* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int8_t hcd_malloc_check(void *Address) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hcd_malloc_check(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_movntpd(double *, int /*<<< orphan*/);
void __attribute__((__always___, __nodebug__))
_mm_stream_pd(double *p, __m128d a) {
  __builtin_ia32_movntpd(p, a);
}


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

x86 assembly (clang, -O2):
<_mm_stream_pd>:
jmp    1030 <__builtin_ia32_movntpd@plt>

LLVM IR (-O0):
define void @_mm_stream_pd(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 i32 @__builtin_ia32_movntpd(double* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @_mm_stream_pd(double* %0, i32 %1) {
%3 = tail call i32 @__builtin_ia32_movntpd(double* %0, i32 %1)
ret void
}
int newton(int n, int k) {
  if (k == 0 || k == n)
    return 1;
  else
    return newton(n - 1, n - k) + newton(n - 1, k);
}


x86 assembly (clang, -O0):
<newton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1134 <newton+0x24>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1140 <newton+0x30>
movl   $0x1,-0x4(%rbp)
jmp    116c <newton+0x5c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
call   1030 <newton@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <newton@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newton>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%r14d
test   %esi,%esi
je     1148 <newton+0x38>
mov    %edi,%ebx
mov    %edi,%ebp
sub    %esi,%ebp
je     1148 <newton+0x38>
add    $0xffffffff,%ebx
xor    %r14d,%r14d
nopl   0x0(%rax)
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <newton@plt>
add    %eax,%r14d
add    $0xffffffff,%ebx
add    $0xffffffff,%ebp
jne    1130 <newton+0x20>
add    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @newton(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* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8, %2
store i32 1, i32* %3
br label %25
13: ; preds = %8
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = sub nsw i32 %16, %17
%19 = call i32 @newton(i32 %15, i32 %18)
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
%22 = load i32, i32* %5
%23 = call i32 @newton(i32 %21, i32 %22)
%24 = add nsw i32 %19, %23
store i32 %24, i32* %3
br label %25
25: ; preds = %13, %12
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @newton(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, %1
%5 = or i1 %3, %4
br i1 %5, label %16, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %0, %2 ]
%8 = phi i32 [ %12, %6 ], [ 0, %2 ]
%9 = add nsw i32 %7, -1
%10 = sub nsw i32 %7, %1
%11 = tail call i32 @newton(i32 %9, i32 %10)
%12 = add nsw i32 %11, %8
%13 = icmp eq i32 %9, %1
br i1 %13, label %14, label %6
14: ; preds = %6
%15 = add i32 %12, 1
br label %16
16: ; preds = %14, %2
%17 = phi i32 [ 1, %2 ], [ %15, %14 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int SSL_get_fd(int /*<<< orphan*/ *);
int zopenssl_SSL_get_fd(SSL *ssl) { return SSL_get_fd(ssl); }


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

x86 assembly (clang, -O2):
<zopenssl_SSL_get_fd>:
jmp    1030 <SSL_get_fd@plt>

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

LLVM IR (-O2):
define i32 @zopenssl_SSL_get_fd(i32* %0) {
%2 = tail call i32 @SSL_get_fd(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void soma(int a, int b) { printf("%d\n", a + b); }


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

x86 assembly (clang, -O2):
<soma>:
add    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @soma(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 = add nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @soma(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int default_disconnect() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @default_disconnect() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ClearSuggestions();
int /*<<< orphan*/ Generera1(unsigned char *, int /*<<< orphan*/, int,
                             int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int);
int /*<<< orphan*/ IsCapitalized(unsigned char *);
int SkrivGenereradeOrd(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
SimpleCorrections(unsigned char *word) {
  ClearSuggestions();
  Generera1(word, 0, 1, 0, 0, strlen((char *)word), 1 | 4);
  return SkrivGenereradeOrd(IsCapitalized(word));
}


x86 assembly (clang, -O0):
<SimpleCorrections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ClearSuggestions@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%r9d
xor    %r8d,%r8d
mov    $0x1,%edx
mov    %r8d,%esi
mov    %r8d,%ecx
movl   $0x5,(%rsp)
call   1050 <Generera1@plt>
mov    -0x8(%rbp),%rdi
call   1070 <IsCapitalized@plt>
mov    %eax,%edi
call   1060 <SkrivGenereradeOrd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SimpleCorrections>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <ClearSuggestions@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movl   $0x5,(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %eax,%r9d
call   1050 <Generera1@plt>
mov    %rbx,%rdi
call   1070 <IsCapitalized@plt>
mov    %eax,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1060 <SkrivGenereradeOrd@plt>

LLVM IR (-O0):
define i32 @SimpleCorrections(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @ClearSuggestions()
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @Generera1(i8* %4, i32 0, i32 1, i32 0, i32 0, i32 %6, i32 5)
%8 = load i8*, i8** %2
%9 = call i32 @IsCapitalized(i8* %8)
%10 = call i32 @SkrivGenereradeOrd(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @SimpleCorrections(i8* %0) {
%2 = tail call i32 (...) @ClearSuggestions()
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @Generera1(i8* %0, i32 0, i32 1, i32 0, i32 0, i32 %3, i32 5)
%5 = tail call i32 @IsCapitalized(i8* %0)
%6 = tail call i32 @SkrivGenereradeOrd(i32 %5)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ array_dump(int *, int);
int /*<<< orphan*/ select_sort(int *, int);
int main(void) {
  int array[] = {1, 3, 8, 2, 4, 9, 6, 5, 7, 0};
  array_dump(array, sizeof(array) / sizeof(int));
  select_sort(array, sizeof(array) / sizeof(int));
  array_dump(array, sizeof(array) / sizeof(int));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <array_dump@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <select_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <array_dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <array_dump@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <select_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <array_dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.array = [10 x i32] [i32 1, i32 3, i32 8, i32 2, i32 4, i32 9, i32 6, i32 5, i32 7, i32 0]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @array_dump(i32* %3, i32 10)
%5 = call i32 @select_sort(i32* %3, i32 10)
%6 = call i32 @array_dump(i32* %3, i32 10)
ret i32 0
}
void check_smt_enabled(void) {}


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

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

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

LLVM IR (-O2):
define void @check_smt_enabled() {
ret void
}
int rl_noninc_forward_search(count, key)
int count __attribute__((unused)), key;
{ return noninc_search(1, (key == '?') ? '?' : 0); }


x86 assembly (clang, -O0):
<rl_noninc_forward_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    $0x3f,%eax
cmp    $0x3f,%ecx
cmove  %eax,%esi
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <noninc_search@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_noninc_forward_search>:
xor    %eax,%eax
cmp    $0x3f,%esi
cmovne %eax,%esi
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <noninc_search@plt>

LLVM IR (-O0):
define i32 @rl_noninc_forward_search(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 63
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 63, i32 0
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @noninc_search to i32 (i32, i32, ...)*)(i32 1, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @rl_noninc_forward_search(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 63
%4 = select i1 %3, i32 63, i32 0
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @noninc_search to i32 (i32, i32, ...)*)(i32 1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ _logsys_wthread_create();
int /*<<< orphan*/ logsys_config_facility_set(char *, int /*<<< orphan*/);
int /*<<< orphan*/ logsys_config_file_set(char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ logsys_config_mode_set(int);
__attribute__((constructor)) void logsys_system_init(void) {
  char *error_string;
  logsys_config_mode_set((1 << 1) | (1 << 2));
  logsys_config_file_set(&error_string, (NULL));
  logsys_config_facility_set("logsystestsubsystems", (LOG_DAEMON));
  if ((((1 << 1) | (1 << 2)) & (1 << 9)) == 0) {
    _logsys_wthread_create();
  }
}


x86 assembly (clang, -O0):
<logsys_system_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
call   1050 <logsys_config_mode_set@plt>
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <logsys_config_file_set@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
lea    0xe91(%rip),%rdi
call   1060 <logsys_config_facility_set@plt>
mov    $0x0,%al
call   1040 <_logsys_wthread_create@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logsys_system_init>:
push   %rax
mov    $0x6,%edi
call   1050 <logsys_config_mode_set@plt>
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <logsys_config_file_set@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
lea    0xe9b(%rip),%rdi
call   1060 <logsys_config_facility_set@plt>
xor    %eax,%eax
call   1040 <_logsys_wthread_create@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"logsystestsubsystems\00"
@LOG_DAEMON = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @logsys_system_init, i8* null }]
define void @logsys_system_init() {
%1 = alloca i8*
%2 = call i32 @logsys_config_mode_set(i32 6)
%3 = call i32 @logsys_config_file_set(i8** %1, i32* null)
%4 = load i32, i32* @LOG_DAEMON
%5 = call i32 @logsys_config_facility_set(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @_logsys_wthread_create()
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"logsystestsubsystems\00"
@LOG_DAEMON = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @logsys_system_init, i8* null }]
define void @logsys_system_init() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = tail call i32 @logsys_config_mode_set(i32 6)
%4 = call i32 @logsys_config_file_set(i8** %1, i32* null)
%5 = load i32, i32* @LOG_DAEMON
%6 = call i32 @logsys_config_facility_set(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @_logsys_wthread_create()
ret void
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ printf(char *, void *);
int main() {
  void *p = malloc(1);
  printf("p: %p\n", p);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <malloc@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"p: %p\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
double fisMin(double x, double y) { return ((x) < (y) ? (x) : (y)); }


x86 assembly (clang, -O0):
<fisMin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <fisMin+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <fisMin+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisMin>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @fisMin(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ switch_green(int);
int /*<<< orphan*/ switch_red(int);
bool set_status_led_tir4(bool running) {
  if (running) {
    switch_red(false);
    switch_green(true);
  } else {
    switch_green(false);
    switch_red(true);
  }
  return true;
}


x86 assembly (clang, -O0):
<set_status_led_tir4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114b <set_status_led_tir4+0x2b>
xor    %edi,%edi
call   1040 <switch_red@plt>
mov    $0x1,%edi
call   1030 <switch_green@plt>
jmp    115c <set_status_led_tir4+0x3c>
xor    %edi,%edi
call   1030 <switch_green@plt>
mov    $0x1,%edi
call   1040 <switch_red@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_status_led_tir4>:
push   %rax
test   %edi,%edi
je     1138 <set_status_led_tir4+0x18>
xor    %edi,%edi
call   1040 <switch_red@plt>
mov    $0x1,%edi
call   1030 <switch_green@plt>
jmp    1149 <set_status_led_tir4+0x29>
xor    %edi,%edi
call   1030 <switch_green@plt>
mov    $0x1,%edi
call   1040 <switch_red@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @set_status_led_tir4(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @switch_red(i32 0)
%5 = tail call i32 @switch_green(i32 1)
br label %9
6: ; preds = %1
%7 = tail call i32 @switch_green(i32 0)
%8 = tail call i32 @switch_red(i32 1)
br label %9
9: ; preds = %6, %3
ret i32 1
}
/* Type definitions */
struct indexer {
  int dummy;
};

/* Variables and functions */
struct indexer *indexer_new_with_string(int /*<<< orphan*/);
struct indexer *indexer_new() {
  return indexer_new_with_string(0);
}


x86 assembly (clang, -O0):
<indexer_new>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <indexer_new_with_string@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<indexer_new>:
xor    %edi,%edi
jmp    1030 <indexer_new_with_string@plt>

LLVM IR (-O0):
%struct.indexer = type { i32 }
define %struct.indexer* @indexer_new() {
%1 = call %struct.indexer* @indexer_new_with_string(i32 0)
ret %struct.indexer* %1
}

LLVM IR (-O2):
%struct.indexer = type { i32 }
define %struct.indexer* @indexer_new() {
%1 = tail call %struct.indexer* @indexer_new_with_string(i32 0)
ret %struct.indexer* %1
}
int fn2(int x, int y) { return ~(x | y) | x; }


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
xor    $0xffffffff,%eax
or     -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
mov    %esi,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn2(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 = or i32 %5, %6
%8 = xor i32 %7, -1
%9 = load i32, i32* %3
%10 = or i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @fn2(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
scalar_t__ xxx();
int main(void) {
  if (xxx() != 0)
    abort();
  printf("OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <xxx@plt>
cmp    $0x0,%rax
je     1157 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <xxx@plt>
test   %rax,%rax
jne    114d <main+0x1d>
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"OK\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @xxx()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define i32 @main() {
%1 = tail call i64 (...) @xxx()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ putchar(int);
main() {
  int c;
  while (c = getchar() != EOF) {
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    1168 <main+0x48>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%rax
je     1156 <main+0x36>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%rax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
%7 = zext i1 %6 to i32
store i32 %7, i32* %2
br i1 %6, label %8, label %11
8: ; preds = %3
%9 = load i32, i32* %2
%10 = call i32 @putchar(i32 %9)
br label %3
11: ; preds = %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@EOF = global i64 0
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @putchar(i32 1)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
ret i32 0
}
float warp_cube(float val) { return val * val * val; }


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

x86 assembly (clang, -O2):
<warp_cube>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @warp_cube(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
ret float %3
}
/* Variables and functions */
double mSecCount();
unsigned long TickCount() { return (unsigned long)(mSecCount() / 54.64); }


x86 assembly (clang, -O0):
<TickCount>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
call   1030 <mSecCount@plt>
movsd  0xedd(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xeca(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TickCount>:
push   %rax
xor    %eax,%eax
call   1030 <mSecCount@plt>
divsd  0xee0(%rip),%xmm0
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xed4(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @TickCount() {
%1 = call double (...) @mSecCount()
%2 = fdiv double %1, 5.464000e+01
%3 = fptoui double %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @TickCount() {
%1 = tail call double (...) @mSecCount()
%2 = fdiv double %1, 5.464000e+01
%3 = fptoui double %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ InputMatrice();
int /*<<< orphan*/ NumeroRigheEColonneMatrice();
int /*<<< orphan*/ StampaDati();
int main() {
  NumeroRigheEColonneMatrice();
  InputMatrice();
  StampaDati();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @NumeroRigheEColonneMatrice()
%2 = tail call i32 (...) @InputMatrice()
%3 = tail call i32 (...) @StampaDati()
ret i32 0
}
void FlushCache(void) {}


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

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

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

LLVM IR (-O2):
define void @FlushCache() {
ret void
}
int gcd(int x, int y) {
  while (y != 0) {
    int tmp = y;
    y = x % y;
    x = tmp;
  }
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Type definitions */
struct spx_mpool {
  int dummy;
};

/* Variables and functions */
void *spx_mpool_malloc(struct spx_mpool *, size_t const, int *);
void *spx_mpool_alloc_alone(struct spx_mpool *pool, const size_t size,
                            int *err) {
  return spx_mpool_malloc(pool, size, err);
}


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

x86 assembly (clang, -O2):
<spx_mpool_alloc_alone>:
jmp    1030 <spx_mpool_malloc@plt>

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

LLVM IR (-O2):
%struct.spx_mpool = type { i32 }
define i8* @spx_mpool_alloc_alone(%struct.spx_mpool* %0, i64 %1, i32* %2) {
%4 = tail call i8* @spx_mpool_malloc(%struct.spx_mpool* %0, i64 %1, i32* %2)
ret i8* %4
}
/* Variables and functions */
int lower(char);
int /*<<< orphan*/ printf(char *, int);
main() {
  printf("%c\n", lower('S'));
  printf("%c\n", lower('A'));
  printf("%c\n", lower('Z'));
  printf("%c\n", lower('a'));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x53,%edi
call   1040 <lower@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x41,%edi
call   1040 <lower@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5a,%edi
call   1040 <lower@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    $0x61,%edi
call   1040 <lower@plt>
mov    %eax,%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x53,%edi
call   1040 <lower@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x41,%edi
call   1040 <lower@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5a,%edi
call   1040 <lower@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x61,%edi
call   1040 <lower@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = call i32 @lower(i8 signext 83)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @lower(i8 signext 65)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @lower(i8 signext 90)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @lower(i8 signext 97)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i32 @lower(i8 signext 83)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @lower(i8 signext 65)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @lower(i8 signext 90)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @lower(i8 signext 97)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void delete_assignment_name(char *name) { free(name); }


x86 assembly (clang, -O0):
<delete_assignment_name>:
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):
<delete_assignment_name>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @delete_assignment_name(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 @delete_assignment_name(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x34() {
  Assert_real((islower(52) == 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_islower.c",
              265, ("islower should be 0 for 4"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 4\00"
define void @t_islower_0x34() {
%1 = tail call i64 @islower(i32 52)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 265, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void val_delete_userdata(void *v) { (void)v; }


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

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

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

LLVM IR (-O2):
define void @val_delete_userdata(i8* nocapture %0) {
ret void
}
/* Variables and functions */
long tsyscall(int, int, int, int, int, int, int);
int main(void) {
  long a;
  a = tsyscall(1, 2, 3, 4, 5, 6, 7);
  if (a != 28)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
call   1030 <tsyscall@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x1c,-0x10(%rbp)
je     1166 <main+0x56>
movl   $0x1,-0x4(%rbp)
jmp    116d <main+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x7,(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
call   1030 <tsyscall@plt>
xor    %ecx,%ecx
cmp    $0x1c,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @tsyscall(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7)
%2 = icmp ne i64 %1, 28
%3 = zext i1 %2 to i32
ret i32 %3
}
void SSMR3GetGCUIntReg(void) {}


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

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

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

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