xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ clip_by_value(double, int, int);
scalar_t__ exp(int /*<<< orphan*/);
double log(scalar_t__);
double softplus(double x) { return log(1 + exp(clip_by_value(x, 1e-9, 1e9))); }


x86 assembly (clang, -O0):
<softplus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
mov    $0x3b9aca00,%esi
call   1030 <clip_by_value@plt>
mov    %eax,%edi
call   1040 <exp@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softplus>:
push   %rax
xor    %edi,%edi
mov    $0x3b9aca00,%esi
call   1030 <clip_by_value@plt>
mov    %eax,%edi
call   1040 <exp@plt>
lea    0x1(%rax),%rdi
pop    %rax
jmp    1050 <log@plt>

LLVM IR (-O0):
define double @softplus(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @clip_by_value(double %3, i32 0, i32 1000000000)
%5 = call i64 @exp(i32 %4)
%6 = add nsw i64 1, %5
%7 = call double @log(i64 %6)
ret double %7
}

LLVM IR (-O2):
define double @softplus(double %0) {
%2 = tail call i32 @clip_by_value(double %0, i32 0, i32 1000000000)
%3 = tail call i64 @exp(i32 %2)
%4 = add nsw i64 %3, 1
%5 = tail call double @log(i64 %4)
ret double %5
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_file(const char *path) {
  struct stat path_stat;
  return stat(path, &path_stat) == 0 && S_ISREG(path_stat.st_mode);
}


x86 assembly (clang, -O0):
<is_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115d <is_file+0x3d>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <is_file+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_file(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISREG(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_file(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
int udpsrvdtls_loadcerts(const char *cafile, const char *certfile,
                         const char *pkeyfile) {
  return 0;
}


x86 assembly (clang, -O0):
<udpsrvdtls_loadcerts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @udpsrvdtls_loadcerts(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sfun(int);
void main() { printf("%d", sfun(3)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <sfun@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <sfun@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = tail call i32 @sfun(i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void av_tea_crypt() {}


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

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

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

LLVM IR (-O2):
define void @av_tea_crypt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sumar(int a, int b) {
  a += b;
  printf("\nLa suma es: %d\n", a);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"\0ALa suma es: %d\0A\00"
define i32 @sumar(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 = add nsw i32 %6, %5
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0ALa suma es: %d\0A\00"
define i32 @sumar(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rob(int *, int);
int main(int argc, char const *argv[]) {
  int test[] = {8, 2, 8, 9, 2};
  printf("%d\n", rob(test, 5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebe(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1040 <rob@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <rob@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.test = [5 x i32] [i32 8, i32 2, i32 8, i32 9, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [5 x i32]* %6 to i8*
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%9 = call i32 @rob(i32* %8, i32 5)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test = [5 x i32] [i32 8, i32 2, i32 8, i32 9, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = call i32 @rob(i32* %5, i32 5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
void fdevent_clrfd_cloexec(int fd) { ((void)(fd)); }


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

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

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

LLVM IR (-O2):
define void @fdevent_clrfd_cloexec(i32 %0) {
ret void
}
void write_nothingb() {}


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

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

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

LLVM IR (-O2):
define void @write_nothingb() {
ret void
}
/* Variables and functions */
char *search_replace_string(char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *search_replace_single_quoted_string(char *source_destination,
                                          char *search_string,
                                          char *replace_string) {
  char buffer[1024];
  sprintf(buffer, "'%s'", replace_string);
  strcpy(replace_string, buffer);
  return search_replace_string(source_destination, search_string,
                               replace_string);
}


x86 assembly (clang, -O0):
<search_replace_single_quoted_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xea7(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <search_replace_string@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search_replace_single_quoted_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeb2(%rip),%rsi
mov    %rsp,%r12
mov    %r12,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <search_replace_string@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"'%s'\00"
define i8* @search_replace_single_quoted_string(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1024 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %6
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %6
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = call i8* @search_replace_string(i8* %14, i8* %15, i8* %16)
ret i8* %17
}

LLVM IR (-O2):
@.str = [5 x i8] c"'%s'\00"
define i8* @search_replace_single_quoted_string(i8* %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i32 @strcpy(i8* %2, i8* %5)
%8 = call i8* @search_replace_string(i8* %0, i8* %1, i8* %2)
ret i8* %8
}
int abs(int v) { return (v < 0 ? -v : v); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ PKCS8_PRIV_KEY_INFO;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *, void **,
                                  int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_PKCS8INF;
scalar_t__ d2i_PKCS8_PRIV_KEY_INFO;
PKCS8_PRIV_KEY_INFO *PEM_read_PKCS8_PRIV_KEY_INFO(FILE *fp,
                                                  PKCS8_PRIV_KEY_INFO **x,
                                                  pem_password_cb *cb,
                                                  void *u) {
  return PEM_ASN1_read((d2i_of_void *)d2i_PKCS8_PRIV_KEY_INFO,
                       PEM_STRING_PKCS8INF, fp, (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_PKCS8_PRIV_KEY_INFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%rdi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_PKCS8_PRIV_KEY_INFO>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ecd(%rip),%rax
mov    (%rax),%rdi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read@plt>

LLVM IR (-O0):
@d2i_PKCS8_PRIV_KEY_INFO = global i64 0
@PEM_STRING_PKCS8INF = global i32 0
define i32* @PEM_read_PKCS8_PRIV_KEY_INFO(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_PKCS8_PRIV_KEY_INFO
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_PKCS8INF
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_PKCS8_PRIV_KEY_INFO = global i64 0
@PEM_STRING_PKCS8INF = global i32 0
define i32* @PEM_read_PKCS8_PRIV_KEY_INFO(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_PKCS8_PRIV_KEY_INFO
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PKCS8INF
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
/* Variables and functions */
double ***malloc(int);
void test_vla_sizeof(int x) { double(*memory)[2][x] = malloc(sizeof(*memory)); }


x86 assembly (clang, -O0):
<test_vla_sizeof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vla_sizeof>:
shl    $0x4,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @test_vla_sizeof(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load double*, double** %3
%7 = mul nuw i64 2, %5
%8 = mul nuw i64 8, %7
%9 = trunc i64 %8 to i32
%10 = call double*** @malloc(i32 %9)
%11 = bitcast double*** %10 to double*
store double* %11, double** %3
ret void
}

LLVM IR (-O2):
define void @test_vla_sizeof(i32 %0) {
%2 = shl i32 %0, 4
%3 = tail call double*** @malloc(i32 %2)
ret void
}
void do_DAA(void) {}


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

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

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

LLVM IR (-O2):
define void @do_DAA() {
ret void
}
int qual(void) {
  const int p;
  volatile int x;
}


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

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

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

LLVM IR (-O2):
define i32 @qual() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ SchemeAbort();
int /*<<< orphan*/ SchemeLog(char const *, char const *, int, char *, char *,
                             char const *);
void SchemeAssertFail(const char *file, const char *fn, int lineno,
                      const char *expr) {
  SchemeLog(file, fn, lineno, "ASSERT", "%s", expr);
  SchemeAbort();
}


x86 assembly (clang, -O0):
<SchemeAssertFail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r9
lea    0xeb3(%rip),%rcx
lea    0xeb3(%rip),%r8
call   1040 <SchemeLog@plt>
mov    $0x0,%al
call   1030 <SchemeAbort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SchemeAssertFail>:
push   %rax
mov    %rcx,%r9
lea    0xed5(%rip),%rcx
lea    0xed5(%rip),%r8
call   1040 <SchemeLog@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SchemeAbort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"ASSERT\00"
@.str.1 = [3 x i8] c"%s\00"
define void @SchemeAssertFail(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @SchemeLog(i8* %9, i8* %10, i32 %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = call i32 (...) @SchemeAbort()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"ASSERT\00"
@.str.1 = [3 x i8] c"%s\00"
define void @SchemeAssertFail(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @SchemeLog(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = tail call i32 (...) @SchemeAbort()
ret void
}
const char *_Locale_false(struct _Locale_numeric *__DUMMY_PAR) { return 0; }


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

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

LLVM IR (-O0):
%struct._Locale_numeric = type opaque
define i8* @_Locale_false(%struct._Locale_numeric* %0) {
%2 = alloca %struct._Locale_numeric*
store %struct._Locale_numeric* %0, %struct._Locale_numeric** %2
ret i8* null
}

LLVM IR (-O2):
%struct._Locale_numeric = type opaque
define noalias i8* @_Locale_false(%struct._Locale_numeric* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ reverse(int *, int, int);
void rotate(int a[], int n, int k) {
  k %= n;
  reverse(a, 0, n - 1);
  reverse(a, 0, k - 1);
  reverse(a, k, n - 1);
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <reverse@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <reverse@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
call   1030 <reverse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%eax
mov    %rdi,%rbx
cltd
idiv   %esi
mov    %edx,%r14d
lea    -0x1(%rsi),%ebp
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <reverse@plt>
lea    -0x1(%r14),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <reverse@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <reverse@plt>

LLVM IR (-O0):
define void @rotate(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = srem i32 %8, %7
store i32 %9, i32* %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = call i32 @reverse(i32* %10, i32 0, i32 %12)
%14 = load i32*, i32** %4
%15 = load i32, i32* %6
%16 = sub nsw i32 %15, 1
%17 = call i32 @reverse(i32* %14, i32 0, i32 %16)
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = load i32, i32* %5
%21 = sub nsw i32 %20, 1
%22 = call i32 @reverse(i32* %18, i32 %19, i32 %21)
ret void
}

LLVM IR (-O2):
define void @rotate(i32* %0, i32 %1, i32 %2) {
%4 = srem i32 %2, %1
%5 = add nsw i32 %1, -1
%6 = tail call i32 @reverse(i32* %0, i32 0, i32 %5)
%7 = add nsw i32 %4, -1
%8 = tail call i32 @reverse(i32* %0, i32 0, i32 %7)
%9 = tail call i32 @reverse(i32* %0, i32 %4, i32 %5)
ret void
}
int test_imm_72uint8_reg(unsigned char val) {
  return ((val) & (-0x72 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_72uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff8e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_72uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -114
%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_72uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -114
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void regerror(s) char *s;
{ printf("re error %s\n", s); }


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

x86 assembly (clang, -O2):
<regerror>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"re error %s\0A\00"
define void @regerror(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int crypto_ccm_module_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @crypto_ccm_module_init() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
FILE *importFile(char *argv) {
  FILE *input;
  input = fopen(argv, "r");
  if (input == NULL) {
    printf("Unable to open input file");
    exit(1);
  }
  return input;
}


x86 assembly (clang, -O0):
<importFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <importFile+0x41>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<importFile>:
push   %rax
lea    0xec8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1144 <importFile+0x14>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [26 x i8] c"Unable to open input file\00"
define i32* @importFile(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 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [26 x i8] c"Unable to open input file\00"
define noalias i32* @importFile(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 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i32* %2
}
void newlinespec_unit2OPT_ANYCRLF() {}


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

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

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

LLVM IR (-O2):
define void @newlinespec_unit2OPT_ANYCRLF() {
ret void
}
long double test_ilogbl(long double x) { return __builtin_ilogbl(x); }


x86 assembly (clang, -O0):
<test_ilogbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <ilogbl@plt>
mov    %eax,-0x14(%rbp)
fildl  -0x14(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ilogbl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <ilogbl@plt>
mov    %eax,0x14(%rsp)
fildl  0x14(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @test_ilogbl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @ilogbl(x86_fp80 %3)
%5 = sitofp i32 %4 to x86_fp80
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @test_ilogbl(x86_fp80 %0) {
%2 = tail call i32 @ilogbl(x86_fp80 %0)
%3 = sitofp i32 %2 to x86_fp80
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  int p = 1;
  scanf("%d", &n);
  scanf("%d", &p);
  int result = (n >> p) & 1;
  printf("%d", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x1,0x8(%rsp)
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%cl
shr    %cl,%esi
and    $0x1,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
cbuf19(f, n) { return (cbuf(f, n, 19)); }


x86 assembly (clang, -O0):
<cbuf19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x13,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf19>:
mov    $0x13,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf19(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 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 19)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf19(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 19)
ret i32 %3
}
void vi_close(void) {}


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

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

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

LLVM IR (-O2):
define void @vi_close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void blockg(void) {
  printf("gggggg\n");
  printf("g    g\n");
  printf("g\n");
  printf("g  ggg\n");
  printf("g    g\n");
  printf("gggggg\n");
}


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

x86 assembly (clang, -O2):
<blockg>:
push   %r14
push   %rbx
push   %rax
lea    0xef3(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xedd(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"gggggg\0A\00"
@.str.1 = [8 x i8] c"g g\0A\00"
@.str.2 = [3 x i8] c"g\0A\00"
@.str.3 = [8 x i8] c"g ggg\0A\00"
define void @blockg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.5 = [2 x i8] c"g\00"
@str.6 = [7 x i8] c"g ggg\00"
@str.7 = [7 x i8] c"g g\00"
@str.8 = [7 x i8] c"gggggg\00"
define void @blockg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
ret void
}
int main() {
  unsigned long long int uli;
  uli = 0x5555555555555555ULL;
  uli = 0xAAAAAAAAAAAAAAAAULL;
  uli = 0x0000000000000000ULL;
  uli = 0xFFFFFFFFFFFFFFFFULL;
  uli = 0x8000000000000000ULL;
  uli = 0x0000000000000001ULL;
  uli = 0x7FFFFFFFFFFFFFFFULL;
  uli = 0xFFFFFFFFFFFFFFFEULL;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movabs $0x5555555555555555,%rax
55 55 55
mov    %rax,-0x10(%rbp)
movabs $0xaaaaaaaaaaaaaaaa,%rax
aa aa aa
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movabs $0x8000000000000000,%rax
mov    %rax,-0x10(%rbp)
movq   $0x1,-0x10(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rax,-0x10(%rbp)
movq   $0xfffffffffffffffe,-0x10(%rbp)
ff
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 6148914691236517205, i64* %2
store i64 -6148914691236517206, i64* %2
store i64 0, i64* %2
store i64 -1, i64* %2
store i64 -9223372036854775808, i64* %2
store i64 1, i64* %2
store i64 9223372036854775807, i64* %2
store i64 -2, i64* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fun296() { return 296; }


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

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

LLVM IR (-O0):
define i32 @fun296() {
ret i32 296
}

LLVM IR (-O2):
define i32 @fun296() {
ret i32 296
}
/* Variables and functions */
bool positionAvailableAt(int position, int listCount) {
  if (position >= 0 && position <= listCount) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<positionAvailableAt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     112c <positionAvailableAt+0x2c>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     112c <positionAvailableAt+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <positionAvailableAt+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<positionAvailableAt>:
test   %edi,%edi
setns  %al
cmp    %esi,%edi
setle  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @positionAvailableAt(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, -1
%4 = icmp sle i32 %0, %1
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int is_blank_line(char *buf) {
  int i;
  int flag;
  i = 0;
  flag = 1;
  while (buf[i] != '\n') {
    if (buf[i] != ' ') {
      flag = 0;
      break;
    }
    i++;
  }
  return (flag);
}


x86 assembly (clang, -O0):
<is_blank_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     115a <is_blank_line+0x5a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     114c <is_blank_line+0x4c>
movl   $0x0,-0x10(%rbp)
jmp    115a <is_blank_line+0x5a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <is_blank_line+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank_line>:
movzbl (%rdi),%eax
cmp    $0x20,%al
jne    110d <is_blank_line+0xd>
add    $0x1,%rdi
jmp    1100 <is_blank_line>
cmp    $0xa,%al
jne    1117 <is_blank_line+0x17>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_blank_line(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 10, label %8
i8 32, label %6
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
br label %9
9: ; preds = %2, %8
%10 = phi i32 [ 1, %8 ], [ 0, %2 ]
ret i32 %10
}
void monte_nums_of_vars(long *ilen, long *olen, long *ffunc) {
  *ilen = 7;
  *olen = 3;
  *ffunc = -1;
}


x86 assembly (clang, -O0):
<monte_nums_of_vars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x7,(%rax)
mov    -0x10(%rbp),%rax
movq   $0x3,(%rax)
mov    -0x18(%rbp),%rax
movq   $0xffffffffffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<monte_nums_of_vars>:
movq   $0x7,(%rdi)
movq   $0x3,(%rsi)
movq   $0xffffffffffffffff,(%rdx)
ret

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

LLVM IR (-O2):
define void @monte_nums_of_vars(i64* nocapture writeonly %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
store i64 7, i64* %0
store i64 3, i64* %1
store i64 -1, i64* %2
ret void
}
int fun823() { return 823; }


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

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

LLVM IR (-O0):
define i32 @fun823() {
ret i32 823
}

LLVM IR (-O2):
define i32 @fun823() {
ret i32 823
}
/* Variables and functions */
int add(int, int);
int sub(int, int);
int calculate(int op, int op1, int op2) {
  int result;
  switch (op) {
  case 1:
    result = add(op1, op2);
    break;
  case 2:
    result = sub(op1, op2);
    break;
  default:
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<calculate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x1,%eax
je     1156 <calculate+0x36>
jmp    1145 <calculate+0x25>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     1169 <calculate+0x49>
jmp    117c <calculate+0x5c>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
jmp    1183 <calculate+0x63>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <sub@plt>
mov    %eax,-0x10(%rbp)
jmp    1183 <calculate+0x63>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate>:
cmp    $0x2,%edi
je     1133 <calculate+0x13>
cmp    $0x1,%edi
jne    113c <calculate+0x1c>
mov    %esi,%edi
mov    %edx,%esi
jmp    1030 <add@plt>
mov    %esi,%edi
mov    %edx,%esi
jmp    1040 <sub@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @calculate(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
switch i32 %8, label %17 [
i32 1, label %9
i32 2, label %13
]
9: ; preds = %3
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @add(i32 %10, i32 %11)
store i32 %12, i32* %7
br label %18
13: ; preds = %3
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @sub(i32 %14, i32 %15)
store i32 %16, i32* %7
br label %18
17: ; preds = %3
store i32 0, i32* %7
br label %18
18: ; preds = %17, %13, %9
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @calculate(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %8 [
i32 1, label %4
i32 2, label %6
]
4: ; preds = %3
%5 = tail call i32 @add(i32 %1, i32 %2)
br label %8
6: ; preds = %3
%7 = tail call i32 @sub(i32 %1, i32 %2)
br label %8
8: ; preds = %3, %6, %4
%9 = phi i32 [ %7, %6 ], [ %5, %4 ], [ 0, %3 ]
ret i32 %9
}
void object_init() { ; }


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

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

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

LLVM IR (-O2):
define void @object_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Timer0A_Arm();
int /*<<< orphan*/ Timer1A_Arm();
int /*<<< orphan*/ Timer2A_Arm();
int /*<<< orphan*/ Timer3A_Arm();
void Player_Play() {
  Timer0A_Arm();
  Timer1A_Arm();
  Timer2A_Arm();
  Timer3A_Arm();
}


x86 assembly (clang, -O0):
<Player_Play>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Timer0A_Arm@plt>
mov    $0x0,%al
call   1060 <Timer1A_Arm@plt>
mov    $0x0,%al
call   1050 <Timer2A_Arm@plt>
mov    $0x0,%al
call   1040 <Timer3A_Arm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Player_Play>:
push   %rax
xor    %eax,%eax
call   1030 <Timer0A_Arm@plt>
xor    %eax,%eax
call   1060 <Timer1A_Arm@plt>
xor    %eax,%eax
call   1050 <Timer2A_Arm@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Timer3A_Arm@plt>

LLVM IR (-O0):
define void @Player_Play() {
%1 = call i32 (...) @Timer0A_Arm()
%2 = call i32 (...) @Timer1A_Arm()
%3 = call i32 (...) @Timer2A_Arm()
%4 = call i32 (...) @Timer3A_Arm()
ret void
}

LLVM IR (-O2):
define void @Player_Play() {
%1 = tail call i32 (...) @Timer0A_Arm()
%2 = tail call i32 (...) @Timer1A_Arm()
%3 = tail call i32 (...) @Timer2A_Arm()
%4 = tail call i32 (...) @Timer3A_Arm()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void erreur_indice_ligne_colonne(int indice, int indicePersonne) {
  printf(
      "indice incorrect %d de ligne ou colonne de la personne d'indice %d !\n",
      indice, indicePersonne);
}


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

x86 assembly (clang, -O2):
<erreur_indice_ligne_colonne>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [70 x i8] c"indice incorrect %d de ligne ou colonne de la personne d'indice %d !\0A\00"
define void @erreur_indice_ligne_colonne(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 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"indice incorrect %d de ligne ou colonne de la personne d'indice %d !\0A\00"
define void @erreur_indice_ligne_colonne(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void INT_Excep_PERIB_INTB129(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB129() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_switch();
int main(int argc, char *argv[]) { test_switch(); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_switch()
ret i32 0
}
int prt(long n) {
  int tmp;
  for (tmp = n & 1; n >>= 1; tmp ^= n & 1)
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<prt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1145 <prt+0x45>
jmp    112e <prt+0x2e>
mov    -0x8(%rbp),%rcx
and    $0x1,%rcx
movslq -0xc(%rbp),%rax
xor    %rcx,%rax
mov    %eax,-0xc(%rbp)
jmp    1113 <prt+0x13>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prt>:
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x2,%rdi
jb     1123 <prt+0x23>
mov    %rdi,%rcx
xchg   %ax,%ax
sar    %rcx
mov    %ecx,%edx
and    $0x1,%edx
xor    %edx,%eax
cmp    $0x3,%rdi
mov    %rcx,%rdi
ja     1110 <prt+0x10>
ret

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

LLVM IR (-O2):
define i32 @prt(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 1
%4 = icmp ult i64 %0, 2
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %8, %5 ], [ %0, %1 ]
%7 = phi i32 [ %11, %5 ], [ %3, %1 ]
%8 = ashr i64 %6, 1
%9 = trunc i64 %8 to i32
%10 = and i32 %9, 1
%11 = xor i32 %10, %7
%12 = icmp ult i64 %6, 4
br i1 %12, label %13, label %5
13: ; preds = %5, %1
%14 = phi i32 [ %3, %1 ], [ %11, %5 ]
ret i32 %14
}