xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 10;
  int b = 11;
  a = b - a;
  b = b - a;
  a = b + a;
  printf("a=%d, b=%d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xb,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeab(%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
mov    $0xb,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"a=%d, b=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11, i32 10)
ret i32 0
}
float conversion(f) { return (5.0 / 9.0) * (f - 32.0); }


x86 assembly (clang, -O0):
<conversion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xef4(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<conversion>:
cvtsi2sd %edi,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @conversion(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double 0x3FE1C71C71C71C72, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @conversion(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
void TRACE_ALLOC_INF(const char *const msg) {}


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

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

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

LLVM IR (-O2):
define void @TRACE_ALLOC_INF(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int /*<<< orphan*/ strcat(char *, char *);
void concat_char(char *str, const char *x, const char *sep) {
  char buf[256] = {0};
  sprintf(buf, "%s%s", sep, x);
  strcat(str, buf);
}


x86 assembly (clang, -O0):
<concat_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe90(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat_char>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rsi,%rcx
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xe5f(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcat@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define void @concat_char(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [256 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = bitcast [256 x i8]* %7 to i8*
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %6
%11 = load i8*, i8** %5
%12 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
%13 = load i8*, i8** %4
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%15 = call i32 @strcat(i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define void @concat_char(i8* %0, i8* %1, i8* %2) {
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %1)
%7 = call i32 @strcat(i8* %0, i8* %5)
ret void
}
char dontwarn6(long long x) {
  long long y = 42;
  y += x;
  return y == 42;
}


x86 assembly (clang, -O0):
<dontwarn6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x2a,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x2a,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dontwarn6>:
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define signext i8 @dontwarn6(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 42, i64* %3
%4 = load i64, i64* %2
%5 = load i64, i64* %3
%6 = add nsw i64 %5, %4
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp eq i64 %7, 42
%9 = zext i1 %8 to i32
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @dontwarn6(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = zext i1 %2 to i8
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ configurePrescaler(int);
void initTimer() {
  (*(unsigned int *)0x40048080) |= 1 << 7;
  (*(unsigned int *)0x4000C004) |= 1;
  (*(unsigned int *)0x4000C004) &= ~2;
  configurePrescaler(90);
}


x86 assembly (clang, -O0):
<initTimer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40048080,%eax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    $0x40048080,%eax
mov    %ecx,(%rax)
mov    $0x4000c004,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x4000c004,%eax
mov    %ecx,(%rax)
mov    $0x4000c004,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0x4000c004,%eax
mov    %ecx,(%rax)
mov    $0x5a,%edi
call   1030 <configurePrescaler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initTimer>:
orb    $0x80,0x40048080
80
mov    0x4000c004,%eax
and    $0xfffffffc,%eax
or     $0x1,%eax
mov    %eax,0x4000c004
mov    $0x5a,%edi
jmp    1030 <configurePrescaler@plt>

LLVM IR (-O0):
define void @initTimer() {
%1 = load i32, i32* inttoptr (i64 1074036864 to i32*)
%2 = or i32 %1, 128
store i32 %2, i32* inttoptr (i64 1074036864 to i32*)
%3 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%4 = or i32 %3, 1
store i32 %4, i32* inttoptr (i64 1073790980 to i32*)
%5 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%6 = and i32 %5, -3
store i32 %6, i32* inttoptr (i64 1073790980 to i32*)
%7 = call i32 @configurePrescaler(i32 90)
ret void
}

LLVM IR (-O2):
define void @initTimer() {
%1 = load i32, i32* inttoptr (i64 1074036864 to i32*)
%2 = or i32 %1, 128
store i32 %2, i32* inttoptr (i64 1074036864 to i32*)
%3 = load i32, i32* inttoptr (i64 1073790980 to i32*)
%4 = and i32 %3, -4
%5 = or i32 %4, 1
store i32 %5, i32* inttoptr (i64 1073790980 to i32*)
%6 = tail call i32 @configurePrescaler(i32 90)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_shell_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};
struct wl_output {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, int /*<<< orphan*/,
                                    int /*<<< orphan*/, struct wl_output *);
void wl_shell_surface_set_fullscreen(struct wl_shell_surface *wl_shell_surface,
                                     uint32_t method, uint32_t framerate,
                                     struct wl_output *output) {
  wl_proxy_marshal((struct wl_proxy *)wl_shell_surface, 5, method, framerate,
                   output);
}


x86 assembly (clang, -O0):
<wl_shell_surface_set_fullscreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0x5,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_shell_surface_set_fullscreen>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x5,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_shell_surface = type { i32 }
%struct.wl_output = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_fullscreen(%struct.wl_shell_surface* %0, i32 %1, i32 %2, %struct.wl_output* %3) {
%5 = alloca %struct.wl_shell_surface*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.wl_output*
store %struct.wl_shell_surface* %0, %struct.wl_shell_surface** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.wl_output* %3, %struct.wl_output** %8
%9 = load %struct.wl_shell_surface*, %struct.wl_shell_surface** %5
%10 = bitcast %struct.wl_shell_surface* %9 to %struct.wl_proxy*
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load %struct.wl_output*, %struct.wl_output** %8
%14 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %10, i32 5, i32 %11, i32 %12, %struct.wl_output* %13)
ret void
}

LLVM IR (-O2):
%struct.wl_shell_surface = type { i32 }
%struct.wl_output = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_fullscreen(%struct.wl_shell_surface* %0, i32 %1, i32 %2, %struct.wl_output* %3) {
%5 = bitcast %struct.wl_shell_surface* %0 to %struct.wl_proxy*
%6 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %5, i32 5, i32 %1, i32 %2, %struct.wl_output* %3)
ret void
}
__attribute__((visibility("default"))) void
razor_importer_destroy(struct razor_importer *importer) {}


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

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

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

LLVM IR (-O2):
%struct.razor_importer = type opaque
define void @razor_importer_destroy(%struct.razor_importer* nocapture %0) {
ret void
}
const char *db_drop_all_jes_view_sql(void) {
  static const char *query = "DROP VIEW all_jes";
  return query;
}


x86 assembly (clang, -O0):
<db_drop_all_jes_view_sql>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f15(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_drop_all_jes_view_sql>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@db_drop_all_jes_view_sql.query = internal global i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i32 0, i32 0)
@.str = [18 x i8] c"DROP VIEW all_jes\00"
define i8* @db_drop_all_jes_view_sql() {
%1 = load i8*, i8** @db_drop_all_jes_view_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"DROP VIEW all_jes\00"
define i8* @db_drop_all_jes_view_sql() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ test_failure(char *);
int /*<<< orphan*/ test_success(char *);
void test_finish(char *name, int status) {
  if (status) {
    test_failure(name);
  } else {
    test_success(name);
  }
}


x86 assembly (clang, -O0):
<test_finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1147 <test_finish+0x27>
mov    -0x8(%rbp),%rdi
call   1040 <test_failure@plt>
jmp    1150 <test_finish+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <test_success@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_finish>:
test   %esi,%esi
je     1129 <test_finish+0x9>
jmp    1040 <test_failure@plt>
jmp    1030 <test_success@plt>

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

LLVM IR (-O2):
define void @test_finish(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @test_failure(i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @test_success(i8* %0)
br label %8
8: ; preds = %6, %4
ret void
}
int test_imm_42uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x42 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_42uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 66
%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_42uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 283467841536
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr,
      "usage: ping [-LRdfnqrva] [-c count] [-i wait] [-l preload]\n\t[-p "
      "pattern] [-s packetsize] [-t ttl] [-I interface or IP address] host\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [133 x i8] c"usage: ping [-LRdfnqrva] [-c count] [-i wait] [-l preload]\0A\09[-p pattern] [-s packetsize] [-t ttl] [-I interface or IP address] host\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [133 x i8] c"usage: ping [-LRdfnqrva] [-c count] [-i wait] [-l preload]\0A\09[-p pattern] [-s packetsize] [-t ttl] [-I interface or IP address] host\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Type definitions */
struct virtual_item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reiserfs_warning(char *);
int errcatch_unit_num(struct virtual_item *vi) {
  reiserfs_warning("green-16010: Invalid item type observed, run fsck ASAP\n");
  return 0;
}


x86 assembly (clang, -O0):
<errcatch_unit_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <reiserfs_warning@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.virtual_item = type { i32 }
@.str = [56 x i8] c"green-16010: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_unit_num(%struct.virtual_item* %0) {
%2 = alloca %struct.virtual_item*
store %struct.virtual_item* %0, %struct.virtual_item** %2
%3 = call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.virtual_item = type { i32 }
@.str = [56 x i8] c"green-16010: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_unit_num(%struct.virtual_item* nocapture readnone %0) {
%2 = tail call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ calloc(int, int);
uint *vector_init(uint size) {
  uint *vector;
  if (size < 32)
    size = 32;
  if (!size)
    assert(!"helpful message");
  vector = (uint *)calloc(size >> 5, sizeof(uint));
  return vector;
}


x86 assembly (clang, -O0):
<vector_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    113c <vector_init+0x1c>
movl   $0x20,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114d <vector_init+0x2d>
xor    %edi,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
sar    $0x5,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_init>:
cmp    $0x21,%edi
mov    $0x20,%eax
cmovl  %eax,%edi
shr    $0x5,%edi
mov    $0x4,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"helpful message\00"
define i32* @vector_init(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 32
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 32, i32* %2
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = call i32 @assert(i32 0)
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
%14 = ashr i32 %13, 5
%15 = call i64 @calloc(i32 %14, i32 4)
%16 = inttoptr i64 %15 to i32*
store i32* %16, i32** %3
%17 = load i32*, i32** %3
ret i32* %17
}

LLVM IR (-O2):
define i32* @vector_init(i32 %0) {
%2 = icmp sgt i32 %0, 32
%3 = select i1 %2, i32 %0, i32 32
%4 = lshr i32 %3, 5
%5 = tail call i64 @calloc(i32 %4, i32 4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_putnchar_fd(char c, size_t n, int fd) {
  while (n-- > 0)
    write(fd, &c, 1);
}


x86 assembly (clang, -O0):
<ft_putnchar_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
jbe    1154 <ft_putnchar_fd+0x44>
mov    -0x14(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    1125 <ft_putnchar_fd+0x15>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnchar_fd>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %dil,0xf(%rsp)
test   %rsi,%rsi
je     1145 <ft_putnchar_fd+0x35>
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xf(%rsp),%r14
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <ft_putnchar_fd+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @ft_putnchar_fd(i8 signext %0, i64 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i64
%6 = alloca i32
store i8 %0, i8* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
br label %7
7: ; preds = %11, %3
%8 = load i64, i64* %5
%9 = add i64 %8, -1
store i64 %9, i64* %5
%10 = icmp ugt i64 %8, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %6
%13 = call i32 @write(i32 %12, i8* %4, i32 1)
br label %7
14: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @ft_putnchar_fd(i8 signext %0, i64 %1, i32 %2) {
%4 = alloca i8
store i8 %0, i8* %4
%5 = icmp eq i64 %1, 0
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %8, %6 ], [ %1, %3 ]
%8 = add i64 %7, -1
%9 = call i32 @write(i32 %2, i8* %4, i32 1)
%10 = icmp eq i64 %8, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void FanIntUnregister(unsigned long ulBase) {
  ;
  IntDisable(130);
  IntUnregister(130);
}


x86 assembly (clang, -O0):
<FanIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x82,%edi
call   1030 <IntDisable@plt>
mov    $0x82,%edi
call   1040 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FanIntUnregister>:
push   %rax
mov    $0x82,%edi
call   1030 <IntDisable@plt>
mov    $0x82,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @FanIntUnregister(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @IntDisable(i32 130)
%4 = call i32 @IntUnregister(i32 130)
ret void
}

LLVM IR (-O2):
define void @FanIntUnregister(i64 %0) {
%2 = tail call i32 @IntDisable(i32 130)
%3 = tail call i32 @IntUnregister(i32 130)
ret void
}
__float128 from_uns_long(unsigned long a) { return (__float128)a; }


x86 assembly (clang, -O0):
<from_uns_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1120 <__floatunditf>
add    $0x10,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<from_uns_long>:
push   %rax
call   1110 <__floatunditf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_uns_long(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = uitofp i64 %3 to fp128
ret fp128 %4
}

LLVM IR (-O2):
define fp128 @from_uns_long(i64 %0) {
%2 = uitofp i64 %0 to fp128
ret fp128 %2
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void md_ignore_signals(void) {
  signal(SIGQUIT, SIG_IGN);
  signal(SIGINT, SIG_IGN);
  signal(SIGHUP, SIG_IGN);
  signal(SIGTSTP, SIG_IGN);
}


x86 assembly (clang, -O0):
<md_ignore_signals>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
mov    0x2e5f(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_ignore_signals>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rbx
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGQUIT = global i32 0
@SIG_IGN = global i32 0
@SIGINT = global i32 0
@SIGHUP = global i32 0
@SIGTSTP = global i32 0
define void @md_ignore_signals() {
%1 = load i32, i32* @SIGQUIT
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGINT
%5 = load i32, i32* @SIG_IGN
%6 = call i32 @signal(i32 %4, i32 %5)
%7 = load i32, i32* @SIGHUP
%8 = load i32, i32* @SIG_IGN
%9 = call i32 @signal(i32 %7, i32 %8)
%10 = load i32, i32* @SIGTSTP
%11 = load i32, i32* @SIG_IGN
%12 = call i32 @signal(i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@SIGQUIT = global i32 0
@SIG_IGN = global i32 0
@SIGINT = global i32 0
@SIGHUP = global i32 0
@SIGTSTP = global i32 0
define void @md_ignore_signals() {
%1 = load i32, i32* @SIGQUIT
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGINT
%5 = load i32, i32* @SIG_IGN
%6 = tail call i32 @signal(i32 %4, i32 %5)
%7 = load i32, i32* @SIGHUP
%8 = load i32, i32* @SIG_IGN
%9 = tail call i32 @signal(i32 %7, i32 %8)
%10 = load i32, i32* @SIGTSTP
%11 = load i32, i32* @SIG_IGN
%12 = tail call i32 @signal(i32 %10, i32 %11)
ret void
}
void fa60(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        p013A:
          goto p013A;
          goto a;
        a:
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa60>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa60+0x4>

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

LLVM IR (-O0):
define void @fa60() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa60() {
br label %1
1: ; preds = %1, %0
br label %1
}
main() {
  static int i;
  return __builtin_constant_p(
      __builtin_constant_p(__builtin_types_compatible_p(int, __typeof(i))));
  __builtin_trap();
}


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

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

LLVM IR (-O0):
@main.i = internal global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
int test_imm_07int16_mem(short *val) {
  return ((*val) & (-0x07 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_07int16_mem>:
movzwl (%rdi),%eax
test   $0xfff9,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_07int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -7
%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_07int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -7
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int yyerror(const char *msg) {
  printf("Syntax error\n");
  exit(2);
  return 0;
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Syntax error\0A\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@str = [13 x i8] c"Syntax error\00"
define i32 @yyerror(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
void compiler_barrier(void *p) { (void)p; }


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

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

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

LLVM IR (-O2):
define void @compiler_barrier(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void put32lsb(uint8_t *dest, uint32_t value) {
  dest[0] = (uint8_t)(value);
  dest[1] = (uint8_t)(value >> 8);
  dest[2] = (uint8_t)(value >> 16);
  dest[3] = (uint8_t)(value >> 24);
}


x86 assembly (clang, -O0):
<put32lsb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put32lsb>:
movslq %esi,%rax
mov    %rax,(%rdi)
mov    %eax,%ecx
sar    $0x8,%ecx
movslq %ecx,%rcx
mov    %rcx,0x8(%rdi)
mov    %eax,%ecx
sar    $0x10,%ecx
movslq %ecx,%rcx
mov    %rcx,0x10(%rdi)
sar    $0x18,%eax
cltq
mov    %rax,0x18(%rdi)
ret

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

LLVM IR (-O2):
define void @put32lsb(i64* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
store i64 %3, i64* %0
%4 = ashr i32 %1, 8
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %5, i64* %6
%7 = ashr i32 %1, 16
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %8, i64* %9
%10 = ashr i32 %1, 24
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %11, i64* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void disp(char result[], int len) {
  for (int i = 0; i < len; i++)
    printf("%c", result[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<disp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <disp+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <disp+0x16>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <disp+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <disp+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @disp(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %14, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = tail call i32 @putchar(i32 %12)
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %5
br i1 %15, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ mav(int, int);
void drive_reverse() { mav(2, -750); }


x86 assembly (clang, -O0):
<drive_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0xfffffd12,%esi
call   1030 <mav@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drive_reverse>:
mov    $0x2,%edi
mov    $0xfffffd12,%esi
jmp    1030 <mav@plt>

LLVM IR (-O0):
define void @drive_reverse() {
%1 = call i32 @mav(i32 2, i32 -750)
ret void
}

LLVM IR (-O2):
define void @drive_reverse() {
%1 = tail call i32 @mav(i32 2, i32 -750)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_debug(char const *);
void wbTime_start(int timer_number, const char *message) {
  show_debug("wbTime_start:");
  show_debug(message);
}


x86 assembly (clang, -O0):
<wbTime_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <show_debug@plt>
mov    -0x10(%rbp),%rdi
call   1030 <show_debug@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wbTime_start>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <show_debug@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <show_debug@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"wbTime_start:\00"
define void @wbTime_start(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 @show_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %4
%7 = call i32 @show_debug(i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"wbTime_start:\00"
define void @wbTime_start(i32 %0, i8* %1) {
%3 = tail call i32 @show_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @show_debug(i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_epi64x(long long, long long);
__m128i test_mm_set_epi64x(long long A, long long B) {
  return _mm_set_epi64x(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_set_epi64x>:
jmp    1030 <_mm_set_epi64x@plt>

LLVM IR (-O0):
define i32 @test_mm_set_epi64x(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @_mm_set_epi64x(i64 %5, i64 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_set_epi64x(i64 %0, i64 %1) {
%3 = tail call i32 @_mm_set_epi64x(i64 %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void _io_wait_for_input(void) { pause(); }


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

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

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

LLVM IR (-O2):
define void @_io_wait_for_input() {
%1 = tail call i32 (...) @pause()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int /*<<< orphan*/ test5();
int /*<<< orphan*/ test6();
int /*<<< orphan*/ test7();
int /*<<< orphan*/ test8();
int main(int argc, char **argv) {
  test1();
  test2();
  test3();
  test4();
  test5();
  test6();
  test7();
  test8();
  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)
mov    $0x0,%al
call   1060 <test1@plt>
mov    $0x0,%al
call   1090 <test2@plt>
mov    $0x0,%al
call   1050 <test3@plt>
mov    $0x0,%al
call   1080 <test4@plt>
mov    $0x0,%al
call   1040 <test5@plt>
mov    $0x0,%al
call   1070 <test6@plt>
mov    $0x0,%al
call   1030 <test7@plt>
mov    $0x0,%al
call   10a0 <test8@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test1@plt>
xor    %eax,%eax
call   1090 <test2@plt>
xor    %eax,%eax
call   1050 <test3@plt>
xor    %eax,%eax
call   1080 <test4@plt>
xor    %eax,%eax
call   1040 <test5@plt>
xor    %eax,%eax
call   1070 <test6@plt>
xor    %eax,%eax
call   1030 <test7@plt>
xor    %eax,%eax
call   10a0 <test8@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test1()
%7 = call i32 (...) @test2()
%8 = call i32 (...) @test3()
%9 = call i32 (...) @test4()
%10 = call i32 (...) @test5()
%11 = call i32 (...) @test6()
%12 = call i32 (...) @test7()
%13 = call i32 (...) @test8()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 (...) @test2()
%5 = tail call i32 (...) @test3()
%6 = tail call i32 (...) @test4()
%7 = tail call i32 (...) @test5()
%8 = tail call i32 (...) @test6()
%9 = tail call i32 (...) @test7()
%10 = tail call i32 (...) @test8()
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(int);
void readNumber(char **markerp) {
  while (isdigit((int)**markerp))
    (*markerp)++;
}


x86 assembly (clang, -O0):
<readNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1148 <readNumber+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <readNumber+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readNumber>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isdigit@plt>
test   %rax,%rax
je     113a <readNumber+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <readNumber+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @readNumber(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = tail call i64 @isdigit(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %1, %7
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = tail call i64 @isdigit(i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %1
ret void
}
long _syscall0(long cnum) {
  register long ret __asm__("rax");
  register long r0 __asm__("rax") = cnum;
  __asm__ __volatile__("syscall"
                       : "=r"(ret)
                       : "r"(r0)
                       : "rcx", "r11", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<_syscall0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
syscall
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall0>:
mov    %rdi,%rax
syscall
ret

LLVM IR (-O0):
define i64 @_syscall0(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
store i64 %5, i64* %4
%6 = load i64, i64* %4
%7 = call i64 asm sideeffect "syscall", "={rax},{rax},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %6)
store i64 %7, i64* %3
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
define i64 @_syscall0(i64 %0) {
%2 = tail call i64 asm sideeffect "syscall", "={rax},{rax},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
void subroutine2SUBROUTINE_RELATIVE() {}


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

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

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

LLVM IR (-O2):
define void @subroutine2SUBROUTINE_RELATIVE() {
ret void
}
extern void be32enc(void *buf, unsigned long u) {
  unsigned char *p = (unsigned char *)buf;
  p[0] = (u >> 24) & 0xff;
  p[1] = (u >> 16) & 0xff;
  p[2] = (u >> 8) & 0xff;
  p[3] = u & 0xff;
}


x86 assembly (clang, -O0):
<be32enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32enc>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @be32enc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i64, i64* %4
%8 = lshr i64 %7, 24
%9 = and i64 %8, 255
%10 = trunc i64 %9 to i8
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i64, i64* %4
%14 = lshr i64 %13, 16
%15 = and i64 %14, 255
%16 = trunc i64 %15 to i8
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
%19 = load i64, i64* %4
%20 = lshr i64 %19, 8
%21 = and i64 %20, 255
%22 = trunc i64 %21 to i8
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 2
store i8 %22, i8* %24
%25 = load i64, i64* %4
%26 = and i64 %25, 255
%27 = trunc i64 %26 to i8
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 3
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @be32enc(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
store i8 %4, i8* %0
%5 = lshr i64 %1, 16
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i64 %1, 8
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i64 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
void EC_GROUP_get_curve_GFp(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_GROUP_get_curve_GFp() {
ret void
}
char is_space_char(char c) {
  if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_space_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x20,%eax
je     113e <is_space_char+0x3e>
movsbl -0x2(%rbp),%eax
cmp    $0x9,%eax
je     113e <is_space_char+0x3e>
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
je     113e <is_space_char+0x3e>
movsbl -0x2(%rbp),%eax
cmp    $0xd,%eax
jne    1147 <is_space_char+0x47>
movb   $0x1,-0x1(%rbp)
jmp    114b <is_space_char+0x4b>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space_char>:
cmp    $0x20,%dil
ja     111d <is_space_char+0x1d>
mov    $0x1,%al
movzbl %dil,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111d <is_space_char+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @is_space_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 10
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 13
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i8 1, i8* %2
br label %21
20: ; preds = %15
store i8 0, i8* %2
br label %21
21: ; preds = %20, %19
%22 = load i8, i8* %2
ret i8 %22
}

LLVM IR (-O2):
define signext i8 @is_space_char(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 13, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i8 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i8 %4
}