xunge/DecIR huggingface dataset:
int my_isspace(int ch) {
  return (ch == ' ' || ch == '\f' || ch == '\n' || ch == '\r' || ch == '\t' ||
          ch == '\v');
}


x86 assembly (clang, -O0):
<my_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <my_isspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isspace>:
cmp    $0x20,%edi
ja     111d <my_isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <my_isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @my_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x33() {
  Assert_real((isspace(51) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              260, ("isspace should be 0 for 3"));
}


x86 assembly (clang, -O0):
<t_isspace_0x33>:
push   %rbp
mov    %rsp,%rbp
mov    $0x33,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x104,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x33>:
push   %rax
mov    $0x33,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x104,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for 3\00"
define void @t_isspace_0x33() {
%1 = call i64 @isspace(i32 51)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 260, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for 3\00"
define void @t_isspace_0x33() {
%1 = tail call i64 @isspace(i32 51)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 260, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void bb_show_usage(void) {}


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

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

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

LLVM IR (-O2):
define void @bb_show_usage() {
ret void
}
float __ocl_fast_normalize_float(float src) { return 1.0f; }


x86 assembly (clang, -O0):
<__ocl_fast_normalize_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_fast_normalize_float>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @__ocl_fast_normalize_float(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 1.000000e+00
}

LLVM IR (-O2):
define float @__ocl_fast_normalize_float(float %0) {
ret float 1.000000e+00
}
int do_672() { return 672; }


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

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

LLVM IR (-O0):
define i32 @do_672() {
ret i32 672
}

LLVM IR (-O2):
define i32 @do_672() {
ret i32 672
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void RNDResponseSink_RenderingControl_SetBlueVideoBlackLevel(
    struct UPnPService *Service, int ErrorCode, void *User) {
  printf("RND Invoke Response: "
         "RenderingControl/SetBlueVideoBlackLevel[ErrorCode:%d]()\r\n",
         ErrorCode);
}


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

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [79 x i8] c"RND Invoke Response: RenderingControl/SetBlueVideoBlackLevel[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetBlueVideoBlackLevel(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [79 x i8] c"RND Invoke Response: RenderingControl/SetBlueVideoBlackLevel[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetBlueVideoBlackLevel(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void gdt_set_tss() {}


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

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

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

LLVM IR (-O2):
define void @gdt_set_tss() {
ret void
}
void gtk_icon_lookup_flags_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_lookup_flags_get_type() {
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ dispatcher(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc == 2)
    dispatcher(atoi(argv[1]));
  else
    printf("./tp [puerto] para elegir puerto, corriendo por defecto en 8000\n");
  dispatcher(8000);
  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)
cmpl   $0x2,-0x8(%rbp)
jne    1169 <main+0x39>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <dispatcher@plt>
jmp    1175 <main+0x45>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1f40,%edi
call   1040 <dispatcher@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1148 <main+0x18>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <dispatcher@plt>
jmp    1154 <main+0x24>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1f40,%edi
call   1040 <dispatcher@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [65 x i8] c"./tp [puerto] para elegir puerto, corriendo por defecto en 8000\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
%13 = call i32 @dispatcher(i32 %12)
br label %16
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %8
%17 = call i32 @dispatcher(i32 8000)
ret i32 0
}

LLVM IR (-O2):
@str = [64 x i8] c"./tp [puerto] para elegir puerto, corriendo por defecto en 8000\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @dispatcher(i32 %7)
br label %11
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
br label %11
11: ; preds = %9, %4
%12 = tail call i32 @dispatcher(i32 8000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Fish001();
int /*<<< orphan*/ Fish002();
int /*<<< orphan*/ Fish003();
int /*<<< orphan*/ Fish004();
int /*<<< orphan*/ Fish005();
int /*<<< orphan*/ Fish006();
int /*<<< orphan*/ Fish007();
int /*<<< orphan*/ Fish008();
int /*<<< orphan*/ Fish009();
void Fish_8(void) {
  Fish009();
  Fish008();
  Fish001();
  Fish002();
  Fish007();
  Fish003();
  Fish005();
  Fish004();
  Fish006();
}


x86 assembly (clang, -O0):
<Fish_8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <Fish009@plt>
mov    $0x0,%al
call   10b0 <Fish008@plt>
mov    $0x0,%al
call   1050 <Fish001@plt>
mov    $0x0,%al
call   1080 <Fish002@plt>
mov    $0x0,%al
call   1060 <Fish007@plt>
mov    $0x0,%al
call   1040 <Fish003@plt>
mov    $0x0,%al
call   1030 <Fish005@plt>
mov    $0x0,%al
call   10a0 <Fish004@plt>
mov    $0x0,%al
call   1090 <Fish006@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fish_8>:
push   %rax
xor    %eax,%eax
call   1070 <Fish009@plt>
xor    %eax,%eax
call   10b0 <Fish008@plt>
xor    %eax,%eax
call   1050 <Fish001@plt>
xor    %eax,%eax
call   1080 <Fish002@plt>
xor    %eax,%eax
call   1060 <Fish007@plt>
xor    %eax,%eax
call   1040 <Fish003@plt>
xor    %eax,%eax
call   1030 <Fish005@plt>
xor    %eax,%eax
call   10a0 <Fish004@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <Fish006@plt>

LLVM IR (-O0):
define void @Fish_8() {
%1 = call i32 (...) @Fish009()
%2 = call i32 (...) @Fish008()
%3 = call i32 (...) @Fish001()
%4 = call i32 (...) @Fish002()
%5 = call i32 (...) @Fish007()
%6 = call i32 (...) @Fish003()
%7 = call i32 (...) @Fish005()
%8 = call i32 (...) @Fish004()
%9 = call i32 (...) @Fish006()
ret void
}

LLVM IR (-O2):
define void @Fish_8() {
%1 = tail call i32 (...) @Fish009()
%2 = tail call i32 (...) @Fish008()
%3 = tail call i32 (...) @Fish001()
%4 = tail call i32 (...) @Fish002()
%5 = tail call i32 (...) @Fish007()
%6 = tail call i32 (...) @Fish003()
%7 = tail call i32 (...) @Fish005()
%8 = tail call i32 (...) @Fish004()
%9 = tail call i32 (...) @Fish006()
ret void
}
/* Variables and functions */
int foo(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", foo(3, 4));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int sort_utils_pointer_icmp(const void *const a, const void *const b) {
  const void *const *x = (const void *const *)a;
  const void *const *y = (const void *const *)b;
  return (*x < *y) - (*x > *y);
}


x86 assembly (clang, -O0):
<sort_utils_pointer_icmp>:
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
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x20(%rbp),%rdx
cmp    (%rdx),%rcx
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_utils_pointer_icmp>:
mov    (%rdi),%rcx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%rcx
setb   %al
seta   %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @sort_utils_pointer_icmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = icmp ult i8* %12, %14
%16 = zext i1 %15 to i32
%17 = load i8**, i8*** %5
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %6
%20 = load i8*, i8** %19
%21 = icmp ugt i8* %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @sort_utils_pointer_icmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp ult i8* %5, %6
%8 = zext i1 %7 to i32
%9 = icmp ugt i8* %5, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
int __attribute__((visibility("default"))) myFunc(void) { return 55; }


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

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

LLVM IR (-O0):
define i32 @myFunc() {
ret i32 55
}

LLVM IR (-O2):
define i32 @myFunc() {
ret i32 55
}
/* Variables and functions */
int /*<<< orphan*/ EscribirFecha(int, int, int);
int /*<<< orphan*/ LeerFecha(int *, int *, int *);
main(void) {
  int dia, mes, anyo;
  LeerFecha(&dia, &mes, &anyo);
  EscribirFecha(dia, mes, anyo);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <LeerFecha@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <EscribirFecha@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <LeerFecha@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <EscribirFecha@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @LeerFecha(i32* %1, i32* %2, i32* %3)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @EscribirFecha(i32 %5, i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @LeerFecha(i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @EscribirFecha(i32 %8, i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Bienvenidos a Introduccion a C/C++ para sistemas embebidos:\n");
  printf("%c[%d;%d;%dmHello World\n", 0x1B, 1, 31, 40);
  printf("%c[%d;%dmHello World%c[%dm\n", 27, 7, 33, 27, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    $0x1f,%ecx
mov    $0x28,%r8d
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x1b,%r8d
mov    $0x7,%edx
mov    $0x21,%ecx
xor    %r9d,%r9d
mov    %r8d,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    $0x1f,%ecx
mov    $0x28,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x1b,%esi
mov    $0x7,%edx
mov    $0x21,%ecx
mov    $0x1b,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Bienvenidos a Introduccion a C/C++ para sistemas embebidos:\0A\00"
@.str.1 = [25 x i8] c"%c[%d;%d;%dmHello World\0A\00"
@.str.2 = [28 x i8] c"%c[%d;%dmHello World%c[%dm\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 27, i32 1, i32 31, i32 40)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 27, i32 7, i32 33, i32 27, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c"%c[%d;%d;%dmHello World\0A\00"
@.str.2 = [28 x i8] c"%c[%d;%dmHello World%c[%dm\0A\00"
@str = [60 x i8] c"Bienvenidos a Introduccion a C/C++ para sistemas embebidos:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 27, i32 1, i32 31, i32 40)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 27, i32 7, i32 33, i32 27, i32 0)
ret i32 0
}
void PM_TorsoAnimation(void) { return; }


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

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

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

LLVM IR (-O2):
define void @PM_TorsoAnimation() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 1, b = 999;
  for (; a < 500; b--, a++) {
    int temp = 1000 - a - b;
    if (temp * temp == (a * a + b * b)) {
      printf("%d %d", a, b);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x3e7,-0xc(%rbp)
cmpl   $0x1f4,-0x8(%rbp)
jge    1195 <main+0x85>
mov    $0x3e8,%eax
sub    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
jne    1179 <main+0x69>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <main+0x6e>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 999, i32* %3
br label %5
5: ; preds = %29, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 500
br i1 %7, label %8, label %34
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 1000, %9
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
%16 = load i32, i32* %2
%17 = load i32, i32* %2
%18 = mul nsw i32 %16, %17
%19 = load i32, i32* %3
%20 = load i32, i32* %3
%21 = mul nsw i32 %19, %20
%22 = add nsw i32 %18, %21
%23 = icmp eq i32 %15, %22
br i1 %23, label %24, label %28
24: ; preds = %8
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26)
br label %28
28: ; preds = %24, %8
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, -1
store i32 %31, i32* %3
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %5
34: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
bool def_ms_inc_comp(int *x, int *y) {
  if (*x < *y)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<def_ms_inc_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <def_ms_inc_comp+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <def_ms_inc_comp+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_ms_inc_comp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

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

LLVM IR (-O2):
define i32 @def_ms_inc_comp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ dxl_write_byte(unsigned char, int, unsigned char);
void setCCWComplianceSlope(unsigned char id, unsigned char step) {
  dxl_write_byte(id, (29), step);
}


x86 assembly (clang, -O0):
<setCCWComplianceSlope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    $0x1d,%esi
movzbl %al,%edi
movzbl -0x2(%rbp),%edx
call   1030 <dxl_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setCCWComplianceSlope>:
mov    %esi,%edx
mov    $0x1d,%esi
jmp    1030 <dxl_write_byte@plt>

LLVM IR (-O0):
define void @setCCWComplianceSlope(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = load i8, i8* %4
%7 = call i32 @dxl_write_byte(i8 zeroext %5, i32 29, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @setCCWComplianceSlope(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @dxl_write_byte(i8 zeroext %0, i32 29, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ settings_directory_name(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char);
void settings_filename(char *filename) {
  char directory[512];
  settings_directory_name(directory);
  sprintf(filename, "%s%csettings.dat", directory, '/');
}


x86 assembly (clang, -O0):
<settings_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x210(%rbp),%rdi
call   1030 <settings_directory_name@plt>
mov    -0x8(%rbp),%rdi
lea    -0x210(%rbp),%rdx
lea    0xeb3(%rip),%rsi
mov    $0x2f,%ecx
call   1040 <sprintf@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<settings_filename>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <settings_directory_name@plt>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    $0x2f,%ecx
call   1040 <sprintf@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%s%csettings.dat\00"
define void @settings_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca [512 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @settings_directory_name(i8* %4)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %7, i8 signext 47)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s%csettings.dat\00"
define void @settings_filename(i8* nocapture writeonly %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i32 @settings_directory_name(i8* %3)
%5 = call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3, i8 signext 47)
ret void
}
int execute_futimesat() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_futimesat() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ m_sort(int *, int *, int /*<<< orphan*/, int);
void merge_sort(int init[], int merged[], int array_size) {
  m_sort(init, merged, 0, array_size - 1);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <m_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
lea    -0x1(%rdx),%ecx
xor    %edx,%edx
jmp    1030 <m_sort@plt>

LLVM IR (-O0):
define void @merge_sort(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 1
%11 = call i32 @m_sort(i32* %7, i32* %8, i32 0, i32 %10)
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32* %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @m_sort(i32* %0, i32* %1, i32 0, i32 %4)
ret void
}
/* Variables and functions */
double exp(double);
float mtof(float f) {
  if (f <= -1500)
    return (0);
  else if (f > 1499)
    return (mtof(1499));
  else
    return (8.17579891564 * exp(.0577622650 * f));
}


x86 assembly (clang, -O0):
<mtof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xecb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     114c <mtof+0x2c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11ab <mtof+0x8b>
movss  -0x8(%rbp),%xmm0
movss  0xeab(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1179 <mtof+0x59>
movss  0xe9a(%rip),%xmm0
call   1040 <mtof@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11ab <mtof+0x8b>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe86(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe6a(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtof>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
movss  0xee1(%rip),%xmm2
ucomiss %xmm1,%xmm2
jae    1157 <mtof+0x47>
ucomiss 0xedd(%rip),%xmm1
jbe    1137 <mtof+0x27>
movss  0xecf(%rip),%xmm0
pop    %rax
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulsd  0xeca(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xec5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @mtof(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ole float %4, -1.500000e+03
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %19
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp ogt float %8, 1.499000e+03
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call float @mtof(float 1.499000e+03)
store float %11, float* %2
br label %19
12: ; preds = %7
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = fmul double 0x3FAD9303FE3C5B7B, %14
%16 = call double @exp(double %15)
%17 = fmul double 0x40205A0250C2B12F, %16
%18 = fptrunc double %17 to float
store float %18, float* %2
br label %19
19: ; preds = %12, %10, %6
%20 = load float, float* %2
ret float %20
}

LLVM IR (-O2):
define float @mtof(float %0) {
%2 = fcmp ugt float %0, -1.500000e+03
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = fcmp ogt float %0, 1.499000e+03
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = fpext float %0 to double
%7 = fmul double %6, 0x3FAD9303FE3C5B7B
%8 = tail call double @exp(double %7)
%9 = fmul double %8, 0x40205A0250C2B12F
%10 = fptrunc double %9 to float
br label %11
11: ; preds = %3, %1, %5
%12 = phi float [ %10, %5 ], [ 0.000000e+00, %1 ], [ 0x47EEDE21E0000000, %3 ]
ret float %12
}
void Free(c) char *c;
{
  free(c);
  return;
}


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

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

LLVM IR (-O2):
define void @Free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
void *memcpy(int /*<<< orphan*/, void *, size_t);
int /*<<< orphan*/ xmalloc(size_t);
void *xmemdup(void *addr, size_t size) {
  return memcpy(xmalloc(size), addr, size);
}


x86 assembly (clang, -O0):
<xmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <xmalloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmemdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <xmalloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @xmemdup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i32 @xmalloc(i64 %5)
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = call i8* @memcpy(i32 %6, i8* %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @xmemdup(i8* %0, i64 %1) {
%3 = tail call i32 @xmalloc(i64 %1)
%4 = tail call i8* @memcpy(i32 %3, i8* %0, i64 %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  for (unsigned char c = 1; c > 0; c++)
    ;
  char c = 3;
  c += (int)2;
  if (c != 5)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x1,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jle    1142 <main+0x32>
jmp    1135 <main+0x25>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1123 <main+0x13>
movb   $0x3,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
cmp    $0x5,%eax
je     1164 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 1, i8* %2
br label %4
4: ; preds = %9, %0
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i8, i8* %2
%11 = add i8 %10, 1
store i8 %11, i8* %2
br label %4
12: ; preds = %4
store i8 3, i8* %3
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = add nsw i32 %14, 2
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 5
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = call i32 (...) @abort()
unreachable
22: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct VectorVectorBase {
  int dummy;
};

/* Variables and functions */
char const **TaggerChar(struct VectorVectorBase *);
const char **tagger_char(struct VectorVectorBase *basev) {
  return TaggerChar(basev);
}


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

x86 assembly (clang, -O2):
<tagger_char>:
jmp    1030 <TaggerChar@plt>

LLVM IR (-O0):
%struct.VectorVectorBase = type { i32 }
define i8** @tagger_char(%struct.VectorVectorBase* %0) {
%2 = alloca %struct.VectorVectorBase*
store %struct.VectorVectorBase* %0, %struct.VectorVectorBase** %2
%3 = load %struct.VectorVectorBase*, %struct.VectorVectorBase** %2
%4 = call i8** @TaggerChar(%struct.VectorVectorBase* %3)
ret i8** %4
}

LLVM IR (-O2):
%struct.VectorVectorBase = type { i32 }
define i8** @tagger_char(%struct.VectorVectorBase* %0) {
%2 = tail call i8** @TaggerChar(%struct.VectorVectorBase* %0)
ret i8** %2
}
double calcPower(double first, double second) {
  long double ans = 1;
  if (second != 0) {
    for (int i = 0; i < second; i++) {
      ans *= first;
    }
  }
  return ans;
}


x86 assembly (clang, -O0):
<calcPower>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
fld1
fstpt  -0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1130 <calcPower+0x30>
jp     1130 <calcPower+0x30>
jmp    1169 <calcPower+0x69>
movl   $0x0,-0x24(%rbp)
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1164 <calcPower+0x64>
fldl   -0x8(%rbp)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
fstpt  -0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1137 <calcPower+0x37>
jmp    1169 <calcPower+0x69>
fldt   -0x20(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcPower>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    113f <calcPower+0x3f>
movsd  %xmm0,-0x8(%rsp)
fld1
mov    $0x1,%eax
fldl   -0x8(%rsp)
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
fmul   %st,%st(1)
add    $0x1,%eax
ucomisd %xmm0,%xmm1
ja     1120 <calcPower+0x20>
fstp   %st(0)
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret
movsd  0xeb9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calcPower(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca x86_fp80
%6 = alloca i32
store double %0, double* %3
store double %1, double* %4
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %5
%7 = load double, double* %4
%8 = fcmp une double %7, 0.000000e+00
br i1 %8, label %9, label %24
9: ; preds = %2
store i32 0, i32* %6
br label %10
10: ; preds = %20, %9
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to double
%13 = load double, double* %4
%14 = fcmp olt double %12, %13
br i1 %14, label %15, label %23
15: ; preds = %10
%16 = load double, double* %3
%17 = fpext double %16 to x86_fp80
%18 = load x86_fp80, x86_fp80* %5
%19 = fmul x86_fp80 %18, %17
store x86_fp80 %19, x86_fp80* %5
br label %20
20: ; preds = %15
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %10
23: ; preds = %10
br label %24
24: ; preds = %23, %2
%25 = load x86_fp80, x86_fp80* %5
%26 = fptrunc x86_fp80 %25 to double
ret double %26
}

LLVM IR (-O2):
define double @calcPower(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = fpext double %0 to x86_fp80
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ 0, %4 ], [ %10, %6 ]
%8 = phi x86_fp80 [ 0xK3FFF8000000000000000, %4 ], [ %9, %6 ]
%9 = fmul x86_fp80 %8, %5
%10 = add nuw nsw i32 %7, 1
%11 = sitofp i32 %10 to double
%12 = fcmp olt double %11, %1
br i1 %12, label %6, label %13
13: ; preds = %6
%14 = fptrunc x86_fp80 %9 to double
br label %15
15: ; preds = %13, %2
%16 = phi double [ 1.000000e+00, %2 ], [ %14, %13 ]
ret double %16
}
double pathconN_nm3_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<pathconN_nm3_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm3_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathconN_nm3_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pathconN_nm3_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
int(getchar)(void) { return getchar(); }


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
call   1030 <getchar@plt>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @getchar() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int uint32_t;
typedef int pid_t;

/* Variables and functions */
uint32_t hash_djb2a(const char *str, const pid_t pid) {
  register uint32_t hash = 5381 + pid;
  register int c;
  while ((c = *str++)) {
    hash = ((hash << 5) + hash) ^ c;
  }
  return hash % (17627);
}


x86 assembly (clang, -O0):
<hash_djb2a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1505,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1148 <hash_djb2a+0x48>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hash_djb2a+0x16>
mov    -0x10(%rbp),%eax
mov    $0x44db,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_djb2a>:
add    $0x1505,%esi
mov    (%rdi),%cl
test   %cl,%cl
je     1139 <hash_djb2a+0x39>
add    $0x1,%rdi
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %esi,%eax
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%esi
test   %cl,%cl
jne    1120 <hash_djb2a+0x20>
jmp    113b <hash_djb2a+0x3b>
mov    %esi,%eax
cltq
imul   $0x76f94e09,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2d,%rcx
add    %edx,%ecx
imul   $0x44db,%ecx,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_djb2a(i8* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 5381
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %2, %6
%7 = phi i8 [ %14, %6 ], [ %4, %2 ]
%8 = phi i8* [ %11, %6 ], [ %0, %2 ]
%9 = phi i32 [ %13, %6 ], [ %3, %2 ]
%10 = sext i8 %7 to i32
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = mul i32 %9, 33
%13 = xor i32 %12, %10
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %2
%17 = phi i32 [ %3, %2 ], [ %13, %6 ]
%18 = srem i32 %17, 17627
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t abs32(int32_t x) { return (x >= 0) ? x : -x; }


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

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

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

LLVM IR (-O2):
define i32 @abs32(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
unsigned int strlen(char *);
void fit(char *string, unsigned int size) {
  if (strlen(string) > size)
    *(string + size) = '\0';
}


x86 assembly (clang, -O0):
<fit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    -0xc(%rbp),%eax
jbe    113c <fit+0x2c>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    %ebp,%eax
jbe    1127 <fit+0x17>
mov    %ebp,%eax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @fit(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp ugt i32 %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = zext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
br label %8
8: ; preds = %5, %2
ret void
}
unsigned int getMask(int a, int b) {
  unsigned int i;
  unsigned int r = 0;
  for (i = a; i <= b; i++) {
    r |= 1 << i;
  }
  return r;
}


x86 assembly (clang, -O0):
<getMask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     1141 <getMask+0x41>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <getMask+0x17>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMask>:
xor    %eax,%eax
cmp    %esi,%edi
ja     111a <getMask+0x1a>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
bts    %edi,%eax
add    $0x1,%edi
cmp    %esi,%edi
jbe    1110 <getMask+0x10>
ret

LLVM IR (-O0):
define i32 @getMask(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %6
%7 = load i32, i32* %3
store i32 %7, i32* %5
br label %8
8: ; preds = %17, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp ule i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i32, i32* %5
%14 = shl i32 1, %13
%15 = load i32, i32* %6
%16 = or i32 %15, %14
store i32 %16, i32* %6
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add i32 %18, 1
store i32 %19, i32* %5
br label %8
20: ; preds = %8
%21 = load i32, i32* %6
ret i32 %21
}

LLVM IR (-O2):
define i32 @getMask(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ 0, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = shl nuw i32 1, %6
%8 = or i32 %5, %7
%9 = add i32 %6, 1
%10 = icmp ugt i32 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ 0, %2 ], [ %8, %4 ]
ret i32 %12
}
int main() {
  int z;
  int a[2][3] = {{z + 1, 2, 3}, {5, 6, 7}};
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0x6,-0x10(%rbp)
movl   $0x7,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [3 x i32]]
%3 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %2, i64 0, i64 0
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = getelementptr inbounds i32, i32* %4, i64 1
store i32 2, i32* %7
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 3, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 1
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
store i32 5, i32* %10
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 6, i32* %11
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 7, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ read_atoms(char const *);
int /*<<< orphan*/ read_inputfile(char const *);
void md_initialize(const char *cls_file, const char *input_file) {
  read_atoms(cls_file);
  read_inputfile(input_file);
}


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

x86 assembly (clang, -O2):
<md_initialize>:
push   %rbx
mov    %rsi,%rbx
call   1040 <read_atoms@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <read_inputfile@plt>

LLVM IR (-O0):
define void @md_initialize(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @read_atoms(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @read_inputfile(i8* %7)
ret void
}

LLVM IR (-O2):
define void @md_initialize(i8* %0, i8* %1) {
%3 = tail call i32 @read_atoms(i8* %0)
%4 = tail call i32 @read_inputfile(i8* %1)
ret void
}