xunge/DecIR huggingface dataset:
void free_matr(double **m) {
  free(m[0]);
  free(m);
}


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

x86 assembly (clang, -O2):
<free_matr>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_matr(double** %0) {
%2 = alloca double**
store double** %0, double*** %2
%3 = load double**, double*** %2
%4 = getelementptr inbounds double*, double** %3, i64 0
%5 = load double*, double** %4
%6 = bitcast double* %5 to i8*
%7 = load double**, double*** %2
%8 = bitcast double** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @free_matr(double** nocapture %0) {
%2 = bitcast double** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast double** %0 to i8*
tail call void @free(i8* %4)
ret void
}
void ExttMotdAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttMotdAuxTable() {
ret void
}
int test_imm_60int32_reg(int val) { return ((val) & (0x60 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_60int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x60,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_60int32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 96
%5 = icmp ne i32 %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_60int32_reg(i32 %0) {
%2 = and i32 %0, 96
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sha1_finish_ctx(void *);
int /*<<< orphan*/ sha1_read(void *);
void sha1_final(unsigned char *digest, void *context) {
  sha1_finish_ctx(context);
  memcpy(digest, sha1_read(context), 20);
}


x86 assembly (clang, -O0):
<sha1_final>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sha1_finish_ctx@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sha1_read@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    $0x14,%edx
call   1050 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha1_final>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <sha1_finish_ctx@plt>
mov    %rbx,%rdi
call   1030 <sha1_read@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    $0x14,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <memcpy@plt>

LLVM IR (-O0):
define void @sha1_final(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @sha1_finish_ctx(i8* %5)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sha1_read(i8* %8)
%10 = call i32 @memcpy(i8* %7, i32 %9, i32 20)
ret void
}

LLVM IR (-O2):
define void @sha1_final(i8* %0, i8* %1) {
%3 = tail call i32 @sha1_finish_ctx(i8* %1)
%4 = tail call i32 @sha1_read(i8* %1)
%5 = tail call i32 @memcpy(i8* %0, i32 %4, i32 20)
ret void
}
/* Variables and functions */
int rom_checkmagic(char const *);
int nes_isourfile(const char *filename) { return rom_checkmagic(filename); }


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

x86 assembly (clang, -O2):
<nes_isourfile>:
jmp    1030 <rom_checkmagic@plt>

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

LLVM IR (-O2):
define i32 @nes_isourfile(i8* %0) {
%2 = tail call i32 @rom_checkmagic(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_string_hashsum();
int main(int argc, char **argv) {
  test_string_hashsum();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_string_hashsum@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_string_hashsum()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_string_hashsum()
ret i32 0
}
/* Variables and functions */
int strlen(char *);
scalar_t__ toupper(int);
int strup(char *string) {
  int x;
  for (x = 0; x < strlen(string); x++) {
    string[x] = (char)toupper((int)string[x]);
  }
}


x86 assembly (clang, -O0):
<strup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    117b <strup+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <strup+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    1161 <strup+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <strup+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @strup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %15
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = tail call i64 @toupper(i32 %8)
%10 = trunc i64 %9 to i8
store i8 %10, i8* %6
%11 = add nuw nsw i64 %5, 1
%12 = tail call i32 @strlen(i8* %0)
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %11, %13
br i1 %14, label %4, label %15
15: ; preds = %4, %1
ret i32 undef
}
/* Type definitions */
struct expression {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expr_cg_constant_expression(struct expression *, char *);
void expr_cg_bitcast(struct expression *e) {
  expr_cg_constant_expression(e, "bitcast");
}


x86 assembly (clang, -O0):
<expr_cg_bitcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <expr_cg_constant_expression@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr_cg_bitcast>:
lea    0xee9(%rip),%rsi
jmp    1030 <expr_cg_constant_expression@plt>

LLVM IR (-O0):
%struct.expression = type { i32 }
@.str = [8 x i8] c"bitcast\00"
define void @expr_cg_bitcast(%struct.expression* %0) {
%2 = alloca %struct.expression*
store %struct.expression* %0, %struct.expression** %2
%3 = load %struct.expression*, %struct.expression** %2
%4 = call i32 @expr_cg_constant_expression(%struct.expression* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.expression = type { i32 }
@.str = [8 x i8] c"bitcast\00"
define void @expr_cg_bitcast(%struct.expression* %0) {
%2 = tail call i32 @expr_cg_constant_expression(%struct.expression* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t spl_strlen(const char *str) {
  unsigned len = 0;
  while (*str++ != '\0') {
    ++len;
  }
  return len;
}


x86 assembly (clang, -O0):
<spl_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1138 <spl_strlen+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <spl_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spl_strlen>:
cmpb   $0x0,(%rdi)
je     111e <spl_strlen+0x1e>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <spl_strlen+0x10>
mov    %eax,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @spl_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = zext i32 %8 to i64
br label %13
13: ; preds = %11, %1
%14 = phi i64 [ 0, %1 ], [ %12, %11 ]
ret i64 %14
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("EOF :%d\n", EOF);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"EOF :%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void gtk_font_button_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_font_button_new() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t cmp16(uint16_t a, uint16_t b) { return a - b; }


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

x86 assembly (clang, -O2):
<cmp16>:
mov    %rdi,%rax
sub    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @cmp16(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @cmp16(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
void MirrorRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @MirrorRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x84() {
  Assert_real((islower(132) == 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_islower.c",
              665, ("islower should be 0 for 0x84"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x84>:
push   %rax
mov    $0x84,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x299,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x84\00"
define void @t_islower_0x84() {
%1 = call i64 @islower(i32 132)
%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 665, i8* getelementptr inbounds ([29 x i8], [29 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x84\00"
define void @t_islower_0x84() {
%1 = tail call i64 @islower(i32 132)
%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 665, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int main() {
  FILE *fp;
  int b;
  fp = fopen("test.txt", "a");
  fprintf(fp, "Testing...\n");
  if (b)
    fclose(fp);
  fclose(fp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x0,-0x14(%rbp)
je     1179 <main+0x49>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xebd(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"test.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [12 x i8] c"Testing...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32*, i32** %2
%11 = call i32 @fclose(i32* %10)
br label %12
12: ; preds = %9, %0
%13 = load i32*, i32** %2
%14 = call i32 @fclose(i32* %13)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [9 x i8] c"test.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [12 x i8] c"Testing...\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i64 11, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void ignore_handler(int signal_number) {
  fprintf(stdout, "\n");
  return;
}


x86 assembly (clang, -O0):
<ignore_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_handler>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @ignore_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @ignore_handler(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_job_info_htmlfile(int, char **);
int /*<<< orphan*/ print_job_info_weefile(int, char **);
void print_job_info(int argc, char **argv) {
  print_job_info_weefile(argc, argv);
  print_job_info_htmlfile(argc, argv);
}


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

x86 assembly (clang, -O2):
<print_job_info>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <print_job_info_weefile@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print_job_info_htmlfile@plt>

LLVM IR (-O0):
define void @print_job_info(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @print_job_info_weefile(i32 %5, i8** %6)
%8 = load i32, i32* %3
%9 = load i8**, i8*** %4
%10 = call i32 @print_job_info_htmlfile(i32 %8, i8** %9)
ret void
}

LLVM IR (-O2):
define void @print_job_info(i32 %0, i8** %1) {
%3 = tail call i32 @print_job_info_weefile(i32 %0, i8** %1)
%4 = tail call i32 @print_job_info_htmlfile(i32 %0, i8** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int n;
  scanf("%d", &n);
  printf("%d\n", n);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
scalar_t__ GetCurrentThreadId();
int usbi_get_tid(void) { return (int)GetCurrentThreadId(); }


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

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

LLVM IR (-O0):
define i32 @usbi_get_tid() {
%1 = call i64 (...) @GetCurrentThreadId()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @usbi_get_tid() {
%1 = tail call i64 (...) @GetCurrentThreadId()
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetIMValues() {
  printf("XGetIMValues called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"XGetIMValues called\0A\00"
define i32 @XGetIMValues() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"XGetIMValues called\00"
define i32 @XGetIMValues() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
int zero_or_ten(int);
void alloc_may_be_big_Bad() { malloc(zero_or_ten(1) * 100 * 1000 * 1000 + 1); }


x86 assembly (clang, -O0):
<alloc_may_be_big_Bad>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <zero_or_ten@plt>
imul   $0x64,%eax,%eax
imul   $0x3e8,%eax,%eax
imul   $0x3e8,%eax,%edi
add    $0x1,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_may_be_big_Bad>:
push   %rax
mov    $0x1,%edi
call   1040 <zero_or_ten@plt>
imul   $0x5f5e100,%eax,%edi
or     $0x1,%edi
pop    %rax
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @alloc_may_be_big_Bad() {
%1 = call i32 @zero_or_ten(i32 1)
%2 = mul nsw i32 %1, 100
%3 = mul nsw i32 %2, 1000
%4 = mul nsw i32 %3, 1000
%5 = add nsw i32 %4, 1
%6 = call i32 @malloc(i32 %5)
ret void
}

LLVM IR (-O2):
define void @alloc_may_be_big_Bad() {
%1 = tail call i32 @zero_or_ten(i32 1)
%2 = mul i32 %1, 100000000
%3 = or i32 %2, 1
%4 = tail call i32 @malloc(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ p264_pixel_avg_w16_mmxext(int /*<<< orphan*/ *, int,
                                             int /*<<< orphan*/ *, int,
                                             int /*<<< orphan*/ *, int, int);
void p264_pixel_avg_16x16_mmxext(uint8_t *dst, int i_dst, uint8_t *src,
                                 int i_src) {
  p264_pixel_avg_w16_mmxext(dst, i_dst, dst, i_dst, src, i_src, 16);
}


x86 assembly (clang, -O0):
<p264_pixel_avg_16x16_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
movl   $0x10,(%rsp)
call   1030 <p264_pixel_avg_w16_mmxext@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_pixel_avg_16x16_mmxext>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
movl   $0x10,(%rsp)
mov    %rdi,%rdx
mov    %esi,%ecx
call   1030 <p264_pixel_avg_w16_mmxext@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @p264_pixel_avg_16x16_mmxext(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @p264_pixel_avg_w16_mmxext(i32* %0, i32 %1, i32* %0, i32 %1, i32* %2, i32 %3, i32 16)
ret void
}
/* Variables and functions */
char *fchar(char *);
char *lchar(char *);
int /*<<< orphan*/ pft(char *, char *);
void showLine(char *line) {
  char *fc, *lc;
  fc = fchar(line);
  lc = lchar(line);
  pft(fc, lc);
}


x86 assembly (clang, -O0):
<showLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fchar@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <lchar@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pft@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showLine>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fchar@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1050 <lchar@plt>
mov    %r14,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <pft@plt>

LLVM IR (-O0):
define void @showLine(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @fchar(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %2
%8 = call i8* @lchar(i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @pft(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
define void @showLine(i8* %0) {
%2 = tail call i8* @fchar(i8* %0)
%3 = tail call i8* @lchar(i8* %0)
%4 = tail call i32 @pft(i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int tinyos_fid_close(void *cookie) {
  free(cookie);
  return 0;
}


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

x86 assembly (clang, -O2):
<tinyos_fid_close>:
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @tinyos_fid_close(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
scalar_t__ portWrite(char *);
int set_TemmaStellarRate(void) {
  if (portWrite("LL") < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<set_TemmaStellarRate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <portWrite@plt>
cmp    $0x0,%rax
jge    113a <set_TemmaStellarRate+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <set_TemmaStellarRate+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_TemmaStellarRate>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <portWrite@plt>
sar    $0x3f,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"LL\00"
define i32 @set_TemmaStellarRate() {
%1 = tail call i64 @portWrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = ashr i64 %1, 63
%3 = trunc i64 %2 to i32
ret i32 %3
}
int fun1032() { return 1032; }


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

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

LLVM IR (-O0):
define i32 @fun1032() {
ret i32 1032
}

LLVM IR (-O2):
define i32 @fun1032() {
ret i32 1032
}
int test29(int a) {
  goto loco;
loco:
  return a;
}


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

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

LLVM IR (-O0):
define i32 @test29(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @test29(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ puts(char const *);
void Log2(const char *prompt, unsigned p1, unsigned p2) {
  puts(prompt);
  printf("\tparameter 1: %u\n", p1);
  printf("\tparameter 2: %u\n", p2);
}


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

x86 assembly (clang, -O2):
<Log2>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"\09parameter 1: %u\0A\00"
@.str.1 = [18 x i8] c"\09parameter 2: %u\0A\00"
define void @Log2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 @puts(i8* %7)
%9 = load i32, i32* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"\09parameter 1: %u\0A\00"
@.str.1 = [18 x i8] c"\09parameter 2: %u\0A\00"
define void @Log2(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int X = 1;
  int Y = X - 2;
  printf("%d", Y + -2);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 -3)
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int lunghezza(char *str) { return strlen(str); }


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

x86 assembly (clang, -O2):
<lunghezza>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @lunghezza(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ skin_buffer_alloc(int);
char *skin_alloc_string(int length) {
  return (char *)skin_buffer_alloc(sizeof(char) * (length + 1));
}


x86 assembly (clang, -O0):
<skin_alloc_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <skin_buffer_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skin_alloc_string>:
add    $0x1,%edi
jmp    1030 <skin_buffer_alloc@plt>

LLVM IR (-O0):
define i8* @skin_alloc_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = sext i32 %4 to i64
%6 = mul i64 1, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @skin_buffer_alloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @skin_alloc_string(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i64 @skin_buffer_alloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ MTU2_ch0_clear();
int /*<<< orphan*/ MTU2_ch0_start();
int /*<<< orphan*/ MTU2_ch0_stop();
void MTU2_ch0_restart(void) {
  MTU2_ch0_stop();
  MTU2_ch0_clear();
  MTU2_ch0_start();
}


x86 assembly (clang, -O0):
<MTU2_ch0_restart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <MTU2_ch0_stop@plt>
mov    $0x0,%al
call   1040 <MTU2_ch0_clear@plt>
mov    $0x0,%al
call   1030 <MTU2_ch0_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MTU2_ch0_restart>:
push   %rax
xor    %eax,%eax
call   1050 <MTU2_ch0_stop@plt>
xor    %eax,%eax
call   1040 <MTU2_ch0_clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <MTU2_ch0_start@plt>

LLVM IR (-O0):
define void @MTU2_ch0_restart() {
%1 = call i32 (...) @MTU2_ch0_stop()
%2 = call i32 (...) @MTU2_ch0_clear()
%3 = call i32 (...) @MTU2_ch0_start()
ret void
}

LLVM IR (-O2):
define void @MTU2_ch0_restart() {
%1 = tail call i32 (...) @MTU2_ch0_stop()
%2 = tail call i32 (...) @MTU2_ch0_clear()
%3 = tail call i32 (...) @MTU2_ch0_start()
ret void
}
void gtk_button_enter() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_enter() {
ret void
}
void g_unichar_isxdigit() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_isxdigit() {
ret void
}
void ISRUART_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ISRUART_Interrupt() {
ret void
}
/* Variables and functions */
double GetMoistAirEnthalpy(double, int /*<<< orphan*/);
int /*<<< orphan*/ GetSatHumRatio(double, double);
double GetSatAirEnthalpy(double TDryBulb, double Pressure) {
  return GetMoistAirEnthalpy(TDryBulb, GetSatHumRatio(TDryBulb, Pressure));
}


x86 assembly (clang, -O0):
<GetSatAirEnthalpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <GetSatHumRatio@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%edi
call   1040 <GetMoistAirEnthalpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSatAirEnthalpy>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <GetSatHumRatio@plt>
movsd  (%rsp),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1040 <GetMoistAirEnthalpy@plt>

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

LLVM IR (-O2):
define double @GetSatAirEnthalpy(double %0, double %1) {
%3 = tail call i32 @GetSatHumRatio(double %0, double %1)
%4 = tail call double @GetMoistAirEnthalpy(double %0, i32 %3)
ret double %4
}
int DummySymbol() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DummySymbol() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t ev3_color_sensor_get_reflect(int32_t port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_color_sensor_get_reflect(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

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


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

x86 assembly (clang, -O2):
<s20_rev_littleendian>:
mov    %esi,(%rdi)
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
mov    %eax,0x8(%rdi)
sar    $0x18,%esi
mov    %esi,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @s20_rev_littleendian(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
%3 = ashr i32 %1, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
%5 = ashr i32 %1, 16
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %5, i32* %6
%7 = ashr i32 %1, 24
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %7, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void PrintArgs(char *name) {
  fprintf(stderr,
          "                                                   \n"
          "Usage: %s [max] < input > output                   \n"
          "                                                   \n"
          "It analyses the minimal scores of a FASTQ file.    \n"
          "max stands for the lenght of the maximum window.   \n",
          name);
}


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

x86 assembly (clang, -O2):
<PrintArgs>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [261 x i8] c" \0AUsage: %s [max] < input > output \0A \0AIt analyses the minimal scores of a FASTQ file. \0Amax stands for the lenght of the maximum window. \0A\00"
define void @PrintArgs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [261 x i8] c" \0AUsage: %s [max] < input > output \0A \0AIt analyses the minimal scores of a FASTQ file. \0Amax stands for the lenght of the maximum window. \0A\00"
define void @PrintArgs(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char dtlk_write_tts(char);
char dtlk_write_bytes(char const *buf___0, int n) {
  char val;
  char const *tmp;
  int tmp___0;
  {
    val = (char)0;
    while (1) {
      tmp___0 = n;
      n--;
      if (!(tmp___0 > 0)) {
        break;
      }
      tmp = buf___0;
      buf___0++;
      val = dtlk_write_tts((char)*tmp);
    }
    return (val);
  }
}


x86 assembly (clang, -O0):
<dtlk_write_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movb   $0x0,-0xd(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jg     1141 <dtlk_write_bytes+0x31>
jmp    1169 <dtlk_write_bytes+0x59>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <dtlk_write_tts@plt>
mov    %al,-0xd(%rbp)
jmp    1123 <dtlk_write_bytes+0x13>
movsbl -0xd(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtlk_write_bytes>:
test   %esi,%esi
jle    113b <dtlk_write_bytes+0x2b>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
nop
movsbl (%rbx),%edi
add    $0x1,%rbx
call   1030 <dtlk_write_tts@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1120 <dtlk_write_bytes+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @dtlk_write_bytes(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8 0, i8* %5
br label %8
8: ; preds = %2, %15
%9 = load i32, i32* %4
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = add nsw i32 %10, -1
store i32 %11, i32* %4
%12 = load i32, i32* %7
%13 = icmp sgt i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %8
br label %22
15: ; preds = %8
%16 = load i8*, i8** %3
store i8* %16, i8** %6
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
%19 = load i8*, i8** %6
%20 = load i8, i8* %19
%21 = call signext i8 @dtlk_write_tts(i8 signext %20)
store i8 %21, i8* %5
br label %8
22: ; preds = %14
%23 = load i8, i8* %5
ret i8 %23
}

LLVM IR (-O2):
define signext i8 @dtlk_write_bytes(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = tail call signext i8 @dtlk_write_tts(i8 signext %9)
%11 = icmp ugt i32 %6, 1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
%13 = phi i8 [ 0, %2 ], [ %10, %4 ]
ret i8 %13
}
/* Variables and functions */
int /*<<< orphan*/ my_put_nbr_disp(int);
int /*<<< orphan*/ my_putchar(char);
int my_put_nbr(int nb) {
  if (nb < 0) {
    my_putchar('-');
  } else {
    nb = -nb;
  }
  my_put_nbr_disp(nb);
}


x86 assembly (clang, -O0):
<my_put_nbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1144 <my_put_nbr+0x24>
mov    $0x2d,%edi
call   1040 <my_putchar@plt>
jmp    114c <my_put_nbr+0x2c>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <my_put_nbr_disp@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_put_nbr>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
js     112b <my_put_nbr+0xb>
neg    %ebx
jmp    1135 <my_put_nbr+0x15>
mov    $0x2d,%edi
call   1040 <my_putchar@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <my_put_nbr_disp@plt>

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

LLVM IR (-O2):
define i32 @my_put_nbr(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @my_putchar(i8 signext 45)
br label %7
5: ; preds = %1
%6 = sub nsw i32 0, %0
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %0, %3 ], [ %6, %5 ]
%9 = tail call i32 @my_put_nbr_disp(i32 %8)
ret i32 undef
}