xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int is_big_endian_() {
  union {
    int64_t l;
    char c[sizeof(int64_t)];
  } u;
  u.l = 1;
  return (u.c[sizeof(int64_t) - 1] == 1 ? 1 : -1);
}


x86 assembly (clang, -O0):
<is_big_endian_>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movsbl -0x5(%rbp),%edx
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @is_big_endian_() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i32*
store i32 1, i32* %2
%3 = bitcast %union.anon* %1 to [4 x i8]*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 -1
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_big_endian_() {
ret i32 -1
}
void cdecl_struct__timespec(struct timespec *unused) {}


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

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

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

LLVM IR (-O2):
%struct.timespec = type opaque
define void @cdecl_struct__timespec(%struct.timespec* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isAlpha(char);
int /*<<< orphan*/ isNumeric(char);
int /*<<< orphan*/ isSpace(char);
int isGlyph(char c) { return (!isAlpha(c) && !isNumeric(c) && !isSpace(c)); }


x86 assembly (clang, -O0):
<isGlyph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1050 <isAlpha@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    1184 <isGlyph+0x54>
movsbl -0x1(%rbp),%edi
call   1030 <isNumeric@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    1184 <isGlyph+0x54>
movsbl -0x1(%rbp),%edi
call   1040 <isSpace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isGlyph>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <isAlpha@plt>
xor    %ebx,%ebx
test   %eax,%eax
jne    115d <isGlyph+0x2d>
movsbl %bpl,%ebp
mov    %ebp,%edi
call   1030 <isNumeric@plt>
test   %eax,%eax
jne    115d <isGlyph+0x2d>
mov    %ebp,%edi
call   1040 <isSpace@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isGlyph(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @isAlpha(i8 signext %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32 @isNumeric(i8 signext %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call i32 @isSpace(i8 signext %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %10, %6, %1
%16 = phi i1 [ false, %6 ], [ false, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @isGlyph(i8 signext %0) {
%2 = tail call i32 @isAlpha(i8 signext %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i32 @isNumeric(i8 signext %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @isSpace(i8 signext %0)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
int b_twist_b2_on_edgeperm(eperm)
int eperm;
{
  int temp_arr[8];
  b_edgeperm_unpack(eperm, temp_arr);
  two_cycle(temp_arr, 2, 6);
  return b_edgeperm_pack(temp_arr);
}


x86 assembly (clang, -O0):
<b_twist_b2_on_edgeperm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <b_edgeperm_unpack@plt>
lea    -0x30(%rbp),%rdi
mov    $0x2,%esi
mov    $0x6,%edx
mov    $0x0,%al
call   1050 <two_cycle@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <b_edgeperm_pack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_twist_b2_on_edgeperm>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <b_edgeperm_unpack@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1050 <two_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <b_edgeperm_pack@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @b_twist_b2_on_edgeperm(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @b_edgeperm_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @two_cycle to i32 (i32*, i32, i32, ...)*)(i32* %7, i32 2, i32 6)
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @b_edgeperm_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @b_twist_b2_on_edgeperm(i32 %0) {
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @b_edgeperm_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @two_cycle to i32 (i32*, i32, i32, ...)*)(i32* %4, i32 2, i32 6)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @b_edgeperm_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int cichlid_rotate_right_64(int, int);
uint64_t sigma0(uint64_t x) {
  return cichlid_rotate_right_64(x, 1) ^ cichlid_rotate_right_64(x, 8) ^
         (x >> 7);
}


x86 assembly (clang, -O0):
<sigma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x7,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma0>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x1,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <cichlid_rotate_right_64@plt>
sar    $0x7,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sigma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cichlid_rotate_right_64(i32 %3, i32 1)
%5 = load i32, i32* %2
%6 = call i32 @cichlid_rotate_right_64(i32 %5, i32 8)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 7
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @sigma0(i32 %0) {
%2 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 1)
%3 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 8)
%4 = ashr i32 %0, 7
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("btsnoop trace file handling tool\n"
         "Usage:\n");
  printf("\tbtsnoop <command> [files]\n");
  printf("commands:\n"
         "\t-m, --merge <output>   Merge multiple btsnoop files\n"
         "\t-e, --extract <input>  Extract data from btsnoop file\n"
         "\t-h, --help             Show help options\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"btsnoop trace file handling tool\0AUsage:\0A\00"
@.str.1 = [28 x i8] c"\09btsnoop <command> [files]\0A\00"
@.str.2 = [161 x i8] c"commands:\0A\09-m, --merge <output> Merge multiple btsnoop files\0A\09-e, --extract <input> Extract data from btsnoop file\0A\09-h, --help Show help options\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"btsnoop trace file handling tool\0AUsage:\00"
@str.3 = [27 x i8] c"\09btsnoop <command> [files]\00"
@str.4 = [160 x i8] c"commands:\0A\09-m, --merge <output> Merge multiple btsnoop files\0A\09-e, --extract <input> Extract data from btsnoop file\0A\09-h, --help Show help options\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([160 x i8], [160 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *calloc(int, int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char *read_line() {
  char *buffer = calloc(256, 1);
  fgets(buffer, 256 - 1, stdin);
  return buffer;
}


x86 assembly (clang, -O0):
<read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea2(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   1030 <fgets@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_line>:
push   %rbx
mov    $0x100,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1030 <fgets@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i8* @read_line() {
%1 = alloca i8*
%2 = call i8* @calloc(i32 256, i32 1)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 255, i32 %4)
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@stdin = global i32 0
define i8* @read_line() {
%1 = tail call dereferenceable_or_null(256) i8* @calloc(i32 256, i32 1)
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %1, i32 255, i32 %2)
ret i8* %1
}
/* Type definitions */
typedef unsigned long int32_t;

/* Variables and functions */
int32_t lead(int32_t m) {
  long j;
  unsigned long c = (1ul << 31);
  for (j = 0; j < 32; j++) {
    if ((c & m) != 0)
      break;
    c >>= 1;
  }
  return (j);
}


x86 assembly (clang, -O0):
<lead>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x80000000,%eax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x20,-0x10(%rbp)
jge    1158 <lead+0x58>
mov    -0x18(%rbp),%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     113b <lead+0x3b>
jmp    1158 <lead+0x58>
mov    -0x18(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1119 <lead+0x19>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lead>:
test   $0x80000000,%edi
jne    1129 <lead+0x29>
mov    $0x80000000,%ecx
xor    %eax,%eax
nop
mov    %rax,%rdx
add    $0x1,%rax
cmp    $0x1e,%rdx
ja     1128 <lead+0x28>
shr    %rcx
mov    %rcx,%rdx
and    %rdi,%rdx
je     1110 <lead+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @lead(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 2147483648, i64* %4
store i64 0, i64* %3
br label %5
5: ; preds = %17, %1
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 32
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i64, i64* %4
%10 = load i64, i64* %2
%11 = and i64 %9, %10
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %20
14: ; preds = %8
%15 = load i64, i64* %4
%16 = lshr i64 %15, 1
store i64 %16, i64* %4
br label %17
17: ; preds = %14
%18 = load i64, i64* %3
%19 = add nsw i64 %18, 1
store i64 %19, i64* %3
br label %5
20: ; preds = %13, %5
%21 = load i64, i64* %3
ret i64 %21
}

LLVM IR (-O2):
define i64 @lead(i64 %0) {
%2 = and i64 %0, 2147483648
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 2147483648, %1 ]
%6 = phi i64 [ %8, %4 ], [ 0, %1 ]
%7 = lshr i64 %5, 1
%8 = add nuw nsw i64 %6, 1
%9 = icmp ult i64 %6, 31
%10 = and i64 %7, %0
%11 = icmp eq i64 %10, 0
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %4, label %13
13: ; preds = %4, %1
%14 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
usage() {
  (void)fprintf(stderr, "usage: chpass [-a list] [user]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"usage: chpass [-a list] [user]\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"usage: chpass [-a list] [user]\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int pf_pqos_start(struct _perf_pqos *pqos __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
%struct._perf_pqos = type opaque
define i32 @pf_pqos_start(%struct._perf_pqos* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_SubtractVec4_init(void) {
  _hmt_register_covercase("HMM_SubtractVec4", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_SubtractVec4_init>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"HMM_SubtractVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_SubtractVec4_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"HMM_SubtractVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_SubtractVec4_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int swap_odd_even_bits(int x) {
  int oddbits = (x & 0xAA) >> 1;
  int evenbits = (x & 0x55) << 1;
  return oddbits | evenbits;
}


x86 assembly (clang, -O0):
<swap_odd_even_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xaa,%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55,%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_odd_even_bits>:
mov    %edi,%eax
shr    %eax
and    $0x55,%eax
and    $0x55,%edi
lea    (%rax,%rdi,2),%eax
ret

LLVM IR (-O0):
define i32 @swap_odd_even_bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 170
%7 = ashr i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = and i32 %8, 85
%10 = shl i32 %9, 1
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @swap_odd_even_bits(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 85
%4 = shl i32 %0, 1
%5 = and i32 %4, 170
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
char *_strdup(char *);
scalar_t__ mlibc_str_isws(char *);
char *mlibc_str_triml(char *str) {
  while (mlibc_str_isws(str)) {
    str++;
  }
  return _strdup(str);
}


x86 assembly (clang, -O0):
<mlibc_str_triml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mlibc_str_isws@plt>
cmp    $0x0,%rax
je     1150 <mlibc_str_triml+0x30>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <mlibc_str_triml+0xc>
mov    -0x8(%rbp),%rdi
call   1040 <_strdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlibc_str_triml>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <mlibc_str_isws@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <mlibc_str_triml+0x10>
add    $0xffffffffffffffff,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <_strdup@plt>

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

LLVM IR (-O2):
define i8* @mlibc_str_triml(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = tail call i64 @mlibc_str_isws(i8* %3)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = tail call i8* @_strdup(i8* %3)
ret i8* %8
}
/* Type definitions */
struct timeval {
  int dummy;
};
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ timespec_to_timeval(struct timeval *, struct timespec *);
int timeval_now(struct timeval *tv) {
  struct timespec ts;
  int rc;
  rc = clock_gettime(CLOCK_REALTIME, &ts);
  timespec_to_timeval(tv, &ts);
  return rc;
}


x86 assembly (clang, -O0):
<timeval_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <timespec_to_timeval@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeval_now>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%r14
mov    %r14,%rsi
call   1030 <clock_gettime@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <timespec_to_timeval@plt>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @timeval_now(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
%3 = alloca %struct.timespec
%4 = alloca i32
store %struct.timeval* %0, %struct.timeval** %2
%5 = load i32, i32* @CLOCK_REALTIME
%6 = call i32 @clock_gettime(i32 %5, %struct.timespec* %3)
store i32 %6, i32* %4
%7 = load %struct.timeval*, %struct.timeval** %2
%8 = call i32 @timespec_to_timeval(%struct.timeval* %7, %struct.timespec* %3)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @timeval_now(%struct.timeval* %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = load i32, i32* @CLOCK_REALTIME
%5 = call i32 @clock_gettime(i32 %4, %struct.timespec* %2)
%6 = call i32 @timespec_to_timeval(%struct.timeval* %0, %struct.timespec* %2)
ret i32 %5
}
void INT_Excep_IRQ8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_IRQ8() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_ECDSA_C and/or MBEDTLS_SHA256_C and/or "
         "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [104 x i8] c"MBEDTLS_ECDSA_C and/or MBEDTLS_SHA256_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [103 x i8] c"MBEDTLS_ECDSA_C and/or MBEDTLS_SHA256_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int *lower_bound(int *start, int *end, int target) {
  int *t;
  while (start < end) {
    t = start + ((end - start) >> 1);
    if (*t > target)
      start = t + 1;
    else
      end = t;
  }
  return start;
}


x86 assembly (clang, -O0):
<lower_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    116c <lower_bound+0x6c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rdx
sub    %rdx,%rcx
sar    $0x2,%rcx
sar    $0x1,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jle    115f <lower_bound+0x5f>
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <lower_bound+0x67>
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    110f <lower_bound+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower_bound>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jb     1119 <lower_bound+0x19>
jmp    1135 <lower_bound+0x35>
nopw   0x0(%rax,%rax,1)
lea    (%rax,%rcx,4),%rsi
cmp    %rsi,%rax
jae    1135 <lower_bound+0x35>
mov    %rsi,%rcx
sub    %rax,%rcx
sar    $0x3,%rcx
cmp    %edx,(%rax,%rcx,4)
jle    1110 <lower_bound+0x10>
lea    (%rax,%rcx,4),%rax
add    $0x4,%rax
cmp    %rsi,%rax
jb     1119 <lower_bound+0x19>
ret

LLVM IR (-O0):
define i32* @lower_bound(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
br label %8
8: ; preds = %31, %3
%9 = load i32*, i32** %4
%10 = load i32*, i32** %5
%11 = icmp ult i32* %9, %10
br i1 %11, label %12, label %32
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32*, i32** %5
%15 = load i32*, i32** %4
%16 = ptrtoint i32* %14 to i64
%17 = ptrtoint i32* %15 to i64
%18 = sub i64 %16, %17
%19 = sdiv exact i64 %18, 4
%20 = ashr i64 %19, 1
%21 = getelementptr inbounds i32, i32* %13, i64 %20
store i32* %21, i32** %7
%22 = load i32*, i32** %7
%23 = load i32, i32* %22
%24 = load i32, i32* %6
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %29
26: ; preds = %12
%27 = load i32*, i32** %7
%28 = getelementptr inbounds i32, i32* %27, i64 1
store i32* %28, i32** %4
br label %31
29: ; preds = %12
%30 = load i32*, i32** %7
store i32* %30, i32** %5
br label %31
31: ; preds = %29, %26
br label %8
32: ; preds = %8
%33 = load i32*, i32** %4
ret i32* %33
}

LLVM IR (-O2):
define i32* @lower_bound(i32* %0, i32* %1, i32 %2) {
%4 = icmp ult i32* %0, %1
br i1 %4, label %5, label %19
5: ; preds = %3, %5
%6 = phi i32* [ %17, %5 ], [ %0, %3 ]
%7 = phi i32* [ %16, %5 ], [ %1, %3 ]
%8 = ptrtoint i32* %7 to i64
%9 = ptrtoint i32* %6 to i64
%10 = sub i64 %8, %9
%11 = ashr i64 %10, 3
%12 = getelementptr inbounds i32, i32* %6, i64 %11
%13 = load i32, i32* %12
%14 = icmp sgt i32 %13, %2
%15 = getelementptr inbounds i32, i32* %12, i64 1
%16 = select i1 %14, i32* %7, i32* %12
%17 = select i1 %14, i32* %15, i32* %6
%18 = icmp ult i32* %17, %16
br i1 %18, label %5, label %19
19: ; preds = %5, %3
%20 = phi i32* [ %0, %3 ], [ %17, %5 ]
ret i32* %20
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_wrap_comb(int i, int j, int k) {
  ft_putchar(i);
  ft_putchar(j);
  ft_putchar(k);
  if (i != 55) {
    ft_putchar(',');
    ft_putchar(' ');
  }
}


x86 assembly (clang, -O0):
<ft_wrap_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%eax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
cmpl   $0x37,-0x4(%rbp)
je     1160 <ft_wrap_comb+0x50>
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_wrap_comb>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
movsbl %bl,%edi
call   1030 <ft_putchar@plt>
movsbl %bpl,%edi
call   1030 <ft_putchar@plt>
movsbl %r14b,%edi
call   1030 <ft_putchar@plt>
cmp    $0x37,%ebx
jne    113f <ft_wrap_comb+0x2f>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_wrap_comb(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i8
%9 = call i32 @ft_putchar(i8 signext %8)
%10 = load i32, i32* %5
%11 = trunc i32 %10 to i8
%12 = call i32 @ft_putchar(i8 signext %11)
%13 = load i32, i32* %6
%14 = trunc i32 %13 to i8
%15 = call i32 @ft_putchar(i8 signext %14)
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 55
br i1 %17, label %18, label %21
18: ; preds = %3
%19 = call i32 @ft_putchar(i8 signext 44)
%20 = call i32 @ft_putchar(i8 signext 32)
br label %21
21: ; preds = %18, %3
ret void
}

LLVM IR (-O2):
define void @ft_wrap_comb(i32 %0, i32 %1, i32 %2) {
%4 = trunc i32 %0 to i8
%5 = tail call i32 @ft_putchar(i8 signext %4)
%6 = trunc i32 %1 to i8
%7 = tail call i32 @ft_putchar(i8 signext %6)
%8 = trunc i32 %2 to i8
%9 = tail call i32 @ft_putchar(i8 signext %8)
%10 = icmp eq i32 %0, 55
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = tail call i32 @ft_putchar(i8 signext 44)
%13 = tail call i32 @ft_putchar(i8 signext 32)
br label %14
14: ; preds = %11, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRCORE_N16_swap(char *, int, int);
void U_WMRSETVIEWPORTEXT_swap(char *record, int torev) {
  U_WMRCORE_N16_swap(record, 2, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRSETVIEWPORTEXT_swap>:
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <U_WMRCORE_N16_swap@plt>

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

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


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <jump@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.test = [5 x i32] [i32 2, i32 3, i32 1, i32 1, i32 4]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = call i32 @jump(i32* %5, i32 5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freeDiskData(char *diskData) { free(diskData); }


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

x86 assembly (clang, -O2):
<freeDiskData>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeDiskData(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
double opt_barrier_double(double x) {
  volatile double y = x;
  return y;
}


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

x86 assembly (clang, -O2):
<opt_barrier_double>:
movsd  %xmm0,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
ret

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

LLVM IR (-O2):
define double @opt_barrier_double(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%4 = load volatile double, double* %2
ret double %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ detail;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcrossing_detail(void *_p) {
  return (int)((XEvent *)_p)->xcrossing.detail;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcrossing_detail>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xcrossing_detail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xcrossing_detail(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void gtk_message_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_message_type_get_type() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
hci_event_encryption_change_get_encryption_enabled(const uint8_t *event) {
  return event[5];
}


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

x86 assembly (clang, -O2):
<hci_event_encryption_change_get_encryption_enabled>:
mov    0x14(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @hci_event_encryption_change_get_encryption_enabled(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef double time_t;
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
time_t milliseconds(struct timeval *t) {
  return t->tv_sec * 1000.0 + t->tv_usec / 1000.0;
}


x86 assembly (clang, -O0):
<milliseconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xedf(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xed3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<milliseconds>:
movsd  0x8(%rdi),%xmm1
movsd  0xef3(%rip),%xmm0
divsd  %xmm0,%xmm1
mulsd  (%rdi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @milliseconds(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%5 = load double, double* %4
%6 = load %struct.timeval*, %struct.timeval** %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+03
%10 = call double @llvm.fmuladd.f64(double %5, double 1.000000e+03, double %9)
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @milliseconds(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load double, double* %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%5 = load double, double* %4
%6 = fdiv double %5, 1.000000e+03
%7 = tail call double @llvm.fmuladd.f64(double %3, double 1.000000e+03, double %6)
ret double %7
}
void gtk_radio_button_get_group() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @INT_DMA0() {
ret void
}
int isendofhash(char *p, char *end) {
  if ((p < end && *p == '"') || ((*p == '\n' || *p == '\r') && p + 1 == end))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isendofhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    112a <isendofhash+0x2a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
je     115c <isendofhash+0x5c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     114a <isendofhash+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1168 <isendofhash+0x68>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
cmp    -0x18(%rbp),%rax
jne    1168 <isendofhash+0x68>
movl   $0x1,-0x4(%rbp)
jmp    116f <isendofhash+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isendofhash>:
mov    (%rdi),%cl
mov    $0x1,%eax
cmp    %rsi,%rdi
jae    1112 <isendofhash+0x12>
cmp    $0x22,%cl
jne    1112 <isendofhash+0x12>
ret
cmp    $0xd,%cl
je     111c <isendofhash+0x1c>
cmp    $0xa,%cl
jne    1125 <isendofhash+0x25>
add    $0x1,%rdi
cmp    %rsi,%rdi
je     1111 <isendofhash+0x11>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isendofhash(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp ult i8* %6, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 34
br i1 %13, label %29, label %14
14: ; preds = %9, %2
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 10
br i1 %18, label %24, label %19
19: ; preds = %14
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 13
br i1 %23, label %24, label %30
24: ; preds = %19, %14
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8*, i8** %5
%28 = icmp eq i8* %26, %27
br i1 %28, label %29, label %30
29: ; preds = %24, %9
store i32 1, i32* %3
br label %31
30: ; preds = %24, %19
store i32 0, i32* %3
br label %31
31: ; preds = %30, %29
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @isendofhash(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 34
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %12, label %7
7: ; preds = %2
switch i8 %4, label %11 [
i8 10, label %8
i8 13, label %8
]
8: ; preds = %7, %7
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = icmp eq i8* %9, %1
br i1 %10, label %12, label %11
11: ; preds = %7, %8
br label %12
12: ; preds = %2, %8, %11
%13 = phi i32 [ 0, %11 ], [ 1, %8 ], [ 1, %2 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ symlink(char const *, char const *);
void lnkset(const char *lnk, const char *fn) { symlink(lnk, fn); }


x86 assembly (clang, -O0):
<lnkset>:
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 <symlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnkset>:
jmp    1030 <symlink@plt>

LLVM IR (-O0):
define void @lnkset(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 = load i8*, i8** %4
%7 = call i32 @symlink(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @lnkset(i8* %0, i8* %1) {
%3 = tail call i32 @symlink(i8* %0, i8* %1)
ret void
}
int bar(int c, int d) {
  int e = c + d;
  return e;
}


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

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int bbm_hostif_deselect(void *);
signed int bbm_com_hostif_deselect(void *handle) {
  signed int res;
  res = bbm_hostif_deselect(handle);
  return res;
}


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

x86 assembly (clang, -O2):
<bbm_com_hostif_deselect>:
jmp    1030 <bbm_hostif_deselect@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_hostif_deselect(i8* %0) {
%2 = tail call i32 @bbm_hostif_deselect(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gettext(char *);
int /*<<< orphan*/ mesg(int /*<<< orphan*/);
void skip(int direction) {
  if (direction > 0)
    mesg(gettext("...skipping forward\n"));
  else
    mesg(gettext("...skipping backward\n"));
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    114d <skip+0x2d>
lea    0xec4(%rip),%rdi
call   1040 <gettext@plt>
mov    %eax,%edi
call   1030 <mesg@plt>
jmp    1160 <skip+0x40>
lea    0xec1(%rip),%rdi
call   1040 <gettext@plt>
mov    %eax,%edi
call   1030 <mesg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
push   %rax
test   %edi,%edi
lea    0xed6(%rip),%rax
lea    0xee4(%rip),%rdi
cmovg  %rax,%rdi
call   1040 <gettext@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <mesg@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"...skipping forward\0A\00"
@.str.1 = [22 x i8] c"...skipping backward\0A\00"
define void @skip(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @gettext(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @mesg(i32 %6)
br label %11
8: ; preds = %1
%9 = call i32 @gettext(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @mesg(i32 %9)
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"...skipping forward\0A\00"
@.str.1 = [22 x i8] c"...skipping backward\0A\00"
define void @skip(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @gettext(i8* %3)
%5 = tail call i32 @mesg(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ctermid(char *);
void c_ctermid_(char *s, int ls) { ctermid(s); }


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

x86 assembly (clang, -O2):
<c_ctermid_>:
jmp    1030 <ctermid@plt>

LLVM IR (-O0):
define void @c_ctermid_(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 @ctermid(i8* %5)
ret void
}

LLVM IR (-O2):
define void @c_ctermid_(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @ctermid(i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t HI(uint16_t x) { return (x >> 8) & 0xFF; }


x86 assembly (clang, -O0):
<HI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @HI(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 255
ret i32 %5
}

LLVM IR (-O2):
define i32 @HI(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
void avio_printf() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @_Jv_JVMPI_Notify_THREAD_END() {
ret void
}
unsigned long long int
unsignedlonglongint_ignoring_longlongint(unsigned long long int x,
                                         long long int y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i64 @unsignedlonglongint_ignoring_longlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdir(char const *, int /*<<< orphan*/);
int run_mkdir(const char *path, mode_t mode, void *data) {
  return mkdir(path, mode);
}


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

x86 assembly (clang, -O2):
<run_mkdir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @run_mkdir(i8* nocapture %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @mkdir(i8* %0, i32 %1)
ret i32 %4
}