xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ deserialize_int32(unsigned char *);
int /*<<< orphan*/ strslice(unsigned char *, unsigned char *, int, int);
int get_encoded_dynmessage_length(unsigned char *data, int data_len) {
  int encoded_dynmessage_length = 0;
  if (data != NULL && data_len >= 8) {
    unsigned char buffer[4];
    strslice(buffer, data, 4, 4);
    encoded_dynmessage_length = (int)deserialize_int32(buffer);
  }
  return encoded_dynmessage_length;
}


x86 assembly (clang, -O0):
<get_encoded_dynmessage_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116b <get_encoded_dynmessage_length+0x4b>
cmpl   $0x8,-0xc(%rbp)
jl     116b <get_encoded_dynmessage_length+0x4b>
lea    -0x14(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1040 <strslice@plt>
lea    -0x14(%rbp),%rdi
call   1030 <deserialize_int32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_encoded_dynmessage_length>:
xor    %eax,%eax
test   %rdi,%rdi
je     115b <get_encoded_dynmessage_length+0x3b>
cmp    $0x8,%esi
jl     115b <get_encoded_dynmessage_length+0x3b>
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    %rcx,%rsi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1040 <strslice@plt>
mov    %rbx,%rdi
call   1030 <deserialize_int32@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_encoded_dynmessage_length(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca [4 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp sge i32 %10, 8
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = call i32 @strslice(i8* %13, i8* %14, i32 4, i32 4)
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%17 = call i64 @deserialize_int32(i8* %16)
%18 = trunc i64 %17 to i32
store i32 %18, i32* %5
br label %19
19: ; preds = %12, %9, %2
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @get_encoded_dynmessage_length(i8* %0, i32 %1) {
%3 = alloca [4 x i8]
%4 = icmp ne i8* %0, null
%5 = icmp sgt i32 %1, 7
%6 = and i1 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%9 = call i32 @strslice(i8* %8, i8* %0, i32 4, i32 4)
%10 = call i64 @deserialize_int32(i8* %8)
%11 = trunc i64 %10 to i32
br label %12
12: ; preds = %7, %2
%13 = phi i32 [ %11, %7 ], [ 0, %2 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
int /*<<< orphan*/ stderr;
void check(int boolean, char *boolstr, char *file, int line) {
  if (!boolean) {
    fprintf(stderr, "ERROR: %s failed in line %d of file %s\n", boolstr, line,
            file);
  } else {
    fprintf(stderr, "%s succeeded in line %d of file %s\n", boolstr, line,
            file);
  }
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1155 <check+0x45>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1175 <check+0x65>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
mov    %rdx,%r8
mov    %rsi,%rdx
test   %edi,%edi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rax
lea    0xef9(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"ERROR: %s failed in line %d of file %s\0A\00"
@.str.1 = [36 x i8] c"%s succeeded in line %d of file %s\0A\00"
define void @check(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %4
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %6
%14 = load i32, i32* %8
%15 = load i8*, i8** %7
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i8* %15)
br label %23
17: ; preds = %4
%18 = load i32, i32* @stderr
%19 = load i8*, i8** %6
%20 = load i32, i32* %8
%21 = load i8*, i8** %7
%22 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %19, i32 %20, i8* %21)
br label %23
23: ; preds = %17, %11
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"ERROR: %s failed in line %d of file %s\0A\00"
@.str.1 = [36 x i8] c"%s succeeded in line %d of file %s\0A\00"
define void @check(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
%6 = load i32, i32* @stderr
%7 = select i1 %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @fprintf(i32 %6, i8* %7, i8* %1, i32 %3, i8* %2)
ret void
}
void gtk_accel_label_set_accel_closure() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_label_set_accel_closure() {
ret void
}
void *gethostent() { return 0; }


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

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

LLVM IR (-O0):
define i8* @gethostent() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @gethostent() {
ret i8* null
}
int ft_isspace(char c) {
  return (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' ||
          c == ' ');
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
lea    -0x9(%rdi),%eax
cmp    $0x5,%al
setb   %al
cmp    $0x20,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isspace(i8 signext %0) {
%2 = add i8 %0, -9
%3 = icmp ult i8 %2, 5
%4 = icmp eq i8 %0, 32
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int min_terms(int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int table[1000] = {0};
  int res = min_terms(121, 0, table);
  printf("Min perfet square terms reqiured are %d", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfb0,%rsp
lea    -0xfa0(%rbp),%rdi
xor    %esi,%esi
mov    $0xfa0,%edx
call   1040 <memset@plt>
lea    -0xfa0(%rbp),%rdx
mov    $0x79,%edi
xor    %esi,%esi
call   1050 <min_terms@plt>
mov    %eax,-0xfa4(%rbp)
mov    -0xfa4(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
add    $0xfb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xfa0,%rsp
mov    %rsp,%rbx
mov    $0xfa0,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    $0x79,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1050 <min_terms@plt>
lea    0xea0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0xfa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Min perfet square terms reqiured are %d\00"
define void @main() {
%1 = alloca [1000 x i32]
%2 = alloca i32
%3 = bitcast [1000 x i32]* %1 to i8*
%4 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 0
%5 = call i32 @min_terms(i32 121, i32 0, i32* %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Min perfet square terms reqiured are %d\00"
define void @main() {
%1 = alloca [1000 x i32]
%2 = bitcast [1000 x i32]* %1 to i8*
%3 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 0
%4 = call i32 @min_terms(i32 121, i32 0, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Type definitions */
struct ac_buffer {
  int dummy;
};
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int _buffer_read_array(struct ac_buffer *, int /*<<< orphan*/ *, int *, int);
int buffer_read_short_array(struct ac_buffer *buffer, int16_t *value,
                            int *size) {
  return _buffer_read_array(buffer, value, size, sizeof(short));
}


x86 assembly (clang, -O0):
<buffer_read_short_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x2,%ecx
call   1030 <_buffer_read_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_read_short_array>:
mov    $0x2,%ecx
jmp    1030 <_buffer_read_array@plt>

LLVM IR (-O0):
%struct.ac_buffer = type { i32 }
define i32 @buffer_read_short_array(%struct.ac_buffer* %0, i32* %1, i32* %2) {
%4 = alloca %struct.ac_buffer*
%5 = alloca i32*
%6 = alloca i32*
store %struct.ac_buffer* %0, %struct.ac_buffer** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load %struct.ac_buffer*, %struct.ac_buffer** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @_buffer_read_array(%struct.ac_buffer* %7, i32* %8, i32* %9, i32 2)
ret i32 %10
}

LLVM IR (-O2):
%struct.ac_buffer = type { i32 }
define i32 @buffer_read_short_array(%struct.ac_buffer* %0, i32* %1, i32* %2) {
%4 = tail call i32 @_buffer_read_array(%struct.ac_buffer* %0, i32* %1, i32* %2, i32 2)
ret i32 %4
}
int mylock(int fd) {
  int rc;
  return rc;
}


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

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

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

LLVM IR (-O2):
define i32 @mylock(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ init_audio();
int /*<<< orphan*/ init_video_input();
void init_drivers(void) {
  init_video_input();
  init_audio();
}


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

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

LLVM IR (-O0):
define void @init_drivers() {
%1 = call i32 (...) @init_video_input()
%2 = call i32 (...) @init_audio()
ret void
}

LLVM IR (-O2):
define void @init_drivers() {
%1 = tail call i32 (...) @init_video_input()
%2 = tail call i32 (...) @init_audio()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char *s = "hello"
            ", my";
  printf("%s\n", s);
  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    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"hello, my\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int popcnt(unsigned int);
__attribute__((const)) unsigned nlz(unsigned x) {
  x |= x >> 1;
  x |= x >> 2;
  x |= x >> 4;
  x |= x >> 8;
  x |= x >> 16;
  return popcnt(~x);
}


x86 assembly (clang, -O0):
<nlz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
call   1030 <popcnt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlz>:
mov    %edi,%eax
shr    %eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x10,%eax
or     %eax,%edi
not    %edi
jmp    1030 <popcnt@plt>

LLVM IR (-O0):
define i32 @nlz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = xor i32 %23, -1
%25 = call i32 @popcnt(i32 %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @nlz(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 16
%11 = or i32 %10, %9
%12 = xor i32 %11, -1
%13 = tail call i32 @popcnt(i32 %12)
ret i32 %13
}
void GENERAL_NAME_new(void) {}


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

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

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

LLVM IR (-O2):
define void @GENERAL_NAME_new() {
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn27() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn27");
  return result;
}


x86 assembly (clang, -O0):
<fn27>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn27>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn27\00"
define i8* @fn27() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn27\00"
define i8* @fn27() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int is_file_name_changed(const char old[], const char new[]) {
  return (new[0] != '\0' && strcmp(old, new) != 0);
}


x86 assembly (clang, -O0):
<is_file_name_changed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     114c <is_file_name_changed+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file_name_changed>:
push   %rax
cmpb   $0x0,(%rsi)
je     1128 <is_file_name_changed+0x18>
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_file_name_changed(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i64 @strcmp(i8* %11, i8* %12)
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %10, %2
%16 = phi i1 [ false, %2 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_file_name_changed(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @strcmp(i8* %0, i8* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
void f4(void *x __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @f4(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void volatile_store_u16(volatile uint16_t *dest, uint16_t val) { *dest = val; }


x86 assembly (clang, -O0):
<volatile_store_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @volatile_store_u16(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
store volatile i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @volatile_store_u16(i32* %0, i32 %1) {
store volatile i32 %1, i32* %0
ret void
}
void message(s) char *s;
{ printf("\t%s\n", s); }


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

x86 assembly (clang, -O2):
<message>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\09%s\0A\00"
define void @message(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x35() {
  Assert_real((isascii(53)),
              "/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_isascii.c",
              270, ("isascii should be 1 for 5"));
}


x86 assembly (clang, -O0):
<t_isascii_0x35>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x10e,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x35>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x10e,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for 5\00"
define void @t_isascii_0x35() {
%1 = call i32 @isascii(i32 53)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for 5\00"
define void @t_isascii_0x35() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int Operand_xt_wbr15_label_rtoa(unsigned int *valp, unsigned int pc) {
  *valp += pc;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_xt_wbr15_label_rtoa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_xt_wbr15_label_rtoa>:
add    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_xt_wbr15_label_rtoa(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 = load i32, i32* %6
%8 = add i32 %7, %5
store i32 %8, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_xt_wbr15_label_rtoa(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, %1
store i32 %4, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int err_exit(char *err_message, char *func_name) {
  printf("\nERROR in matrixlib:\n\t %s", err_message);
  printf("\n(in function %s)", func_name);
  printf("\nExiting program\n");
  exit(0);
}


x86 assembly (clang, -O0):
<err_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_exit>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0AERROR in matrixlib:\0A\09 %s\00"
@.str.1 = [18 x i8] c"\0A(in function %s)\00"
@.str.2 = [18 x i8] c"\0AExiting program\0A\00"
define i32 @err_exit(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 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AERROR in matrixlib:\0A\09 %s\00"
@.str.1 = [18 x i8] c"\0A(in function %s)\00"
@str = [17 x i8] c"\0AExiting program\00"
define i32 @err_exit(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int evaluate_postfix(char *);
void test_multiplication() { assert(evaluate_postfix("3 4 *") == 12); }


x86 assembly (clang, -O0):
<test_multiplication>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <evaluate_postfix@plt>
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multiplication>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <evaluate_postfix@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"3 4 *\00"
define void @test_multiplication() {
%1 = call i32 @evaluate_postfix(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"3 4 *\00"
define void @test_multiplication() {
%1 = tail call i32 @evaluate_postfix(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printEqualSign();
int /*<<< orphan*/ prnt(char const *);
int /*<<< orphan*/ spaces();
void printS(const char *s, char *t) {
  prnt(s);
  printEqualSign();
  prnt(t);
  spaces();
}


x86 assembly (clang, -O0):
<printS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <prnt@plt>
mov    $0x0,%al
call   1050 <printEqualSign@plt>
mov    -0x10(%rbp),%rdi
call   1030 <prnt@plt>
mov    $0x0,%al
call   1040 <spaces@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printS>:
push   %rbx
mov    %rsi,%rbx
call   1030 <prnt@plt>
xor    %eax,%eax
call   1050 <printEqualSign@plt>
mov    %rbx,%rdi
call   1030 <prnt@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <spaces@plt>

LLVM IR (-O0):
define void @printS(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 @prnt(i8* %5)
%7 = call i32 (...) @printEqualSign()
%8 = load i8*, i8** %4
%9 = call i32 @prnt(i8* %8)
%10 = call i32 (...) @spaces()
ret void
}

LLVM IR (-O2):
define void @printS(i8* %0, i8* %1) {
%3 = tail call i32 @prnt(i8* %0)
%4 = tail call i32 (...) @printEqualSign()
%5 = tail call i32 @prnt(i8* %1)
%6 = tail call i32 (...) @spaces()
ret void
}
void arch_execute(void *sp, void *func, void *arg) {
  asm volatile("movq %2, %%rdi;"
               "movq %1, 0(%0);"
               "movq %0, %%rsp;"
               "call *0(%%rsp);"
               : "+r"(sp), "+r"(func), "+r"(arg)
               :
               : "memory");
}


x86 assembly (clang, -O0):
<arch_execute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rax,%rdi
mov    %rcx,(%rdx)
mov    %rdx,%rsp
call   *(%rsp)
mov    %rdx,-0x8(%rbp)
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_execute>:
mov    %rdx,%rdi
mov    %rsi,(%rdi)
mov    %rdi,%rsp
call   *(%rsp)
ret

LLVM IR (-O0):
define void @arch_execute(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call { i8*, i8*, i8* } asm sideeffect "movq $2, %rdi;movq $1, 0($0);movq $0, %rsp;call *0(%rsp);", "=r,=r,=r,0,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %7, i8* %8, i8* %9)
%11 = extractvalue { i8*, i8*, i8* } %10, 0
%12 = extractvalue { i8*, i8*, i8* } %10, 1
%13 = extractvalue { i8*, i8*, i8* } %10, 2
store i8* %11, i8** %4
store i8* %12, i8** %5
store i8* %13, i8** %6
ret void
}

LLVM IR (-O2):
define void @arch_execute(i8* %0, i8* %1, i8* %2) {
%4 = tail call { i8*, i8*, i8* } asm sideeffect "movq $2, %rdi;movq $1, 0($0);movq $0, %rsp;call *0(%rsp);", "=r,=r,=r,0,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8* %1, i8* %2)
ret void
}
/* Type definitions */
typedef double clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
double timediff(clock_t s, clock_t e) {
  return ((e - s) * 1.0) / CLOCKS_PER_SEC;
}


x86 assembly (clang, -O0):
<timediff>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2ebd(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<timediff>:
subsd  %xmm0,%xmm1
mov    0x2edd(%rip),%rax
divsd  (%rax),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @timediff(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double %5, %6
%8 = fmul double %7, 1.000000e+00
%9 = load double, double* @CLOCKS_PER_SEC
%10 = fdiv double %8, %9
ret double %10
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define double @timediff(double %0, double %1) {
%3 = fsub double %1, %0
%4 = load double, double* @CLOCKS_PER_SEC
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int convert();
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (convert() == -1)
    printf("fail to convert\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <convert@plt>
cmp    $0xffffffff,%eax
jne    114b <main+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <convert@plt>
cmp    $0xffffffff,%eax
jne    1139 <main+0x19>
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"fail to convert\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @convert()
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"fail to convert\00"
define i32 @main() {
%1 = tail call i32 (...) @convert()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ log_sense_data(int /*<<< orphan*/ *);
int /*<<< orphan*/ log_sense_data_len(int /*<<< orphan*/ *);
int safe_len(int /*<<< orphan*/ *, unsigned int, int /*<<< orphan*/,
             int /*<<< orphan*/);
uint8_t *log_sense_data_end(uint8_t *data, unsigned data_len) {
  return data + safe_len(data, data_len, log_sense_data(data),
                         log_sense_data_len(data));
}


x86 assembly (clang, -O0):
<log_sense_data_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <log_sense_data@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <log_sense_data_len@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
call   1050 <safe_len@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_sense_data_end>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <log_sense_data@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <log_sense_data_len@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1050 <safe_len@plt>
cltq
lea    (%rbx,%rax,4),%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32* @log_sense_data_end(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = load i32*, i32** %3
%9 = call i32 @log_sense_data(i32* %8)
%10 = load i32*, i32** %3
%11 = call i32 @log_sense_data_len(i32* %10)
%12 = call i32 @safe_len(i32* %6, i32 %7, i32 %9, i32 %11)
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %5, i64 %13
ret i32* %14
}

LLVM IR (-O2):
define i32* @log_sense_data_end(i32* %0, i32 %1) {
%3 = tail call i32 @log_sense_data(i32* %0)
%4 = tail call i32 @log_sense_data_len(i32* %0)
%5 = tail call i32 @safe_len(i32* %0, i32 %1, i32 %3, i32 %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_screen_refresh();
int /*<<< orphan*/ roadmap_trip_set_focus(char *);
void roadmap_start_show_destination(void) {
  roadmap_trip_set_focus("Destination");
  roadmap_screen_refresh();
}


x86 assembly (clang, -O0):
<roadmap_start_show_destination>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <roadmap_trip_set_focus@plt>
mov    $0x0,%al
call   1040 <roadmap_screen_refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_start_show_destination>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <roadmap_trip_set_focus@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <roadmap_screen_refresh@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Destination\00"
define void @roadmap_start_show_destination() {
%1 = call i32 @roadmap_trip_set_focus(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @roadmap_screen_refresh()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Destination\00"
define void @roadmap_start_show_destination() {
%1 = tail call i32 @roadmap_trip_set_focus(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @roadmap_screen_refresh()
ret void
}
/* Variables and functions */
int IINCHIP_READ(int);
int /*<<< orphan*/ WIZ_HW_RESET();
void iinchip_hw_init(void) {
  WIZ_HW_RESET();
  while (!(IINCHIP_READ(0x002e) & 0x01))
    ;
}


x86 assembly (clang, -O0):
<iinchip_hw_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <WIZ_HW_RESET@plt>
mov    $0x2e,%edi
call   1040 <IINCHIP_READ@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114d <iinchip_hw_init+0x2d>
jmp    1152 <iinchip_hw_init+0x32>
jmp    112b <iinchip_hw_init+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iinchip_hw_init>:
push   %rax
xor    %eax,%eax
call   1030 <WIZ_HW_RESET@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x2e,%edi
call   1040 <IINCHIP_READ@plt>
test   $0x1,%al
je     1130 <iinchip_hw_init+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @iinchip_hw_init() {
%1 = call i32 (...) @WIZ_HW_RESET()
br label %2
2: ; preds = %7, %0
%3 = call i32 @IINCHIP_READ(i32 46)
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %8
7: ; preds = %2
br label %2
8: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @iinchip_hw_init() {
%1 = tail call i32 (...) @WIZ_HW_RESET()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @IINCHIP_READ(i32 46)
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
double HPAtoINHG(double HPA) {
  double INHG = 0.0295300 * HPA;
  return INHG;
}


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

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

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

LLVM IR (-O2):
define double @HPAtoINHG(double %0) {
%2 = fmul double %0, 2.953000e-02
ret double %2
}
/* Variables and functions */
scalar_t__ isnan(double);
double nantozero(double x) { return isnan(x) ? 0 : x; }


x86 assembly (clang, -O0):
<nantozero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     113e <nantozero+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1148 <nantozero+0x38>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nantozero>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <isnan@plt>
movsd  (%rsp),%xmm0
test   %rax,%rax
je     1128 <nantozero+0x18>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @nantozero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @isnan(double %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = load double, double* %2
br label %9
9: ; preds = %7, %6
%10 = phi double [ 0.000000e+00, %6 ], [ %8, %7 ]
ret double %10
}

LLVM IR (-O2):
define double @nantozero(double %0) {
%2 = tail call i64 @isnan(double %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, double %0, double 0.000000e+00
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ call_module(char *);
int /*<<< orphan*/ pod_module(char *, float, float);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
void pod(float length, float r) {
  static int modnum = 0;
  char modname[30];
  sprintf(modname, "pod_%d", modnum++);
  pod_module(modname, length, r);
  call_module(modname);
}


x86 assembly (clang, -O0):
<pod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    0x2ef0(%rip),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,0x2ee5(%rip)
lea    0xea2(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x30(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <pod_module@plt>
lea    -0x30(%rbp),%rdi
call   1030 <call_module@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pod>:
push   %rbx
sub    $0x30,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
mov    0x2ef5(%rip),%edx
lea    0x1(%rdx),%eax
mov    %eax,0x2eec(%rip)
lea    0xea9(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <pod_module@plt>
mov    %rbx,%rdi
call   1030 <call_module@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@pod.modnum = internal global i32 0
@.str = [7 x i8] c"pod_%d\00"
define void @pod(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca [30 x i8]
store float %0, float* %3
store float %1, float* %4
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* @pod.modnum
%8 = add nsw i32 %7, 1
store i32 %8, i32* @pod.modnum
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7)
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%11 = load float, float* %3
%12 = load float, float* %4
%13 = call i32 @pod_module(i8* %10, float %11, float %12)
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%15 = call i32 @call_module(i8* %14)
ret void
}

LLVM IR (-O2):
@pod.modnum = internal unnamed_addr global i32 0
@.str = [7 x i8] c"pod_%d\00"
define void @pod(float %0, float %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @pod.modnum
%6 = add nsw i32 %5, 1
store i32 %6, i32* @pod.modnum
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
%8 = call i32 @pod_module(i8* %4, float %0, float %1)
%9 = call i32 @call_module(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stdout;
void cutils_cout_unsigned_int_print(unsigned int number) {
  fprintf(stdout, "%uu\n", number);
}


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

x86 assembly (clang, -O2):
<cutils_cout_unsigned_int_print>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"%uu\0A\00"
define void @cutils_cout_unsigned_int_print(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void Msp430TimerCapComP__8__Timer__overflow(void) {}


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

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

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

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