xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prog) {
  fprintf(stderr, "%s:  in1 [in2 ... ]  out\n", prog);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"%s: in1 [in2 ... ] out\0A\00"
define void @usage(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 ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"%s: in1 [in2 ... ] out\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int update_directory(const wchar_t *dirname) {
  int ok = 0;
  return ok;
}


x86 assembly (clang, -O0):
<update_directory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @update_directory(i32* nocapture readnone %0) {
ret i32 0
}
unsigned int bi_reverse(unsigned int code, int len) {
  unsigned int __retres;
  register unsigned int res;
  res = (unsigned int)0;
  while (1) {
    res |= code & (unsigned int)1;
    code >>= 1;
    res <<= 1;
    len--;
    if (!(len > 0))
      break;
  }
  __retres = res >> 1;
  return __retres;
}


x86 assembly (clang, -O0):
<bi_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1147 <bi_reverse+0x47>
jmp    114c <bi_reverse+0x4c>
jmp    1111 <bi_reverse+0x11>
mov    -0x10(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_reverse>:
add    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
and    $0x1,%eax
or     %ecx,%eax
shr    %edi
lea    (%rax,%rax,1),%ecx
add    $0xffffffff,%esi
cmp    $0x1,%esi
jg     1110 <bi_reverse+0x10>
and    $0x7fffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @bi_reverse(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %11, %3 ]
%5 = phi i32 [ %0, %2 ], [ %9, %3 ]
%6 = phi i32 [ 0, %2 ], [ %10, %3 ]
%7 = and i32 %5, 1
%8 = or i32 %6, %7
%9 = lshr i32 %5, 1
%10 = shl i32 %8, 1
%11 = add nsw i32 %4, -1
%12 = icmp sgt i32 %4, 1
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = and i32 %8, 2147483647
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ out8(int, int);
void init_serial(void) {
  out8((0x3F8 + 3), (1 << 7) | 3);
  out8((0x3F8 + 0), 0x000C & 0xFF);
  out8((0x3F8 + 1), (0x000C >> 8) & 0xFF);
  out8((0x3F8 + 3), 3);
  out8((0x3F8 + 1), 0);
}


x86 assembly (clang, -O0):
<init_serial>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fb,%edi
mov    $0x83,%esi
call   1030 <out8@plt>
mov    $0x3f8,%edi
mov    $0xc,%esi
call   1030 <out8@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <out8@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <out8@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <out8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_serial>:
push   %rax
mov    $0x3fb,%edi
mov    $0x83,%esi
call   1030 <out8@plt>
mov    $0x3f8,%edi
mov    $0xc,%esi
call   1030 <out8@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <out8@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <out8@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <out8@plt>

LLVM IR (-O0):
define void @init_serial() {
%1 = call i32 @out8(i32 1019, i32 131)
%2 = call i32 @out8(i32 1016, i32 12)
%3 = call i32 @out8(i32 1017, i32 0)
%4 = call i32 @out8(i32 1019, i32 3)
%5 = call i32 @out8(i32 1017, i32 0)
ret void
}

LLVM IR (-O2):
define void @init_serial() {
%1 = tail call i32 @out8(i32 1019, i32 131)
%2 = tail call i32 @out8(i32 1016, i32 12)
%3 = tail call i32 @out8(i32 1017, i32 0)
%4 = tail call i32 @out8(i32 1019, i32 3)
%5 = tail call i32 @out8(i32 1017, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
char *bdevname(int /*<<< orphan*/);
int /*<<< orphan*/ name_to_dev_t_real(char const *);
int /*<<< orphan*/ printf(char *, char const *, char *);
dev_t name_to_dev_t(const char *name) {
  dev_t dev = name_to_dev_t_real(name);
  printf("kinit: name_to_dev_t(%s) = %s\n", name, bdevname(dev));
  return dev;
}


x86 assembly (clang, -O0):
<name_to_dev_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <name_to_dev_t_real@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <bdevname@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_to_dev_t>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <name_to_dev_t_real@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1040 <bdevname@plt>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1050 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [31 x i8] c"kinit: name_to_dev_t(%s) = %s\0A\00"
define i32 @name_to_dev_t(i8* %0) {
%2 = tail call i32 @name_to_dev_t_real(i8* %0)
%3 = tail call i8* @bdevname(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ what;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int /*<<< orphan*/ *, int);
void put16(char *where, uint16_t what) { memcpy(where, &what, sizeof(what)); }


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

x86 assembly (clang, -O2):
<put16>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @put16(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
unsigned short app_usb_file_copy(char *, char *, unsigned short,
                                 unsigned short);
unsigned short Usb_copy(char *srcfile, char *dstfile, unsigned short src_index,
                        unsigned short dst_index) {
  return app_usb_file_copy(srcfile, dstfile, src_index, dst_index);
}


x86 assembly (clang, -O0):
<Usb_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x12(%rbp),%ax
movzwl %ax,%edx
movzwl -0x14(%rbp),%ecx
call   1030 <app_usb_file_copy@plt>
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usb_copy>:
jmp    1030 <app_usb_file_copy@plt>

LLVM IR (-O0):
define zeroext i16 @Usb_copy(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i16
%8 = alloca i16
store i8* %0, i8** %5
store i8* %1, i8** %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i16, i16* %7
%12 = load i16, i16* %8
%13 = call zeroext i16 @app_usb_file_copy(i8* %9, i8* %10, i16 zeroext %11, i16 zeroext %12)
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @Usb_copy(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3) {
%5 = tail call zeroext i16 @app_usb_file_copy(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3)
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ opch32(int /*<<< orphan*/);
void opstr32(const char *s) {
  while (*s)
    opch32(*s++);
}


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

x86 assembly (clang, -O2):
<opstr32>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <opstr32+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <opch32@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <opstr32+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @opstr32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @opch32(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int _write(int fd, char *ptr, int len) { return len; }


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture readnone %1, i32 returned %2) {
ret i32 %2
}
/* Type definitions */
struct bitpack__clump {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int decode_big_endian(char *source, struct bitpack__clump *target) {
  printf("Not implemented");
  return -1;
}


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

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

LLVM IR (-O0):
%struct.bitpack__clump = type { i32 }
@.str = [16 x i8] c"Not implemented\00"
define i32 @decode_big_endian(i8* %0, %struct.bitpack__clump* %1) {
%3 = alloca i8*
%4 = alloca %struct.bitpack__clump*
store i8* %0, i8** %3
store %struct.bitpack__clump* %1, %struct.bitpack__clump** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.bitpack__clump = type { i32 }
@.str = [16 x i8] c"Not implemented\00"
define i32 @decode_big_endian(i8* nocapture readnone %0, %struct.bitpack__clump* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ print_msg(char *);
extern void tswrite_help_debug(void) {
  print_msg(
      "Debugging:\n"
      "  -pdebug           Output debugging messages for the parent process\n"
      "  -pdebug2          Output debugging messages for the parent process\n"
      "                    (report on times intermediate between PCRs)\n"
      "  -cdebug           Output debugging messages for the child process\n"
      "  -visual           Output a visual representation of how the\n"
      "                    internal cicular buffer works. It is recommended\n"
      "                    that this is done with small datasets and low\n"
      "                    (e.g., 10) values for the circular buffer size\n");
}


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

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

LLVM IR (-O0):
@.str = [546 x i8] c"Debugging:\0A -pdebug Output debugging messages for the parent process\0A -pdebug2 Output debugging messages for the parent process\0A (report on times intermediate between PCRs)\0A -cdebug Output debugging messages for the child process\0A -visual Output a visual representation of how the\0A internal cicular buffer works. It is recommended\0A that this is done with small datasets and low\0A (e.g., 10) values for the circular buffer size\0A\00"
define void @tswrite_help_debug() {
%1 = call i32 @print_msg(i8* getelementptr inbounds ([546 x i8], [546 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [546 x i8] c"Debugging:\0A -pdebug Output debugging messages for the parent process\0A -pdebug2 Output debugging messages for the parent process\0A (report on times intermediate between PCRs)\0A -cdebug Output debugging messages for the child process\0A -visual Output a visual representation of how the\0A internal cicular buffer works. It is recommended\0A that this is done with small datasets and low\0A (e.g., 10) values for the circular buffer size\0A\00"
define void @tswrite_help_debug() {
%1 = tail call i32 @print_msg(i8* getelementptr inbounds ([546 x i8], [546 x i8]* @.str, i64 0, i64 0))
ret void
}
int less(int A, int B) { return A < B; }


x86 assembly (clang, -O0):
<less>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<less>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @less(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* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @less(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void omap4_prm_base_init(void) {}


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

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

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

LLVM IR (-O2):
define void @omap4_prm_base_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __iar_program_start();
void ResetISR(void) { __iar_program_start(); }


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

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

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

LLVM IR (-O2):
define void @ResetISR() {
%1 = tail call i32 (...) @__iar_program_start()
ret void
}
int do_346() { return 346; }


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

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

LLVM IR (-O0):
define i32 @do_346() {
ret i32 346
}

LLVM IR (-O2):
define i32 @do_346() {
ret i32 346
}
int fun837() { return 837; }


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

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

LLVM IR (-O0):
define i32 @fun837() {
ret i32 837
}

LLVM IR (-O2):
define i32 @fun837() {
ret i32 837
}
void mem_put_le32_as_int(void *vmem, int val) {
  unsigned char *mem = (unsigned char *)vmem;
  mem[0] = (unsigned char)((val >> 0) & 0xff);
  mem[1] = (unsigned char)((val >> 8) & 0xff);
  mem[2] = (unsigned char)((val >> 16) & 0xff);
  mem[3] = (unsigned char)((val >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<mem_put_le32_as_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mem_put_le32_as_int(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
double power(double x, int n) {
  double y = 1;
  while (n != 0) {
    y *= x;
    n--;
  }
  return y;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1140 <power+0x40>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <power+0x19>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %edi,%edi
je     116a <power+0x6a>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
je     1173 <power+0x73>
xor    %edx,%edx
movsd  0xee8(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
mulsd  %xmm0,%xmm1
add    $0x1,%edx
cmp    %edx,%ecx
jne    1120 <power+0x20>
sub    %edx,%edi
cmp    $0x7,%eax
jb     1165 <power+0x65>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1140 <power+0x40>
movapd %xmm1,%xmm0
ret
movsd  0xe8e(%rip),%xmm0
ret
movsd  0xe85(%rip),%xmm1
cmp    $0x7,%eax
jae    1140 <power+0x40>
jmp    1165 <power+0x65>

LLVM IR (-O0):
define double @power(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %5
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load double, double* %3
%11 = load double, double* %5
%12 = fmul double %11, %10
store double %12, double* %5
%13 = load i32, i32* %4
%14 = add nsw i32 %13, -1
store i32 %14, i32* %4
br label %6
15: ; preds = %6
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @power(double %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %34, label %4
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4, %8
%9 = phi double [ %12, %8 ], [ 1.000000e+00, %4 ]
%10 = phi i32 [ %13, %8 ], [ %1, %4 ]
%11 = phi i32 [ %14, %8 ], [ 0, %4 ]
%12 = fmul double %9, %0
%13 = add nsw i32 %10, -1
%14 = add i32 %11, 1
%15 = icmp eq i32 %14, %6
br i1 %15, label %16, label %8
16: ; preds = %8, %4
%17 = phi double [ undef, %4 ], [ %12, %8 ]
%18 = phi double [ 1.000000e+00, %4 ], [ %12, %8 ]
%19 = phi i32 [ %1, %4 ], [ %13, %8 ]
%20 = icmp ult i32 %5, 7
br i1 %20, label %34, label %21
21: ; preds = %16, %21
%22 = phi double [ %31, %21 ], [ %18, %16 ]
%23 = phi i32 [ %32, %21 ], [ %19, %16 ]
%24 = fmul double %22, %0
%25 = fmul double %24, %0
%26 = fmul double %25, %0
%27 = fmul double %26, %0
%28 = fmul double %27, %0
%29 = fmul double %28, %0
%30 = fmul double %29, %0
%31 = fmul double %30, %0
%32 = add nsw i32 %23, -8
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %21
34: ; preds = %16, %21, %2
%35 = phi double [ 1.000000e+00, %2 ], [ %17, %16 ], [ %31, %21 ]
ret double %35
}
void gtk_menu_set_title() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_set_title() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x1f() {
  Assert_real((isgraph(31) == 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_isgraph.c",
              160, ("isgraph should be 0 for 0x1f"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x1f>:
push   %rax
mov    $0x1f,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa0,%edx
pop    %rax
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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1f\00"
define void @t_isgraph_0x1f() {
%1 = call i64 @isgraph(i32 31)
%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 160, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1f\00"
define void @t_isgraph_0x1f() {
%1 = tail call i64 @isgraph(i32 31)
%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 160, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
uint8_t load8(const void *in) {
  uint8_t v;
  memcpy(&v, in, sizeof v);
  return v;
}


x86 assembly (clang, -O0):
<load8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load8>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @load8(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
int min_heap_heapify(int *list[]) {}


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

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

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

LLVM IR (-O2):
define i32 @min_heap_heapify(i32** nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
double cdfpe3_(double *, double *);
double ccdfpe3(double *x, double *para) { return cdfpe3_(x, para); }


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

x86 assembly (clang, -O2):
<ccdfpe3>:
jmp    1030 <cdfpe3_@plt>

LLVM IR (-O0):
define double @ccdfpe3(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** %4
%7 = call double @cdfpe3_(double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @ccdfpe3(double* %0, double* %1) {
%3 = tail call double @cdfpe3_(double* %0, double* %1)
ret double %3
}
int ee_skip_atoi(const char **s) {
  int i = 0;
  while (((**s) >= '0' && (**s) <= '9'))
    i = i * 10 + *((*s)++) - '0';
  return i;
}


x86 assembly (clang, -O0):
<ee_skip_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     113a <ee_skip_atoi+0x3a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114a <ee_skip_atoi+0x4a>
jmp    116f <ee_skip_atoi+0x6f>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ee_skip_atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ee_skip_atoi>:
mov    (%rdi),%rcx
mov    (%rcx),%dl
add    $0xd0,%dl
xor    %eax,%eax
cmp    $0x9,%dl
ja     113f <ee_skip_atoi+0x3f>
add    $0x1,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rax,%rax,4),%eax
mov    %rcx,(%rdi)
movsbl -0x1(%rcx),%edx
lea    (%rdx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rcx),%edx
add    $0xd0,%dl
add    $0x1,%rcx
cmp    $0xa,%dl
jb     1120 <ee_skip_atoi+0x20>
ret

LLVM IR (-O0):
define i32 @ee_skip_atoi(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 48
br i1 %9, label %10, label %16
10: ; preds = %4
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp sle i32 %14, 57
br label %16
16: ; preds = %10, %4
%17 = phi i1 [ false, %4 ], [ %15, %10 ]
br i1 %17, label %18, label %28
18: ; preds = %16
%19 = load i32, i32* %3
%20 = mul nsw i32 %19, 10
%21 = load i8**, i8*** %2
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %21
%24 = load i8, i8* %22
%25 = sext i8 %24 to i32
%26 = add nsw i32 %20, %25
%27 = sub nsw i32 %26, 48
store i32 %27, i32* %3
br label %4
28: ; preds = %16
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @ee_skip_atoi(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = add i8 %3, -48
%5 = icmp ult i8 %4, 10
br i1 %5, label %6, label %18
6: ; preds = %1, %6
%7 = phi i8* [ %10, %6 ], [ %2, %1 ]
%8 = phi i32 [ %14, %6 ], [ 0, %1 ]
%9 = mul nsw i32 %8, 10
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %10, i8** %0
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = add i32 %9, -48
%14 = add i32 %13, %12
%15 = load i8, i8* %10
%16 = add i8 %15, -48
%17 = icmp ult i8 %16, 10
br i1 %17, label %6, label %18
18: ; preds = %6, %1
%19 = phi i32 [ 0, %1 ], [ %14, %6 ]
ret i32 %19
}
word(w) {
  byte(w >> 8);
  byte(w);
}


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

x86 assembly (clang, -O2):
<word>:
push   %rbx
mov    %edi,%ebx
sar    $0x8,%edi
xor    %eax,%eax
call   1030 <byte@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <byte@plt>

LLVM IR (-O0):
define i32 @word(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = ashr i32 %4, 8
%6 = call i32 (i32, ...) bitcast (i32 (...)* @byte to i32 (i32, ...)*)(i32 %5)
%7 = load i32, i32* %3
%8 = call i32 (i32, ...) bitcast (i32 (...)* @byte to i32 (i32, ...)*)(i32 %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @word(i32 %0) {
%2 = ashr i32 %0, 8
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @byte to i32 (i32, ...)*)(i32 %2)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @byte to i32 (i32, ...)*)(i32 %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, void **,
                                      int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_PUBLIC;
scalar_t__ d2i_PUBKEY;
EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
                              void *u) {
  return PEM_ASN1_read_bio((d2i_of_void *)d2i_PUBKEY, PEM_STRING_PUBLIC, bp,
                           (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_bio_PUBKEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read_bio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_PUBKEY>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read_bio@plt>

LLVM IR (-O0):
@d2i_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32* @PEM_read_bio_PUBKEY(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_PUBKEY
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_PUBLIC
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read_bio(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32* @PEM_read_bio_PUBKEY(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_PUBKEY
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PUBLIC
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read_bio(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
/* Variables and functions */
scalar_t__ exp(float);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(float);
int main() {
  float a = 2, b = 3;
  a += exp(b);
  print("a 22.085537");
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1050 <exp@plt>
cvtsi2ss %rax,%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xe8f(%rip),%rdi
call   1030 <print@plt>
movss  -0x8(%rbp),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xec7(%rip),%xmm0
call   1050 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
addss  0xeb6(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xead(%rip),%rdi
call   1030 <print@plt>
movss  0x4(%rsp),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"a 22.085537\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 2.000000e+00, float* %2
store float 3.000000e+00, float* %3
%4 = load float, float* %3
%5 = call i64 @exp(float %4)
%6 = sitofp i64 %5 to float
%7 = load float, float* %2
%8 = fadd float %7, %6
store float %8, float* %2
%9 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = load float, float* %2
%11 = call i32 @printid(float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"a 22.085537\00"
define i32 @main() {
%1 = tail call i64 @exp(float 3.000000e+00)
%2 = sitofp i64 %1 to float
%3 = fadd float %2, 2.000000e+00
%4 = tail call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printid(float %3)
ret i32 0
}
int MC_TestsRunAll() { return 1; }


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

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

LLVM IR (-O0):
define i32 @MC_TestsRunAll() {
ret i32 1
}

LLVM IR (-O2):
define i32 @MC_TestsRunAll() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
char *s_let(char *, char *);
int /*<<< orphan*/ strtod(int /*<<< orphan*/, char **);
char *macisfloat(char *arg) {
  char *b;
  strtod(get_string(arg), &b);
  if ((*b) != '\0')
    return (s_let("false", arg));
  return (s_let("true", arg));
}


x86 assembly (clang, -O0):
<macisfloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <get_string@plt>
mov    %eax,%edi
lea    -0x18(%rbp),%rsi
call   1030 <strtod@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1179 <macisfloat+0x49>
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1040 <s_let@plt>
mov    %rax,-0x8(%rbp)
jmp    118d <macisfloat+0x5d>
mov    -0x10(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1040 <s_let@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macisfloat>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1050 <get_string@plt>
lea    0x8(%rsp),%rsi
mov    %eax,%edi
call   1030 <strtod@plt>
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
lea    0xeae(%rip),%rax
lea    0xea1(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1040 <s_let@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i8* @macisfloat(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @get_string(i8* %5)
%7 = call i32 @strtod(i32 %6, i8** %4)
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i8* @s_let(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %13)
store i8* %14, i8** %2
br label %18
15: ; preds = %1
%16 = load i8*, i8** %3
%17 = call i8* @s_let(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %16)
store i8* %17, i8** %2
br label %18
18: ; preds = %15, %12
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i8* @macisfloat(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i32 @get_string(i8* %0)
%5 = call i32 @strtod(i32 %4, i8** %2)
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
%10 = call i8* @s_let(i8* %9, i8* %0)
ret i8* %10
}
int cmp_desc(const void *a, const void *b) { return *(char *)b - *(char *)a; }


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

x86 assembly (clang, -O2):
<cmp_desc>:
movsbl (%rsi),%eax
movsbl (%rdi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_desc(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 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp_desc(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int round_cod(float *x) { return (int)(*x + 0.5); }


x86 assembly (clang, -O0):
<round_cod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_cod>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xef0(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @round_cod(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fadd double %5, 5.000000e-01
%7 = fptosi double %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @round_cod(float* nocapture %0) {
%2 = load float, float* %0
%3 = fpext float %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int volume_update(void *);
int volume_epoll_callback(int fd, void *data, uint32_t events) {
  return volume_update(data);
}


x86 assembly (clang, -O0):
<volume_epoll_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <volume_update@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<volume_epoll_callback>:
mov    %rsi,%rdi
jmp    1030 <volume_update@plt>

LLVM IR (-O0):
define i32 @volume_epoll_callback(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i32 @volume_update(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @volume_epoll_callback(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @volume_update(i8* %1)
ret i32 %4
}
/* Variables and functions */
unsigned int UINT_MAX;
unsigned int sat_mul(unsigned int x, unsigned int y) {
  return (!y ? 0 : x <= UINT_MAX / y ? x * y : UINT_MAX);
}


x86 assembly (clang, -O0):
<sat_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111e <sat_mul+0x1e>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1160 <sat_mul+0x60>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
ja     114e <sat_mul+0x4e>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115a <sat_mul+0x5a>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sat_mul>:
test   %esi,%esi
je     111e <sat_mul+0x1e>
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
imul   %edi,%esi
cmp    %edi,%eax
cmovb  %ecx,%esi
mov    %esi,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@UINT_MAX = global i32 0
define i32 @sat_mul(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 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %2
br label %22
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* @UINT_MAX
%11 = load i32, i32* %4
%12 = udiv i32 %10, %11
%13 = icmp ule i32 %9, %12
br i1 %13, label %14, label %18
14: ; preds = %8
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = mul i32 %15, %16
br label %20
18: ; preds = %8
%19 = load i32, i32* @UINT_MAX
br label %20
20: ; preds = %18, %14
%21 = phi i32 [ %17, %14 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %7
%23 = phi i32 [ 0, %7 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
@UINT_MAX = global i32 0
define i32 @sat_mul(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @UINT_MAX
%6 = udiv i32 %5, %1
%7 = icmp ult i32 %6, %0
%8 = mul i32 %1, %0
%9 = select i1 %7, i32 %5, i32 %8
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 0, %2 ]
ret i32 %11
}
void RT_TRACE(struct rtl_priv *rtlpriv, int comp, int level, const char *fmt,
              ...) {}


x86 assembly (clang, -O0):
<RT_TRACE>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rtl_priv = type opaque
define void @RT_TRACE(%struct.rtl_priv* %0, i32 %1, i32 %2, i8* %3, ...) {
%5 = alloca %struct.rtl_priv*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store %struct.rtl_priv* %0, %struct.rtl_priv** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
%struct.rtl_priv = type opaque
define void @RT_TRACE(%struct.rtl_priv* nocapture %0, i32 %1, i32 %2, i8* nocapture %3, ...) {
ret void
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
wchar_t *wcsset(wchar_t *str, wchar_t c) {
  wchar_t *r = str;
  while (*str)
    *str++ = c;
  return r;
}


x86 assembly (clang, -O0):
<wcsset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     113d <wcsset+0x3d>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x8(%rbp)
mov    %rcx,(%rax)
jmp    1114 <wcsset+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsset>:
mov    %rdi,%rax
cmpq   $0x0,(%rdi)
je     111e <wcsset+0x1e>
lea    0x8(%rax),%rcx
nopl   (%rax)
mov    %rsi,-0x8(%rcx)
cmpq   $0x0,(%rcx)
lea    0x8(%rcx),%rcx
jne    1110 <wcsset+0x10>
ret

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

LLVM IR (-O2):
define i64* @wcsset(i64* returned %0, i64 %1) {
%3 = load i64, i64* %0
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i64* [ %7, %5 ], [ %0, %2 ]
%7 = getelementptr inbounds i64, i64* %6, i64 1
store i64 %1, i64* %6
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret i64* %0
}