xunge/DecIR huggingface dataset:
/* Type definitions */
struct client_attr {
  int dummy;
};

/* Variables and functions */
int depth_resolve_path(struct client_attr *, char *);
int /*<<< orphan*/ resolve_path(struct client_attr *, char *);
int getpath(struct client_attr *attr, char *path) {
  resolve_path(attr, path);
  if (depth_resolve_path(attr, path) == -1)
    return -1;
  ;
  return 0;
}


x86 assembly (clang, -O0):
<getpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <resolve_path@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <depth_resolve_path@plt>
cmp    $0xffffffff,%eax
jne    115f <getpath+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <getpath+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpath>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <resolve_path@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <depth_resolve_path@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.client_attr = type { i32 }
define i32 @getpath(%struct.client_attr* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.client_attr*
%5 = alloca i8*
store %struct.client_attr* %0, %struct.client_attr** %4
store i8* %1, i8** %5
%6 = load %struct.client_attr*, %struct.client_attr** %4
%7 = load i8*, i8** %5
%8 = call i32 @resolve_path(%struct.client_attr* %6, i8* %7)
%9 = load %struct.client_attr*, %struct.client_attr** %4
%10 = load i8*, i8** %5
%11 = call i32 @depth_resolve_path(%struct.client_attr* %9, i8* %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.client_attr = type { i32 }
define i32 @getpath(%struct.client_attr* %0, i8* %1) {
%3 = tail call i32 @resolve_path(%struct.client_attr* %0, i8* %1)
%4 = tail call i32 @depth_resolve_path(%struct.client_attr* %0, i8* %1)
%5 = icmp eq i32 %4, -1
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
extern void htThreadYield(void) { (void)sched_yield(); }


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

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

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

LLVM IR (-O2):
define void @htThreadYield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FS_Mount(void *, char const *);
void devo_finit(void *FAT, const char *drive) {
  if (!((char *)FAT)[0])
    FS_Mount(FAT, drive);
}


x86 assembly (clang, -O0):
<devo_finit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113a <devo_finit+0x2a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <FS_Mount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<devo_finit>:
cmpb   $0x0,(%rdi)
je     1116 <devo_finit+0x6>
ret
jmp    1030 <FS_Mount@plt>

LLVM IR (-O0):
define void @devo_finit(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @FS_Mount(i8* %10, i8* %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @devo_finit(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @FS_Mount(i8* %0, i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int is_any_bit_equals_1(int);
int is_any_bit_of_last_byte_equals_1(int x) {
  int offset = (sizeof(int) - 1) << 3;
  return is_any_bit_equals_1(x << offset);
}


x86 assembly (clang, -O0):
<is_any_bit_of_last_byte_equals_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x18,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%ecx
shl    %cl,%edi
call   1030 <is_any_bit_equals_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_any_bit_of_last_byte_equals_1>:
shl    $0x18,%edi
jmp    1030 <is_any_bit_equals_1@plt>

LLVM IR (-O0):
define i32 @is_any_bit_of_last_byte_equals_1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 24, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = shl i32 %4, %5
%7 = call i32 @is_any_bit_equals_1(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_any_bit_of_last_byte_equals_1(i32 %0) {
%2 = shl i32 %0, 24
%3 = tail call i32 @is_any_bit_equals_1(i32 %2)
ret i32 %3
}
void *MQTTPacket_header_only(unsigned char aHeader, char *data, int datalen) {
  static unsigned char header = 0;
  header = aHeader;
  return &header;
}


x86 assembly (clang, -O0):
<MQTTPacket_header_only>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x1(%rbp),%al
mov    %al,0x2f07(%rip)
lea    0x2f00(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MQTTPacket_header_only>:
mov    %dil,0x2f1a(%rip)
lea    0x2f13(%rip),%rax
ret

LLVM IR (-O0):
@MQTTPacket_header_only.header = internal global i8 0
define i8* @MQTTPacket_header_only(i8 zeroext %0, i8* %1, i32 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
store i8 %0, i8* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
store i8 %7, i8* @MQTTPacket_header_only.header
ret i8* @MQTTPacket_header_only.header
}

LLVM IR (-O2):
@MQTTPacket_header_only.header = internal global i8 0
define i8* @MQTTPacket_header_only(i8 zeroext %0, i8* nocapture readnone %1, i32 %2) {
store i8 %0, i8* @MQTTPacket_header_only.header
ret i8* @MQTTPacket_header_only.header
}
/* Variables and functions */
int ft_eight_queens_puzzle();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("Your programe says that there are %i combinations.\n",
         ft_eight_queens_puzzle());
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <ft_eight_queens_puzzle@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Your programe says that there are %i combinations.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ft_eight_queens_puzzle()
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"Your programe says that there are %i combinations.\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @ft_eight_queens_puzzle()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Unix_CloseParallel();
int /*<<< orphan*/ Unix_CloseSerial();
void SerparClose(void) {
  Unix_CloseParallel();
  Unix_CloseSerial();
}


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

x86 assembly (clang, -O2):
<SerparClose>:
push   %rax
xor    %eax,%eax
call   1040 <Unix_CloseParallel@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Unix_CloseSerial@plt>

LLVM IR (-O0):
define void @SerparClose() {
%1 = call i32 (...) @Unix_CloseParallel()
%2 = call i32 (...) @Unix_CloseSerial()
ret void
}

LLVM IR (-O2):
define void @SerparClose() {
%1 = tail call i32 (...) @Unix_CloseParallel()
%2 = tail call i32 (...) @Unix_CloseSerial()
ret void
}
RX0I1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[x0]) = 33; }


x86 assembly (clang, -O0):
<RX0I1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  0xebf(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0I1>:
movslq %edi,%rax
movl   $0x42040000,(%rdx,%rax,4)
ret

LLVM IR (-O0):
define i32 @RX0I1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %12
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
store float 3.300000e+01, float* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @RX0I1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds float, float* %4, i64 %7
store float 3.300000e+01, float* %8
ret i32 undef
}
int test_imm_FEint64_lowword_reg(long long val) {
  return ((val) & (0xFE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_FEint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 254
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ permute(char *, int /*<<< orphan*/, int);
int main() {
  char a[] = "ABC";
  permute(a, 0, 2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x434241,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <permute@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [4 x i8] c"ABC\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
store i32 0, i32* %1
%3 = bitcast [4 x i8]* %2 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = call i32 @permute(i8* %4, i32 0, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 4407873, i32* %1
%3 = call i32 @permute(i8* %2, i32 0, i32 2)
ret i32 0
}
const char *ccnxNotifyAPIAbout_LongNotice(void) {
  return "Copyright (c) 2017 Cisco and/or its affiliates.\nLicensed under the "
         "Apache License, Version 2.0 (the \"License\");\nyou may not use this "
         "file except in compliance with the License.\nYou may obtain a copy "
         "of the License at:\n\n    "
         "http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by "
         "applicable law or agreed to in writing, software\ndistributed under "
         "the License is distributed on an \"AS IS\" BASIS,\nWITHOUT "
         "WARRANTIES OR CONDITIONS OF ANY KIND, either express or "
         "implied.\nSee the License for the specific language governing "
         "permissions and\nlimitations under the License.\n";
}


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

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

LLVM IR (-O0):
@.str = [574 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0ALicensed under the Apache License, Version 2.0 (the \22License\22);\0Ayou may not use this file except in compliance with the License.\0AYou may obtain a copy of the License at:\0A\0A http://www.apache.org/licenses/LICENSE-2.0\0A\0AUnless required by applicable law or agreed to in writing, software\0Adistributed under the License is distributed on an \22AS IS\22 BASIS,\0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\0ASee the License for the specific language governing permissions and\0Alimitations under the License.\0A\00"
define i8* @ccnxNotifyAPIAbout_LongNotice() {
ret i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [574 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0ALicensed under the Apache License, Version 2.0 (the \22License\22);\0Ayou may not use this file except in compliance with the License.\0AYou may obtain a copy of the License at:\0A\0A http://www.apache.org/licenses/LICENSE-2.0\0A\0AUnless required by applicable law or agreed to in writing, software\0Adistributed under the License is distributed on an \22AS IS\22 BASIS,\0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\0ASee the License for the specific language governing permissions and\0Alimitations under the License.\0A\00"
define i8* @ccnxNotifyAPIAbout_LongNotice() {
ret i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void liberar_elementos(void *valor) { free(valor); }


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

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

LLVM IR (-O2):
define void @liberar_elementos(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned char explicit_conversion_interference0(unsigned int c) {
  return (unsigned short)c;
}


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

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

LLVM IR (-O0):
define zeroext i8 @explicit_conversion_interference0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
%5 = trunc i16 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @explicit_conversion_interference0(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
void bomp_clear_barrier(struct bomp_barrier *barrier) {}


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

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

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

LLVM IR (-O2):
%struct.bomp_barrier = type opaque
define void @bomp_clear_barrier(%struct.bomp_barrier* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ wmove(int /*<<< orphan*/, int, int);
void display_moveto(int y, int x) { wmove(stdscr, y, x); }


x86 assembly (clang, -O0):
<display_moveto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <wmove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_moveto>:
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
jmp    1030 <wmove@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @display_moveto(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdscr
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @wmove(i32 %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @display_moveto(i32 %0, i32 %1) {
%3 = load i32, i32* @stdscr
%4 = tail call i32 @wmove(i32 %3, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fig04_01();
int /*<<< orphan*/ fig04_02();
int /*<<< orphan*/ fig04_06();
int /*<<< orphan*/ fig04_09();
int /*<<< orphan*/ fig04_11();
int /*<<< orphan*/ fig04_12();
int main(void) {
  fig04_01();
  fig04_02();
  fig04_06();
  fig04_09();
  fig04_11();
  fig04_12();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fig04_01@plt>
mov    $0x0,%al
call   1060 <fig04_02@plt>
mov    $0x0,%al
call   1040 <fig04_06@plt>
mov    $0x0,%al
call   1070 <fig04_09@plt>
mov    $0x0,%al
call   1080 <fig04_11@plt>
mov    $0x0,%al
call   1050 <fig04_12@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <fig04_01@plt>
xor    %eax,%eax
call   1060 <fig04_02@plt>
xor    %eax,%eax
call   1040 <fig04_06@plt>
xor    %eax,%eax
call   1070 <fig04_09@plt>
xor    %eax,%eax
call   1080 <fig04_11@plt>
xor    %eax,%eax
call   1050 <fig04_12@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fig04_01()
%3 = call i32 (...) @fig04_02()
%4 = call i32 (...) @fig04_06()
%5 = call i32 (...) @fig04_09()
%6 = call i32 (...) @fig04_11()
%7 = call i32 (...) @fig04_12()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fig04_01()
%2 = tail call i32 (...) @fig04_02()
%3 = tail call i32 (...) @fig04_06()
%4 = tail call i32 (...) @fig04_09()
%5 = tail call i32 (...) @fig04_11()
%6 = tail call i32 (...) @fig04_12()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TCFLSH;
int ioctl(int, int /*<<< orphan*/, void *);
int tcflush(int fd, int queue_selector) {
  return ioctl(fd, TCFLSH, (void *)queue_selector);
}


x86 assembly (clang, -O0):
<tcflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
movslq -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcflush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
movslq %esi,%rdx
mov    %eax,%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@TCFLSH = global i32 0
define i32 @tcflush(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* @TCFLSH
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = call i32 @ioctl(i32 %5, i32 %6, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@TCFLSH = global i32 0
define i32 @tcflush(i32 %0, i32 %1) {
%3 = load i32, i32* @TCFLSH
%4 = sext i32 %1 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @ioctl(i32 %0, i32 %3, i8* %5)
ret i32 %6
}
void loglike_theta_initialize() {}


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

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

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

LLVM IR (-O2):
define void @loglike_theta_initialize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void main(void) {
  int fahr, celcius;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = lower;
  while (fahr <= upper) {
    celcius = 5 * (fahr - 32) / 9;
    printf("%d\t%d\n", fahr, celcius);
    fahr += step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x12c,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1173 <main+0x63>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1133 <main+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0xffffffec,%ebx
mov    $0xff60,%r15w
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
add    $0x14,%ebx
movswl %r15w,%eax
imul   $0x1c72,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
movswl %ax,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x64,%r15d
cmp    $0x119,%ebx
jb     1130 <main+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = trunc i32 %2 to i16
%4 = mul nuw nsw i16 %3, 5
%5 = add nsw i16 %4, -160
%6 = sdiv i16 %5, 9
%7 = sext i16 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %7)
%9 = add nuw nsw i32 %2, 20
%10 = icmp ult i32 %2, 281
br i1 %10, label %1, label %11
11: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xfree(void *pointer) {
  if (pointer)
    free(pointer);
}


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <xfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfree>:
test   %rdi,%rdi
je     111a <xfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @xfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @xfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PUF_DriverIRQHandler();
__attribute__((weak)) void PUF_IRQHandler(void) { PUF_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @PUF_IRQHandler() {
%1 = call i32 (...) @PUF_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @PUF_IRQHandler() {
%1 = tail call i32 (...) @PUF_DriverIRQHandler()
ret void
}
int LexIsLabel(char *id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @LexIsLabel(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t dmc_unrar_get_uint16le(const uint8_t *data) {
  return (((uint16_t)data[1]) << 8) | data[0];
}


x86 assembly (clang, -O0):
<dmc_unrar_get_uint16le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmc_unrar_get_uint16le>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @dmc_unrar_get_uint16le(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @dmc_unrar_get_uint16le(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %0
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main() {
  float m, h, i;
  printf("Enter weight and hight:\n");
  scanf("%f %f", &m, &h);
  i = m / (h * h);
  printf("Index of mass = %f\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Enter weight and hight:\0A\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [20 x i8] c"Index of mass = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = fdiv float %7, %10
store float %11, float* %4
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [20 x i8] c"Index of mass = %f\0A\00"
@str = [24 x i8] c"Enter weight and hight:\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = load float, float* %2
%9 = fmul float %8, %8
%10 = fdiv float %7, %9
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned int);
void print_word(char key[], unsigned value) { printf("%s\t%d\n", key, value); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s\09%d\0A\00"
define void @print_word(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  for (int i = 0; i < 7; ++i) {
    printf("%d\n", i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
jge    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%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 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
adr0adrreg1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*((short *)10000000)) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x989680,%eax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movswl 0x87a22(%rcx),%ecx
cmp    %ecx,%eax
jg     1146 <adr0adrreg1+0x46>
movl   $0x1,-0x4(%rbp)
jmp    114d <adr0adrreg1+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0adrreg1>:
movzwl 0x989680,%ecx
xor    %eax,%eax
cmp    0x87a22(%r9),%cx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @adr0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = load i16, i16* inttoptr (i64 10000000 to i16*)
%8 = getelementptr inbounds i16, i16* %5, i64 277777
%9 = load i16, i16* %8
%10 = icmp sle i16 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ formatDiff(int, int /*<<< orphan*/, char *);
int progressTimer(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int launchProgressTimer(int estimate) {
  char prompt[256];
  char buf[64];
  formatDiff(estimate, 0, buf);
  sprintf(prompt, "Estimated time: %s\n", buf);
  return progressTimer(prompt);
}


x86 assembly (clang, -O0):
<launchProgressTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x150(%rbp),%rdx
xor    %esi,%esi
call   1030 <formatDiff@plt>
lea    -0x110(%rbp),%rdi
lea    -0x150(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1040 <progressTimer@plt>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<launchProgressTimer>:
push   %r14
push   %rbx
sub    $0x148,%rsp
mov    %rsp,%r14
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <formatDiff@plt>
lea    0xeb2(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <progressTimer@plt>
add    $0x148,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Estimated time: %s\0A\00"
define i32 @launchProgressTimer(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i8]
%4 = alloca [64 x i8]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%7 = call i32 @formatDiff(i32 %5, i32 0, i8* %6)
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%12 = call i32 @progressTimer(i8* %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [20 x i8] c"Estimated time: %s\0A\00"
define i32 @launchProgressTimer(i32 %0) {
%2 = alloca [256 x i8]
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%6 = call i32 @formatDiff(i32 %0, i32 0, i8* %5)
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = call i32 @progressTimer(i8* %4)
ret i32 %8
}
int mul(int x, int y) {
  int r;
  r = x * y;
  return r;
}


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
double optpath1(double r, double c) { return c - r; }


x86 assembly (clang, -O0):
<optpath1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<optpath1>:
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @optpath1(double %0, double %1) {
%3 = fsub double %1, %0
ret double %3
}
/* Variables and functions */
int isspace(int);
__attribute__((regparm(0))) int(_win_isspace)(int c) { return isspace(c); }


x86 assembly (clang, -O0):
<_win_isspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_win_isspace>:
jmp    1030 <isspace@plt>

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

LLVM IR (-O2):
define i32 @_win_isspace(i32 %0) {
%2 = tail call i32 @isspace(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char const *, char *);
int dv_ip_version4(const char *ip) { return (strstr(ip, ":") == NULL); }


x86 assembly (clang, -O0):
<dv_ip_version4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv_ip_version4>:
push   %rax
mov    $0x3a,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
define i32 @dv_ip_version4(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @strstr(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @dv_ip_version4(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 58)
%3 = icmp eq i8* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
void UI_add_user_data(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_add_user_data() {
ret void
}
int d6_to_d16(int x) { return x << 10; }


x86 assembly (clang, -O0):
<d6_to_d16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d6_to_d16>:
mov    %edi,%eax
shl    $0xa,%eax
ret

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

LLVM IR (-O2):
define i32 @d6_to_d16(i32 %0) {
%2 = shl i32 %0, 10
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage(int error) {
  FILE *f = error ? stderr : stdout;
  int status = error ? 1 : 0;
  fprintf(f, "usage: fatlabel device [label]\n");
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <usage+0x28>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <usage+0x36>
mov    0x2e89(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
xor    %ebx,%ebx
test   %edi,%edi
setne  %al
jne    1133 <usage+0x13>
mov    0x2ea7(%rip),%rcx
jmp    113a <usage+0x1a>
mov    0x2ea6(%rip),%rcx
mov    (%rcx),%rcx
mov    %al,%bl
lea    0xeba(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %ebx,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@stdout = global i32* null
@.str = [32 x i8] c"usage: fatlabel device [label]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32*, i32** @stderr
br label %11
9: ; preds = %1
%10 = load i32*, i32** @stdout
br label %11
11: ; preds = %9, %7
%12 = phi i32* [ %8, %7 ], [ %10, %9 ]
store i32* %12, i32** %3
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
store i32 %16, i32* %4
%17 = load i32*, i32** %3
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %4
%20 = call i32 @exit(i32 %19)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@stdout = global i32* null
@.str = [32 x i8] c"usage: fatlabel device [label]\0A\00"
define void @usage(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load i32*, i32** @stderr
%4 = load i32*, i32** @stdout
%5 = select i1 %2, i32* %4, i32* %3
%6 = xor i1 %2, true
%7 = zext i1 %6 to i32
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 31, i64 1, i32* %5)
%9 = tail call i32 @exit(i32 %7)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(size_t);
char *ft_strnew(size_t size) {
  char *s;
  size++;
  s = (char *)(malloc(size));
  if (s == NULL)
    return (NULL);
  while (size > 0) {
    *(s + (size - 1)) = '\0';
    size--;
  }
  return (s);
}


x86 assembly (clang, -O0):
<ft_strnew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114d <ft_strnew+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    1186 <ft_strnew+0x76>
jmp    1152 <ft_strnew+0x42>
cmpq   $0x0,-0x10(%rbp)
jbe    117e <ft_strnew+0x6e>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <ft_strnew+0x42>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strnew>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     114f <ft_strnew+0x2f>
mov    %rax,%r14
test   %rbx,%rbx
je     1152 <ft_strnew+0x32>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
jmp    1152 <ft_strnew+0x32>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_strnew(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = add i64 %5, 1
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %1
store i8* null, i8** %2
br label %26
13: ; preds = %1
br label %14
14: ; preds = %17, %13
%15 = load i64, i64* %3
%16 = icmp ugt i64 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i8*, i8** %4
%19 = load i64, i64* %3
%20 = sub i64 %19, 1
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
%22 = load i64, i64* %3
%23 = add i64 %22, -1
store i64 %23, i64* %3
br label %14
24: ; preds = %14
%25 = load i8*, i8** %4
store i8* %25, i8** %2
br label %26
26: ; preds = %24, %12
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
define i8* @ft_strnew(i64 %0) {
%2 = add i64 %0, 1
%3 = tail call i64 @malloc(i64 %2)
%4 = inttoptr i64 %3 to i8*
%5 = icmp eq i64 %3, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = icmp eq i64 %2, 0
br i1 %7, label %9, label %8
8: ; preds = %6
br label %9
9: ; preds = %8, %6, %1
%10 = phi i8* [ null, %1 ], [ %4, %6 ], [ %4, %8 ]
ret i8* %10
}
/* Variables and functions */
int cmp_num(char *, char *);
int cmp_str(char *, char *);
scalar_t__ is_num(char *);
int cmp_asc(char *a, char *b) {
  return is_num(a) ? cmp_num(a, b) : cmp_str(a, b);
}


x86 assembly (clang, -O0):
<cmp_asc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_num@plt>
cmp    $0x0,%rax
je     1168 <cmp_asc+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cmp_num@plt>
mov    %eax,-0x14(%rbp)
jmp    1178 <cmp_asc+0x48>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <cmp_str@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_asc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <is_num@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
test   %rax,%rax
je     1156 <cmp_asc+0x26>
pop    %rbx
pop    %r14
jmp    1030 <cmp_num@plt>
pop    %rbx
pop    %r14
jmp    1050 <cmp_str@plt>

LLVM IR (-O0):
define i32 @cmp_asc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @is_num(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @cmp_num(i8* %9, i8* %10)
br label %16
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @cmp_str(i8* %13, i8* %14)
br label %16
16: ; preds = %12, %8
%17 = phi i32 [ %11, %8 ], [ %15, %12 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @cmp_asc(i8* %0, i8* %1) {
%3 = tail call i64 @is_num(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @cmp_num(i8* %0, i8* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @cmp_str(i8* %0, i8* %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}