xunge/DecIR huggingface dataset:
void test12(unsigned n) {
  for (unsigned i; n; ++i)
    ;
}


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1124 <test12+0x24>
jmp    1116 <test12+0x16>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1107 <test12+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
test   %edi,%edi
je     1112 <test12+0x12>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <test12+0x10>
ret

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

LLVM IR (-O2):
define void @test12(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
int /*<<< orphan*/ usage();
void GetExtension(const char *str, char *ext) {
  if (strlen(str) > 16)
    usage();
  strcpy(ext, str);
}


x86 assembly (clang, -O0):
<GetExtension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x10,%eax
jle    1159 <GetExtension+0x29>
mov    $0x0,%al
call   1050 <usage@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetExtension>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x11,%eax
jl     114b <GetExtension+0x1b>
xor    %eax,%eax
call   1050 <usage@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @GetExtension(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = icmp sgt i32 %6, 16
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
br label %10
10: ; preds = %8, %2
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = call i32 @strcpy(i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @GetExtension(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 16
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @usage()
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @strcpy(i8* %1, i8* %0)
ret void
}
int is_bin_digit(char c) { return (c == '0' || c == '1'); }


x86 assembly (clang, -O0):
<is_bin_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_bin_digit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x31,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_bin_digit>:
and    $0xfe,%dil
xor    %eax,%eax
cmp    $0x30,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_bin_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 48
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 49
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_bin_digit(i8 signext %0) {
%2 = and i8 %0, -2
%3 = icmp eq i8 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
void RAND_status(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_status() {
ret void
}
/* Variables and functions */
scalar_t__ leap(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  printf("Enter a Year: ");
  int year;
  scanf("%d", &year);
  if (leap(year))
    printf("Its a Leap Year\n");
  else
    printf("Its not a Leap Year\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <leap@plt>
cmp    $0x0,%rax
je     117e <main+0x4e>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
jmp    118a <main+0x5a>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
lea    0xebb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <leap@plt>
test   %rax,%rax
lea    0xea1(%rip),%rax
lea    0xeae(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a Year: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"Its a Leap Year\0A\00"
@.str.3 = [21 x i8] c"Its not a Leap Year\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i64 @leap(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter a Year: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [20 x i8] c"Its not a Leap Year\00"
@str.4 = [16 x i8] c"Its a Leap Year\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i64 @leap(i32 %5)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0)
%9 = call i32 @puts(i8* dereferenceable(1) %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int putc(int, int /*<<< orphan*/ *);
int fputs(const char *restrict bp, FILE *restrict fp) {
  int r, ch;
  while (ch = *bp++)
    r = putc(ch, fp);
  return r;
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     1152 <fputs+0x42>
mov    -0x18(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <putc@plt>
mov    %eax,-0x14(%rbp)
jmp    1120 <fputs+0x10>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%cl
test   %cl,%cl
je     1148 <fputs+0x38>
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %cl,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <fputs+0x20>
jmp    1148 <fputs+0x38>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @fputs(i8* noalias nocapture %0, i32* noalias nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @putc(i32 %8, i32* %1)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i32 [ undef, %2 ], [ %10, %5 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void die(void) { exit(1); }


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @die() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *);
int /*<<< orphan*/ stderr;
void error_message(const char *string) {
  va_list args;
  extern char *program_invocation_name;
  fprintf(stderr, "%s: %s\n", program_invocation_name, string);
}


x86 assembly (clang, -O0):
<error_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%rdx
mov    -0x8(%rbp),%rcx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_message>:
mov    %rdi,%rcx
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    0x2ec5(%rip),%rax
mov    (%rax),%rdx
lea    0xed3(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@program_invocation_name = external global i8*
define void @error_message(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @stderr
%5 = load i8*, i8** @program_invocation_name
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@program_invocation_name = external global i8*
define void @error_message(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** @program_invocation_name
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void greet() { printf("I am lib01!\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"I am lib01!\0A\00"
define void @greet() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"I am lib01!\00"
define void @greet() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f1();
int f2(void) { return f1() + 1; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <f1@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
xor    %eax,%eax
call   1030 <f1@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f2() {
%1 = call i32 (...) @f1()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @f2() {
%1 = tail call i32 (...) @f1()
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) { return isupper(c) ? (c + 0x20) : c; }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void TSIL_Info(const char *msg) { return; }


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

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

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

LLVM IR (-O2):
define void @TSIL_Info(i8* nocapture %0) {
ret void
}
int test_imm_F5int8_reg(signed char val) {
  return ((val) & (0xF5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F5int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 245
%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_F5int8_reg(i8 signext %0) {
%2 = and i8 %0, -11
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int read_char(FILE *f) { return fgetc(f); }


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

x86 assembly (clang, -O2):
<read_char>:
jmp    1030 <fgetc@plt>

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

LLVM IR (-O2):
define i32 @read_char(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, char *);
void usage(char *argv[]) { errx(EX_USAGE, "Usage: %s <ip> <port>", argv[0]); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xedd(%rip),%rsi
mov    %eax,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@EX_USAGE = global i32 0
@.str = [22 x i8] c"Usage: %s <ip> <port>\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @EX_USAGE
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @errx(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@EX_USAGE = global i32 0
@.str = [22 x i8] c"Usage: %s <ip> <port>\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @EX_USAGE
%3 = load i8*, i8** %0
%4 = tail call i32 @errx(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void jac_chain_nm4_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @jac_chain_nm4_incref() {
ret void
}
/* Variables and functions */
scalar_t__ isPalindrome(char *);
int /*<<< orphan*/ printf(char *, char *);
void test(char *s) {
  if (isPalindrome(s)) {
    printf("yes! %s\n", s);
  } else {
    printf("no! %s\n", s);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <isPalindrome@plt>
cmp    $0x0,%rax
je     1154 <test+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    1164 <test+0x44>
mov    -0x8(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %rdi,%rbx
call   1040 <isPalindrome@plt>
test   %rax,%rax
lea    0xed6(%rip),%rax
lea    0xec6(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"yes! %s\0A\00"
@.str.1 = [8 x i8] c"no! %s\0A\00"
define void @test(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @isPalindrome(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"yes! %s\0A\00"
@.str.1 = [8 x i8] c"no! %s\0A\00"
define void @test(i8* %0) {
%2 = tail call i64 @isPalindrome(i8* %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i8* %0)
ret void
}
void dd_pbl_ios_appflyer_track_event(const char *name, const char *data,
                                     const char *currency) {}


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

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

LLVM IR (-O0):
define void @dd_pbl_ios_appflyer_track_event(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 void
}

LLVM IR (-O2):
define void @dd_pbl_ios_appflyer_track_event(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
int do_651() { return 651; }


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

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

LLVM IR (-O0):
define i32 @do_651() {
ret i32 651
}

LLVM IR (-O2):
define i32 @do_651() {
ret i32 651
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("ls");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"ls\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void XWDRIV(ifunc, rbuf, nbuf, chr, lchr, mode, w_ifunc, w_rbuf, w_nbuf, w_chr,
            w_lchr, w_mode) int *ifunc;
float *rbuf;
int *nbuf;
char *chr;
int *lchr;
int w_ifunc, w_rbuf, w_nbuf, w_chr, w_lchr, w_mode;
{
  xwdriv_(ifunc, rbuf, nbuf, chr, lchr, mode, w_chr);
  return;
}


x86 assembly (clang, -O0):
<XWDRIV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x28(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <xwdriv_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XWDRIV>:
push   %rax
mov    0x28(%rsp),%eax
mov    %eax,(%rsp)
xor    %eax,%eax
call   1030 <xwdriv_@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @XWDRIV(i32* %0, float* %1, i32* %2, i8* %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = alloca i32*
%14 = alloca float*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i32*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i32* %0, i32** %13
store float* %1, float** %14
store i32* %2, i32** %15
store i8* %3, i8** %16
store i32* %4, i32** %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
%25 = load i32*, i32** %13
%26 = load float*, float** %14
%27 = load i32*, i32** %15
%28 = load i8*, i8** %16
%29 = load i32*, i32** %17
%30 = load i32, i32* %18
%31 = load i32, i32* %22
%32 = call i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @xwdriv_ to i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...)*)(i32* %25, float* %26, i32* %27, i8* %28, i32* %29, i32 %30, i32 %31)
ret void
}

LLVM IR (-O2):
define void @XWDRIV(i32* %0, float* %1, i32* %2, i8* %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = tail call i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @xwdriv_ to i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...)*)(i32* %0, float* %1, i32* %2, i8* %3, i32* %4, i32 %5, i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, void *);
int /*<<< orphan*/ stderr;
void budd_panic_pointer(char *a, void *p) {
  fprintf(stderr, "error: %s: p.%p\n", a, p);
  exit(1);
}


x86 assembly (clang, -O0):
<budd_panic_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"error: %s: p.%p\0A\00"
define void @budd_panic_pointer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_2_2_2_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
unsigned char *base64_encode(unsigned char *, size_t *, unsigned char const *,
                             size_t);
unsigned char *encode_buffer_base64(unsigned char *out, size_t *out_len,
                                    const unsigned char *in, size_t in_len) {
  return base64_encode(out, out_len, in, in_len);
}


x86 assembly (clang, -O0):
<encode_buffer_base64>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <base64_encode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_buffer_base64>:
jmp    1030 <base64_encode@plt>

LLVM IR (-O0):
define i8* @encode_buffer_base64(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64*, i64** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i8* @base64_encode(i8* %9, i64* %10, i8* %11, i64 %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @encode_buffer_base64(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i8* @base64_encode(i8* %0, i64* %1, i8* %2, i64 %3)
ret i8* %5
}
/* Variables and functions */
scalar_t__ has_flag(char *, int);
int /*<<< orphan*/ mark_invoked(char *);
int dummy_get_abi_version(void) {
  mark_invoked("rapp_get_abi_version");
  if (has_flag("rapp_get_abi_version", 0x04)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<dummy_get_abi_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <mark_invoked@plt>
lea    0xec5(%rip),%rdi
mov    $0x4,%esi
call   1040 <has_flag@plt>
cmp    $0x0,%rax
je     115b <dummy_get_abi_version+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1162 <dummy_get_abi_version+0x42>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy_get_abi_version>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <mark_invoked@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <has_flag@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"rapp_get_abi_version\00"
define i32 @dummy_get_abi_version() {
%1 = alloca i32
%2 = call i32 @mark_invoked(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i64 @has_flag(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 0, i32* %1
br label %7
6: ; preds = %0
store i32 1, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [21 x i8] c"rapp_get_abi_version\00"
define i32 @dummy_get_abi_version() {
%1 = tail call i32 @mark_invoked(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @has_flag(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
long double __qprod(double, double);
long double intr_wrap_176(double p1, double p2) { return __qprod(p1, p2); }


x86 assembly (clang, -O0):
<intr_wrap_176>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__qprod@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_176>:
jmp    1030 <__qprod@plt>

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

LLVM IR (-O2):
define x86_fp80 @intr_wrap_176(double %0, double %1) {
%3 = tail call x86_fp80 @__qprod(double %0, double %1)
ret x86_fp80 %3
}
int isAMD() {
  unsigned int eax, ebx, ecx, edx;
  eax = 0x0;
  __asm__ volatile(".ifnc %%ebx,%3 ; movl  %%ebx,%3 ; .endif  \n\t"
                   "cpuid                                     \n\t"
                   ".ifnc %%ebx,%3 ; xchgl %%ebx,%3 ; .endif  \n\t"
                   : "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx)
                   : "a"(eax), "c"(ecx));
  if (ecx == 0x444d4163)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isAMD>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
cpuid
mov    %eax,-0x10(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ebx,-0x14(%rbp)
cmpl   $0x444d4163,-0x18(%rbp)
jne    1139 <isAMD+0x39>
movl   $0x1,-0xc(%rbp)
jmp    1140 <isAMD+0x40>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAMD>:
push   %rbx
xor    %eax,%eax
cpuid
xor    %eax,%eax
cmp    $0x444d4163,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isAMD() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %4
%8 = call { i32, i32, i32, i32 } asm sideeffect ".ifnc %ebx,$3 ; movl %ebx,$3 ; .endif \0A\09cpuid \0A\09.ifnc %ebx,$3 ; xchgl %ebx,$3 ; .endif \0A\09", "={ax},={cx},={dx},={bx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %6, i32 %7)
%9 = extractvalue { i32, i32, i32, i32 } %8, 0
%10 = extractvalue { i32, i32, i32, i32 } %8, 1
%11 = extractvalue { i32, i32, i32, i32 } %8, 2
%12 = extractvalue { i32, i32, i32, i32 } %8, 3
store i32 %9, i32* %2
store i32 %10, i32* %4
store i32 %11, i32* %5
store i32 %12, i32* %3
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 1145913699
br i1 %14, label %15, label %16
15: ; preds = %0
store i32 1, i32* %1
br label %17
16: ; preds = %0
store i32 0, i32* %1
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @isAMD() {
%1 = tail call { i32, i32, i32, i32 } asm sideeffect ".ifnc %ebx,$3 ; movl %ebx,$3 ; .endif \0A\09cpuid \0A\09.ifnc %ebx,$3 ; xchgl %ebx,$3 ; .endif \0A\09", "={ax},={cx},={dx},={bx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i32 0, i32 undef)
%2 = extractvalue { i32, i32, i32, i32 } %1, 1
%3 = icmp eq i32 %2, 1145913699
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_DFuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xDF << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_DFuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 223
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int back_height();
unsigned front_height(void) { return back_height(); }


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

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

LLVM IR (-O0):
define i32 @front_height() {
%1 = call i32 (...) @back_height()
ret i32 %1
}

LLVM IR (-O2):
define i32 @front_height() {
%1 = tail call i32 (...) @back_height()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void cleanup_char(char **x) { free(*x); }


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

x86 assembly (clang, -O2):
<cleanup_char>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cleanup_char(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
ret void
}
int days_in_month(int m, int is_leap) {
  if (m == 2)
    return 28 + is_leap;
  else
    return 30 + ((0xad5 >> (m - 1)) & 1);
}


x86 assembly (clang, -O0):
<days_in_month>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1122 <days_in_month+0x22>
mov    -0xc(%rbp),%eax
add    $0x1c,%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <days_in_month+0x38>
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0xad5,%eax
sar    %cl,%eax
and    $0x1,%eax
add    $0x1e,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<days_in_month>:
cmp    $0x2,%edi
jne    110b <days_in_month+0xb>
mov    %esi,%eax
add    $0x1c,%eax
ret
add    $0xff,%dil
mov    $0xad5,%eax
mov    %edi,%ecx
shr    %cl,%eax
and    $0x1,%eax
or     $0x1e,%eax
ret

LLVM IR (-O0):
define i32 @days_in_month(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 eq i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %5
%10 = add nsw i32 28, %9
store i32 %10, i32* %3
br label %17
11: ; preds = %2
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = ashr i32 2773, %13
%15 = and i32 %14, 1
%16 = add nsw i32 30, %15
store i32 %16, i32* %3
br label %17
17: ; preds = %11, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @days_in_month(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = add nsw i32 %1, 28
br label %11
6: ; preds = %2
%7 = add nsw i32 %0, -1
%8 = lshr i32 2773, %7
%9 = and i32 %8, 1
%10 = or i32 %9, 30
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ %5, %4 ], [ %10, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ getParLong(long *);
int /*<<< orphan*/ messErr(int);
void IF_showDev(void) {
  long n;
  if (!getParLong(&n))
    return;
  messErr(17);
}


x86 assembly (clang, -O0):
<IF_showDev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <getParLong@plt>
cmp    $0x0,%eax
jne    113f <IF_showDev+0x1f>
jmp    1149 <IF_showDev+0x29>
mov    $0x11,%edi
call   1030 <messErr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_showDev>:
push   %rax
mov    %rsp,%rdi
call   1040 <getParLong@plt>
test   %eax,%eax
je     1137 <IF_showDev+0x17>
mov    $0x11,%edi
call   1030 <messErr@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @IF_showDev() {
%1 = alloca i64
%2 = call i32 @getParLong(i64* %1)
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
br label %7
5: ; preds = %0
%6 = call i32 @messErr(i32 17)
br label %7
7: ; preds = %5, %4
ret void
}

LLVM IR (-O2):
define void @IF_showDev() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @getParLong(i64* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @messErr(i32 17)
br label %7
7: ; preds = %0, %5
ret void
}
int getBit(int value, int position) {
  return ((value & (1 << position)) >> position);
}


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

x86 assembly (clang, -O2):
<getBit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @getBit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = and i32 %5, %7
%9 = load i32, i32* %4
%10 = ashr i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @getBit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = and i32 %3, %0
%5 = ashr i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
scalar_t__ pthread_self();
void task2(int id) {
  printf("%d thread %d running Task 2\n", id, (int)pthread_self());
  int i;
  int sum = 0;
  for (i = 0; i < 100000; i++) {
    sum += i;
  }
}


x86 assembly (clang, -O0):
<task2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x186a0,-0x8(%rbp)
jge    117b <task2+0x5b>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <task2+0x37>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task2>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%d thread %d running Task 2\0A\00"
define void @task2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i64 (...) @pthread_self()
%7 = trunc i64 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
store i32 0, i32* %4
store i32 0, i32* %3
br label %9
9: ; preds = %16, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 100000
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %14, %13
store i32 %15, i32* %4
br label %16
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %9
19: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"%d thread %d running Task 2\0A\00"
define void @task2(i32 %0) {
%2 = tail call i64 (...) @pthread_self()
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %3)
ret void
}
void c_pomp_parallel_fork_(struct ompregdescr *r) { (void)0; }


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

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

LLVM IR (-O0):
%struct.ompregdescr = type opaque
define void @c_pomp_parallel_fork_(%struct.ompregdescr* %0) {
%2 = alloca %struct.ompregdescr*
store %struct.ompregdescr* %0, %struct.ompregdescr** %2
ret void
}

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_parallel_fork_(%struct.ompregdescr* nocapture %0) {
ret void
}
int f(void) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 1
}
/* Variables and functions */
scalar_t__ strtod(char const *, char **);
float strtof(const char *str, char **end) { return (float)strtod(str, end); }


x86 assembly (clang, -O0):
<strtof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtof>:
push   %rax
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @strtof(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call i64 @strtod(i8* %5, i8** %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @strtof(i8* %0, i8** nocapture %1) {
%3 = tail call i64 @strtod(i8* %0, i8** %1)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void basename_data_destructor(void *buffer) { free(buffer); }


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

LLVM IR (-O0):
define void @basename_data_destructor(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 @basename_data_destructor(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void closeTitle() { printf("%s\n", "</title>"); }


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

x86 assembly (clang, -O2):
<closeTitle>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"</title>\00"
define void @closeTitle() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"</title>\00"
define void @closeTitle() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long syscall1(int op, unsigned int arg1) {
  long ret;
  asm volatile("int $0xff"
               : "=a"(ret)
               : "0"(op), "d"(arg1)
               : "cc", "ebx", "edi", "esi", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<syscall1>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%edx
int    $0xff
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall1>:
push   %rbx
mov    %esi,%edx
mov    %edi,%eax
int    $0xff
pop    %rbx
ret

LLVM IR (-O0):
define i64 @syscall1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = load i32, i32* %4
%9 = call i64 asm sideeffect "int $$0xff", "={ax},0,{dx},~{cc},~{ebx},~{edi},~{esi},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %7, i32 %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
ret i64 %10
}

LLVM IR (-O2):
define i64 @syscall1(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = tail call i64 asm sideeffect "int $$0xff", "={ax},0,{dx},~{cc},~{ebx},~{edi},~{esi},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %3, i32 %1)
ret i64 %4
}
/* Variables and functions */
int rand();
int rand5() { return rand() % 5; }


x86 assembly (clang, -O0):
<rand5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand5>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rand5() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 5
ret i32 %2
}

LLVM IR (-O2):
define i32 @rand5() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 5
ret i32 %2
}
float cimagf(float _Complex z) { abort(); }


x86 assembly (clang, -O0):
<cimagf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movlpd %xmm0,-0x8(%rbp)
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<cimagf>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define float @cimagf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %3
unreachable
}

LLVM IR (-O2):
define float @cimagf(<2 x float> %0) {
tail call void @abort()
unreachable
}
int test_imm_87uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x87 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_87uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 579820584960
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}