xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void fatal(char *s) {
  write(2, "curses: ", 8);
  write(2, s, strlen(s));
  write(2, "\n", 1);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2,%edi
lea    0xeb8(%rip),%rsi
mov    $0x8,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xe8a(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
mov    $0x2,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xea1(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"curses: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @fatal(i8* %0) {
%2 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 2, i8* %0, i32 %3)
%5 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 @exit(i32 1)
unreachable
}
void fts_setsleep(int on) { return; }


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

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

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

LLVM IR (-O2):
define void @fts_setsleep(i32 %0) {
ret void
}
int getTimeScore(int timeInMinutes) {
  if (timeInMinutes >= 60)
    return 0;
  else
    return (60 - timeInMinutes) * 50;
}


x86 assembly (clang, -O0):
<getTimeScore>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x3c,-0x8(%rbp)
jl     111d <getTimeScore+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    112b <getTimeScore+0x2b>
mov    $0x3c,%eax
sub    -0x8(%rbp),%eax
imul   $0x32,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimeScore>:
lea    -0x3c(%rdi),%eax
neg    %eax
imul   $0x32,%eax,%ecx
xor    %eax,%eax
cmp    $0x3c,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getTimeScore(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 60
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 60, %8
%10 = mul nsw i32 %9, 50
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @getTimeScore(i32 %0) {
%2 = icmp sgt i32 %0, 59
%3 = sub nsw i32 60, %0
%4 = mul nsw i32 %3, 50
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
int test_imm_B2int16_reg(short val) {
  return ((val) & (0xB2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B2int16_reg(i16 signext %0) {
%2 = and i16 %0, 178
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int HelpItem81(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem81() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_fsharp_comments() {
  test_parser_verify_parse(test_parser_sourcefile("fsharp", " //comment"),
                           "fsharp", "", "//comment", 0);
}


x86 assembly (clang, -O0):
<test_fsharp_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fsharp_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec8(%rip),%rdx
lea    0xec3(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fsharp\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_fsharp_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fsharp\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_fsharp_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
int xmlUCSIsRunic(int code) { return (((code >= 0x16A0) && (code <= 0x16FF))); }


x86 assembly (clang, -O0):
<xmlUCSIsRunic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x16a0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsRunic+0x26>
cmpl   $0x16ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsRunic>:
add    $0xffffe960,%edi
xor    %eax,%eax
cmp    $0x60,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsRunic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 5792
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5887
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsRunic(i32 %0) {
%2 = add i32 %0, -5792
%3 = icmp ult i32 %2, 96
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct Circle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ advance(struct Circle *);
int /*<<< orphan*/ insert(struct Circle *, char);
void append(struct Circle *c, char ch) {
  advance(c);
  insert(c, ch);
}


x86 assembly (clang, -O0):
<append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <advance@plt>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <advance@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <insert@plt>

LLVM IR (-O0):
%struct.Circle = type { i32 }
define void @append(%struct.Circle* %0, i8 signext %1) {
%3 = alloca %struct.Circle*
%4 = alloca i8
store %struct.Circle* %0, %struct.Circle** %3
store i8 %1, i8* %4
%5 = load %struct.Circle*, %struct.Circle** %3
%6 = call i32 @advance(%struct.Circle* %5)
%7 = load %struct.Circle*, %struct.Circle** %3
%8 = load i8, i8* %4
%9 = call i32 @insert(%struct.Circle* %7, i8 signext %8)
ret void
}

LLVM IR (-O2):
%struct.Circle = type { i32 }
define void @append(%struct.Circle* %0, i8 signext %1) {
%3 = tail call i32 @advance(%struct.Circle* %0)
%4 = tail call i32 @insert(%struct.Circle* %0, i8 signext %1)
ret void
}
void gdk_crossing_mode_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_crossing_mode_get_type() {
ret void
}
/* Type definitions */
typedef float GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_FALSE;
int /*<<< orphan*/ GL_FLOAT;
int /*<<< orphan*/ glEnableVertexAttribArray(int /*<<< orphan*/);
int /*<<< orphan*/ glVertexAttribPointer(int /*<<< orphan*/, int,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, float *);
void glfxPlaceVertices(void) {
  static GLfloat vertices[] = {-1.0f, -1.0f, 0.5f, -1.0f, +1.0f, 0.5f,
                               +1.0f, -1.0f, 0.5f, +1.0f, +1.0f, 0.5f};
  glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vertices);
  glEnableVertexAttribArray(0);
}


x86 assembly (clang, -O0):
<glfxPlaceVertices>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
mov    0x2eb4(%rip),%rax
mov    (%rax),%ecx
xor    %r8d,%r8d
mov    $0x3,%esi
lea    0x2efb(%rip),%r9
mov    %r8d,%edi
call   1030 <glVertexAttribPointer@plt>
xor    %edi,%edi
call   1040 <glEnableVertexAttribArray@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glfxPlaceVertices>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
mov    0x2eb7(%rip),%rax
mov    (%rax),%ecx
lea    0x2f06(%rip),%r9
xor    %edi,%edi
mov    $0x3,%esi
xor    %r8d,%r8d
call   1030 <glVertexAttribPointer@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <glEnableVertexAttribArray@plt>

LLVM IR (-O0):
@glfxPlaceVertices.vertices = internal global [12 x float] [float -1.000000e+00, float -1.000000e+00, float 5.000000e-01, float -1.000000e+00, float 1.000000e+00, float 5.000000e-01, float 1.000000e+00, float -1.000000e+00, float 5.000000e-01, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01]
@GL_FLOAT = global i32 0
@GL_FALSE = global i32 0
define void @glfxPlaceVertices() {
%1 = load i32, i32* @GL_FLOAT
%2 = load i32, i32* @GL_FALSE
%3 = call i32 @glVertexAttribPointer(i32 0, i32 3, i32 %1, i32 %2, i32 0, float* getelementptr inbounds ([12 x float], [12 x float]* @glfxPlaceVertices.vertices, i64 0, i64 0))
%4 = call i32 @glEnableVertexAttribArray(i32 0)
ret void
}

LLVM IR (-O2):
@glfxPlaceVertices.vertices = internal global [12 x float] [float -1.000000e+00, float -1.000000e+00, float 5.000000e-01, float -1.000000e+00, float 1.000000e+00, float 5.000000e-01, float 1.000000e+00, float -1.000000e+00, float 5.000000e-01, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01]
@GL_FLOAT = global i32 0
@GL_FALSE = global i32 0
define void @glfxPlaceVertices() {
%1 = load i32, i32* @GL_FLOAT
%2 = load i32, i32* @GL_FALSE
%3 = tail call i32 @glVertexAttribPointer(i32 0, i32 3, i32 %1, i32 %2, i32 0, float* getelementptr inbounds ([12 x float], [12 x float]* @glfxPlaceVertices.vertices, i64 0, i64 0))
%4 = tail call i32 @glEnableVertexAttribArray(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Welcome\nto\nC!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Welcome\0Ato\0AC!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Welcome\0Ato\0AC!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void llz_write_u16(int in, FILE *fp) {
  unsigned char temp[2];
  temp[0] = in & 0xff;
  temp[1] = in >> 8;
  fwrite(temp, sizeof(*temp), 2, fp);
}


x86 assembly (clang, -O0):
<llz_write_u16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x12(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0x11(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llz_write_u16>:
push   %rax
mov    %rsi,%rcx
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @llz_write_u16(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [2 x i8]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %12, i8* %13
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%15 = load i32*, i32** %4
%16 = call i32 @fwrite(i8* %14, i32 1, i32 2, i32* %15)
ret void
}

LLVM IR (-O2):
define void @llz_write_u16(i32 %0, i32* nocapture %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %0 to i8
store i8 %5, i8* %4
%6 = lshr i32 %0, 8
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 1, i32 2, i32* %1)
ret void
}
int f(char *arg, char **strings) { return 12; }


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

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

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

LLVM IR (-O2):
define i32 @f(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 12
}
void BN_is_prime_fasttest_ex(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_is_prime_fasttest_ex() {
ret void
}
/* Variables and functions */
int PAPI_list_events(int, int *, int *);
void papif_list_events_(int *EventSet, int *Events, int *number, int *check) {
  *check = PAPI_list_events(*EventSet, Events, number);
}


x86 assembly (clang, -O0):
<papif_list_events_>:
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),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <PAPI_list_events@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_list_events_>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_list_events@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_list_events_(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = call i32 @PAPI_list_events(i32 %10, i32* %11, i32* %12)
%14 = load i32*, i32** %8
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @papif_list_events_(i32* nocapture %0, i32* %1, i32* %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @PAPI_list_events(i32 %5, i32* %1, i32* %2)
store i32 %6, i32* %3
ret void
}
void QRcode_clearCache(void) { return; }


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

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

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

LLVM IR (-O2):
define void @QRcode_clearCache() {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int connect(int sockfd, const struct sockaddr *addr, unsigned int addrlen) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<connect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<connect>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @connect(i32 %0, %struct.sockaddr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @connect(i32 %0, %struct.sockaddr* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m36_setParams41X0(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ m36_setParams42XX(int /*<<< orphan*/, int /*<<< orphan*/);
void m36_setParams41X0_42XX(uint16_t addr, uint8_t val) {
  m36_setParams41X0(addr, val);
  m36_setParams42XX(addr, val);
}


x86 assembly (clang, -O0):
<m36_setParams41X0_42XX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <m36_setParams41X0@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <m36_setParams42XX@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m36_setParams41X0_42XX>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <m36_setParams41X0@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <m36_setParams42XX@plt>

LLVM IR (-O0):
define void @m36_setParams41X0_42XX(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 @m36_setParams41X0(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @m36_setParams42XX(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @m36_setParams41X0_42XX(i32 %0, i32 %1) {
%3 = tail call i32 @m36_setParams41X0(i32 %0, i32 %1)
%4 = tail call i32 @m36_setParams42XX(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hola a todos\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hola a todos\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test2() { printf("Test 2: Unreached objects are collected.\n"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"Test 2: Unreached objects are collected.\0A\00"
define void @test2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"Test 2: Unreached objects are collected.\00"
define void @test2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_AEint8_mem(signed char *val) {
  return ((*val) & (0xAE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_AEint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 174
%7 = icmp ne i32 %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_AEint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -82
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void __attribute__((regparm(2)))
Def_WRITEL(unsigned long adr, unsigned long data) {}


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

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

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

LLVM IR (-O2):
define void @Def_WRITEL(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int can_arrive(int /*<<< orphan*/, int /*<<< orphan*/);
int can_arrive_2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", can_arrive(0, 0));
  printf("%d\n", can_arrive_2(0, 0));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <can_arrive@plt>
lea    0xebf(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <can_arrive_2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @can_arrive(i32 0, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @can_arrive_2(i32 0, i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int wtypeInt_compare(const void *e1, const void *e2) {
  return (long)e1 - (long)e2;
}


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

x86 assembly (clang, -O2):
<wtypeInt_compare>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @wtypeInt_compare(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @wtypeInt_compare(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ems1Stok(char const *, char *);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
void emsSetu(const char *token, unsigned int ivalue) {
  char str[200 + 1];
  ;
  ;
  sprintf(str, "%u", ivalue);
  ems1Stok(token, str);
  return;
}


x86 assembly (clang, -O0):
<emsSetu>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebd(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <ems1Stok@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emsSetu>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xeca(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ems1Stok@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define void @emsSetu(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [201 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [201 x i8], [201 x i8]* %5, i64 0, i64 0
%11 = call i32 @ems1Stok(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @emsSetu(i8* %0, i32 %1) {
%3 = alloca [201 x i8]
%4 = getelementptr inbounds [201 x i8], [201 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @ems1Stok(i8* %0, i8* %4)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int create_dobldobl_Laurent_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(793, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<create_dobldobl_Laurent_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x319,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_dobldobl_Laurent_homotopy>:
mov    $0x319,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @create_dobldobl_Laurent_homotopy() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 793, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @create_dobldobl_Laurent_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 793, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int accept(double a, double b, double precision) {
  double error = a - b;
  if (error < 0)
    error = -error;
  return error < precision;
}


x86 assembly (clang, -O0):
<accept>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1151 <accept+0x51>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept>:
subsd  %xmm1,%xmm0
movapd 0xef4(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm4
cmpltsd %xmm3,%xmm4
andpd  %xmm4,%xmm1
andnpd %xmm0,%xmm4
orpd   %xmm1,%xmm4
xor    %eax,%eax
ucomisd %xmm4,%xmm2
seta   %al
ret

LLVM IR (-O0):
define i32 @accept(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = fsub double %8, %9
store double %10, double* %7
%11 = load double, double* %7
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load double, double* %7
%15 = fneg double %14
store double %15, double* %7
br label %16
16: ; preds = %13, %3
%17 = load double, double* %7
%18 = load double, double* %6
%19 = fcmp olt double %17, %18
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @accept(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fcmp olt double %4, 0.000000e+00
%6 = fneg double %4
%7 = select i1 %5, double %6, double %4
%8 = fcmp olt double %7, %2
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
struct page {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct page *);
void put_page(struct page *page) {
  free(page);
  return;
}


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

LLVM IR (-O0):
%struct.page = type { i32 }
define void @put_page(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
%3 = load %struct.page*, %struct.page** %2
%4 = call i32 @free(%struct.page* %3)
ret void
}

LLVM IR (-O2):
%struct.page = type { i32 }
define void @put_page(%struct.page* nocapture %0) {
%2 = tail call i32 @free(%struct.page* %0)
ret void
}
double myUlongToDouble(unsigned long ul) {
  double val;
  if (ul & ((unsigned long)0x80000000L))
    val = ((double)2147483648.0) + (ul & (~((unsigned long)0x80000000L)));
  else
    val = ul;
  return val;
}


x86 assembly (clang, -O0):
<myUlongToDouble>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x80000000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     116e <myUlongToDouble+0x6e>
mov    -0x8(%rbp),%rax
movabs $0xffffffff7fffffff,%rcx
ff ff ff
and    %rcx,%rax
movq   %rax,%xmm1
movaps 0xec3(%rip),%xmm0
punpckldq %xmm0,%xmm1
movapd 0xec7(%rip),%xmm0
subpd  %xmm0,%xmm1
movaps %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xec0(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    119a <myUlongToDouble+0x9a>
movaps 0xe8b(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xe8a(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<myUlongToDouble>:
mov    %edi,%eax
and    $0x80000000,%eax
movdqa 0xef1(%rip),%xmm1
movapd 0xef9(%rip),%xmm0
test   %rax,%rax
je     114b <myUlongToDouble+0x4b>
movabs $0xffffffff7fffffff,%rax
ff ff ff
and    %rax,%rdi
movq   %rdi,%xmm2
punpckldq %xmm1,%xmm2
subpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
addsd  %xmm2,%xmm0
addsd  0xed6(%rip),%xmm0
ret
movq   %rdi,%xmm2
punpckldq %xmm1,%xmm2
subpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @myUlongToDouble(i64 %0) {
%2 = alloca i64
%3 = alloca double
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, 2147483648
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i64, i64* %2
%9 = and i64 %8, -2147483649
%10 = uitofp i64 %9 to double
%11 = fadd double 0x41E0000000000000, %10
store double %11, double* %3
br label %15
12: ; preds = %1
%13 = load i64, i64* %2
%14 = uitofp i64 %13 to double
store double %14, double* %3
br label %15
15: ; preds = %12, %7
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @myUlongToDouble(i64 %0) {
%2 = and i64 %0, 2147483648
%3 = icmp eq i64 %2, 0
%4 = and i64 %0, -2147483649
%5 = uitofp i64 %4 to double
%6 = fadd double %5, 0x41E0000000000000
%7 = uitofp i64 %0 to double
%8 = select i1 %3, double %7, double %6
ret double %8
}
int test_imm_EEuint8_mem(unsigned char *val) {
  return ((*val) & (0xEE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_EEuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 238
%7 = icmp ne i32 %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_EEuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -18
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void PrintSomeData() {}


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

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

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

LLVM IR (-O2):
define void @PrintSomeData() {
ret void
}
__int128 sub(__int128 a, __int128 b) { return a - b; }


x86 assembly (clang, -O0):
<sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdx,%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rsi
mov    %rax,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%rax
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
sub    %rsi,%rcx
sbb    %rdx,%rax
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub>:
mov    %rdi,%rax
sub    %rdx,%rax
sbb    $0x0,%rsi
sub    %rcx,%rsi
mov    %rsi,%rdx
ret

LLVM IR (-O0):
define { i64, i64 } @sub(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = alloca i128
%9 = alloca i128
%10 = bitcast i128* %6 to { i64, i64 }*
%11 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %10, i32 0, i32 0
store i64 %0, i64* %11
%12 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %10, i32 0, i32 1
store i64 %1, i64* %12
%13 = load i128, i128* %6
%14 = bitcast i128* %7 to { i64, i64 }*
%15 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %14, i32 0, i32 0
store i64 %2, i64* %15
%16 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %14, i32 0, i32 1
store i64 %3, i64* %16
%17 = load i128, i128* %7
store i128 %13, i128* %8
store i128 %17, i128* %9
%18 = load i128, i128* %8
%19 = load i128, i128* %9
%20 = sub nsw i128 %18, %19
store i128 %20, i128* %5
%21 = bitcast i128* %5 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @sub(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = zext i64 %1 to i128
%6 = shl nuw i128 %5, 64
%7 = zext i64 %0 to i128
%8 = zext i64 %3 to i128
%9 = mul i128 %8, -18446744073709551616
%10 = zext i64 %2 to i128
%11 = or i128 %6, %7
%12 = sub i128 %11, %10
%13 = add i128 %12, %9
%14 = trunc i128 %13 to i64
%15 = lshr i128 %13, 64
%16 = trunc i128 %15 to i64
%17 = insertvalue { i64, i64 } poison, i64 %14, 0
%18 = insertvalue { i64, i64 } %17, i64 %16, 1
ret { i64, i64 } %18
}
/* Variables and functions */
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ prop_request_change(int, int *, int);
void SW1(int v, int wait) {
  prop_request_change(0x80020015, &v, 2);
  msleep(wait);
}


x86 assembly (clang, -O0):
<SW1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x80020015,%edi
lea    -0x4(%rbp),%rsi
mov    $0x2,%edx
call   1040 <prop_request_change@plt>
mov    -0x8(%rbp),%edi
call   1030 <msleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SW1>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x80020015,%edi
mov    $0x2,%edx
call   1040 <prop_request_change@plt>
mov    %ebx,%edi
call   1030 <msleep@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @SW1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @prop_request_change(i32 -2147352555, i32* %3, i32 2)
%6 = load i32, i32* %4
%7 = call i32 @msleep(i32 %6)
ret void
}

LLVM IR (-O2):
define void @SW1(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @prop_request_change(i32 -2147352555, i32* %3, i32 2)
%5 = call i32 @msleep(i32 %1)
ret void
}
void RVDRIV(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;
{
  rvdriv_(ifunc, rbuf, nbuf, chr, lchr, mode, w_chr);
  return;
}


x86 assembly (clang, -O0):
<RVDRIV>:
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 <rvdriv_@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @RVDRIV(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 (...)* @rvdriv_ 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 @RVDRIV(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 (...)* @rvdriv_ 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*/ printf(char *);
int pa_socket_server_new_ipv6_string() {
  printf("NOT IMPLEMENTED:"
         "pa_socket_server_new_ipv6_string"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [49 x i8] c"NOT IMPLEMENTED:pa_socket_server_new_ipv6_string\00"
define i32 @pa_socket_server_new_ipv6_string() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ rand();
uint16_t rand_range(uint16_t min, uint32_t max) {
  if (min >= max) {
    return min;
  }
  return (rand() % (max - min) + min);
}


x86 assembly (clang, -O0):
<rand_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     113b <rand_range+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <rand_range+0x47>
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cqto
idiv   %rcx
add    -0x10(%rbp),%rdx
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_range>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
sub    %rdi,%rbx
jle    1140 <rand_range+0x30>
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     1139 <rand_range+0x29>
cqto
idiv   %rbx
jmp    113d <rand_range+0x2d>
xor    %edx,%edx
div    %ebx
add    %rdx,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @rand_range(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp sge i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %19
11: ; preds = %2
%12 = call i64 (...) @rand()
%13 = load i64, i64* %5
%14 = load i64, i64* %4
%15 = sub nsw i64 %13, %14
%16 = srem i64 %12, %15
%17 = load i64, i64* %4
%18 = add nsw i64 %16, %17
store i64 %18, i64* %3
br label %19
19: ; preds = %11, %9
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @rand_range(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, %0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = tail call i64 (...) @rand()
%6 = sub nsw i64 %1, %0
%7 = srem i64 %5, %6
%8 = add nsw i64 %7, %0
br label %9
9: ; preds = %2, %4
%10 = phi i64 [ %8, %4 ], [ %0, %2 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
int /*<<< orphan*/ VelocityStateHandle();
void VelocityStateUpdated() { UAVObjUpdated(VelocityStateHandle()); }


x86 assembly (clang, -O0):
<VelocityStateUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <VelocityStateHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VelocityStateUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <VelocityStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @VelocityStateUpdated() {
%1 = call i32 (...) @VelocityStateHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @VelocityStateUpdated() {
%1 = tail call i32 (...) @VelocityStateHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free_list();
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ write_to_file();
void terminate(const char *message, int status) {
  printf("%s\n", message);
  write_to_file();
  free_list();
  exit(status);
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <write_to_file@plt>
mov    $0x0,%al
call   1050 <free_list@plt>
mov    -0xc(%rbp),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<terminate>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <write_to_file@plt>
xor    %eax,%eax
call   1050 <free_list@plt>
mov    %ebx,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @terminate(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (...) @write_to_file()
%8 = call i32 (...) @free_list()
%9 = load i32, i32* %4
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @terminate(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @write_to_file()
%5 = tail call i32 (...) @free_list()
%6 = tail call i32 @exit(i32 %1)
unreachable
}