xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
print_data_wait_timeout(int block_number) {
  printf("Timeout. resending the data packet with block number%d\n",
         block_number);
}


x86 assembly (clang, -O0):
<print_data_wait_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_data_wait_timeout>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Timeout. resending the data packet with block number%d\0A\00"
define i32 @print_data_wait_timeout(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [56 x i8] c"Timeout. resending the data packet with block number%d\0A\00"
define i32 @print_data_wait_timeout(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *);
void interrupt_handler() {
  error(0, 0, "interrupted");
  cleanup();
}


x86 assembly (clang, -O0):
<interrupt_handler>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
lea    0xed3(%rip),%rdx
mov    %esi,%edi
call   1030 <error@plt>
mov    $0x0,%al
call   1040 <cleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrupt_handler>:
push   %rax
lea    0xed8(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <error@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cleanup@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"interrupted\00"
define void @interrupt_handler() {
%1 = tail call i32 @error(i32 0, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @cleanup()
ret void
}
char *io_fault(int errorcode) {
  static char *msg;
  if (errorcode == 0)
    msg = "device not detected";
  else
    msg = "device not compatible";
  return msg;
}


x86 assembly (clang, -O0):
<io_fault>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1124 <io_fault+0x24>
lea    0xee8(%rip),%rax
mov    %rax,0x2f09(%rip)
jmp    1132 <io_fault+0x32>
lea    0xee9(%rip),%rax
mov    %rax,0x2ef6(%rip)
mov    0x2eef(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_fault>:
test   %edi,%edi
lea    0xef7(%rip),%rcx
lea    0xf04(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@io_fault.msg = internal global i8* null
@.str = [20 x i8] c"device not detected\00"
@.str.1 = [22 x i8] c"device not compatible\00"
define i8* @io_fault(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** @io_fault.msg
br label %7
6: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8** @io_fault.msg
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** @io_fault.msg
ret i8* %8
}

LLVM IR (-O2):
@.str = [20 x i8] c"device not detected\00"
@.str.1 = [22 x i8] c"device not compatible\00"
define i8* @io_fault(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t u8t32le(uint8_t p[4]) {
  uint32_t value = p[3];
  value = (value << 8) | p[2];
  value = (value << 8) | p[1];
  value = (value << 8) | p[0];
  return value;
}


x86 assembly (clang, -O0):
<u8t32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x8(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     (%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8t32le>:
mov    0x8(%rdi),%eax
mov    0xc(%rdi),%ecx
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @u8t32le(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 2
%5 = load i32, i32* %4
%6 = shl i32 %3, 16
%7 = shl i32 %5, 8
%8 = or i32 %7, %6
%9 = getelementptr inbounds i32, i32* %0, i64 1
%10 = load i32, i32* %9
%11 = or i32 %8, %10
%12 = shl i32 %11, 8
%13 = load i32, i32* %0
%14 = or i32 %12, %13
ret i32 %14
}
void delay_ms(unsigned short ns) {
  unsigned long tmp;
  tmp = (unsigned long)ns * (72000000 / 4000);
  while (tmp > 20)
    tmp--;
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
imul   $0x4650,%rax,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x14,-0x10(%rbp)
jbe    1136 <delay_ms+0x36>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    111a <delay_ms+0x1a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay_ms(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i64
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = zext i16 %4 to i64
%6 = mul i64 %5, 18000
store i64 %6, i64* %3
br label %7
7: ; preds = %10, %1
%8 = load i64, i64* %3
%9 = icmp ugt i64 %8, 20
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i64, i64* %3
%12 = add i64 %11, -1
store i64 %12, i64* %3
br label %7
13: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @delay_ms(i16 zeroext %0) {
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strlen(char *);
void LOCATION(char *loc) {
  char *location;
  location = malloc(12 + strlen(loc));
  sprintf(location, "Location: %s\n", loc);
  puts(location);
}


x86 assembly (clang, -O0):
<LOCATION>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0xc,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe8c(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LOCATION>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0xc(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Location: %s\0A\00"
define void @LOCATION(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 12, %5
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @puts(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Location: %s\0A\00"
define void @LOCATION(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 12
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret void
}
unsigned char convert(unsigned char c) {
  return (c & 0x40) << 1 | (c & 0x07) << 4 | (c & 0x80) >> 4 | (c & 0x38) >> 3;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x40,%eax
shl    $0x1,%eax
movzbl -0x1(%rbp),%ecx
and    $0x7,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x80,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
and    $0x38,%ecx
sar    $0x3,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
lea    (%rdi,%rdi,1),%eax
and    $0x80,%al
mov    %edi,%ecx
shl    $0x4,%cl
and    $0x70,%cl
or     %al,%cl
mov    %edi,%eax
shr    $0x4,%al
and    $0x8,%al
or     %cl,%al
shr    $0x3,%dil
and    $0x7,%dil
or     %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @convert(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 64
%6 = shl i32 %5, 1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 7
%10 = shl i32 %9, 4
%11 = or i32 %6, %10
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = and i32 %13, 128
%15 = ashr i32 %14, 4
%16 = or i32 %11, %15
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = and i32 %18, 56
%20 = ashr i32 %19, 3
%21 = or i32 %16, %20
%22 = trunc i32 %21 to i8
ret i8 %22
}

LLVM IR (-O2):
define zeroext i8 @convert(i8 zeroext %0) {
%2 = shl i8 %0, 1
%3 = and i8 %2, -128
%4 = shl i8 %0, 4
%5 = and i8 %4, 112
%6 = or i8 %3, %5
%7 = lshr i8 %0, 4
%8 = and i8 %7, 8
%9 = or i8 %6, %8
%10 = lshr i8 %0, 3
%11 = and i8 %10, 7
%12 = or i8 %9, %11
ret i8 %12
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *s) { fprintf(stderr, "Error: %s\n", s); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int is_bitmask(long mask) {
  switch (mask) {
  case 1:
  case 2:
  case 4:
  case 8:
  case 16:
  case 32:
  case 64:
  case 128:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_bitmask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
add    $0xffffffffffffffff,%rax
sub    $0x2,%rax
jb     1197 <is_bitmask+0x97>
jmp    1123 <is_bitmask+0x23>
mov    -0x18(%rbp),%rax
sub    $0x4,%rax
je     1197 <is_bitmask+0x97>
jmp    1136 <is_bitmask+0x36>
mov    -0x18(%rbp),%rax
sub    $0x8,%rax
je     1197 <is_bitmask+0x97>
jmp    1149 <is_bitmask+0x49>
mov    -0x18(%rbp),%rax
sub    $0x10,%rax
je     1197 <is_bitmask+0x97>
jmp    115c <is_bitmask+0x5c>
mov    -0x18(%rbp),%rax
sub    $0x20,%rax
je     1197 <is_bitmask+0x97>
jmp    116f <is_bitmask+0x6f>
mov    -0x18(%rbp),%rax
sub    $0x40,%rax
je     1197 <is_bitmask+0x97>
jmp    1182 <is_bitmask+0x82>
mov    -0x18(%rbp),%rax
sub    $0x80,%rax
jne    11a3 <is_bitmask+0xa3>
jmp    1197 <is_bitmask+0x97>
movl   $0x1,-0x4(%rbp)
jmp    11aa <is_bitmask+0xaa>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_bitmask>:
mov    $0x1,%eax
lea    -0x1(%rdi),%rcx
cmp    $0x3f,%rcx
ja     1120 <is_bitmask+0x20>
movabs $0x800000008000808b,%rdx
bt     %rcx,%rdx
jae    1120 <is_bitmask+0x20>
ret
cmp    $0x80,%rdi
je     111f <is_bitmask+0x1f>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_bitmask(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %6 [
i64 1, label %5
i64 2, label %5
i64 4, label %5
i64 8, label %5
i64 16, label %5
i64 32, label %5
i64 64, label %5
i64 128, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_bitmask(i64 %0) {
switch i64 %0, label %2 [
i64 1, label %3
i64 2, label %3
i64 4, label %3
i64 8, label %3
i64 16, label %3
i64 32, label %3
i64 64, label %3
i64 128, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
void node_stop() {}


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

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

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

LLVM IR (-O2):
define void @node_stop() {
ret void
}
void fnSwap(int *a, int *b) {
  int t = *a;
  *a = *b;
  *b = t;
}


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

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

LLVM IR (-O0):
define void @fnSwap(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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @fnSwap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int validate_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(9, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<validate_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x9,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_solutions>:
mov    $0x9,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @validate_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 9, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
size_t hwaddr_str_len(size_t len) { return len * 3 + 1; }


x86 assembly (clang, -O0):
<hwaddr_str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0x3,-0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hwaddr_str_len>:
lea    (%rdi,%rdi,2),%rax
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i64 @hwaddr_str_len(i64 %0) {
%2 = mul i64 %0, 3
%3 = add i64 %2, 1
ret i64 %3
}
int test_imm_49uint8_mem(unsigned char *val) {
  return ((*val) & (-0x49 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_49uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffb7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_49uint8_mem>:
testb  $0xb7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_49uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -73
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_49uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -73
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sleep1(int);
int main() {
  int res = sleep1(5);
  printf("res: %d\n", res);
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"res: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @sleep1(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sset_point_gauss_legendre_(int *, int *, float *, float *);
void sset_point_gauss_legendre(int *nbe, int *e, float *xe, float *we) {
  sset_point_gauss_legendre_(nbe, e, xe, we);
}


x86 assembly (clang, -O0):
<sset_point_gauss_legendre>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <sset_point_gauss_legendre_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sset_point_gauss_legendre>:
jmp    1030 <sset_point_gauss_legendre_@plt>

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

LLVM IR (-O2):
define void @sset_point_gauss_legendre(i32* %0, i32* %1, float* %2, float* %3) {
%5 = tail call i32 @sset_point_gauss_legendre_(i32* %0, i32* %1, float* %2, float* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_UART_RXD1_OUTPUT() { set_io_bit(0x45, 2); }


x86 assembly (clang, -O0):
<TOSH_MAKE_UART_RXD1_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45,%edi
mov    $0x2,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_UART_RXD1_OUTPUT>:
mov    $0x45,%edi
mov    $0x2,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_UART_RXD1_OUTPUT() {
%1 = call i32 @set_io_bit(i32 69, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_UART_RXD1_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 69, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestEPLS5();
int main(void) { TestEPLS5(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @TestEPLS5()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @TestEPLS5()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo1();
int /*<<< orphan*/ foo2();
int main(void) {
  foo1();
  foo2();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <foo1@plt>
mov    $0x0,%al
call   1030 <foo2@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @foo1()
%2 = call i32 (...) @foo2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo1()
%2 = tail call i32 (...) @foo2()
ret i32 0
}
/* Variables and functions */
double sqrt(double const);
double vlength(const double *v) {
  return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
}


x86 assembly (clang, -O0):
<vlength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlength>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <vlength+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @vlength(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @vlength(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
/* Variables and functions */
int intel_fixed_exp(int);
int intel_fixed_log(int);
int intel_fixed_mul(int, int);
int intel_fixed_pow(int x, int y) {
  int e, p, r;
  e = intel_fixed_log(x);
  p = intel_fixed_mul(e, y);
  r = intel_fixed_exp(p);
  return r;
}


x86 assembly (clang, -O0):
<intel_fixed_pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <intel_fixed_log@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <intel_fixed_mul@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <intel_fixed_exp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_fixed_pow>:
push   %rbx
mov    %esi,%ebx
call   1050 <intel_fixed_log@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1040 <intel_fixed_mul@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <intel_fixed_exp@plt>

LLVM IR (-O0):
define i32 @intel_fixed_pow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = call i32 @intel_fixed_log(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = call i32 @intel_fixed_mul(i32 %10, i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @intel_fixed_exp(i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @intel_fixed_pow(i32 %0, i32 %1) {
%3 = tail call i32 @intel_fixed_log(i32 %0)
%4 = tail call i32 @intel_fixed_mul(i32 %3, i32 %1)
%5 = tail call i32 @intel_fixed_exp(i32 %4)
ret i32 %5
}
void NothingProc() { return; }


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

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

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

LLVM IR (-O2):
define void @NothingProc() {
ret void
}
/* Variables and functions */
scalar_t__ chroot(char *);
int main(void) {
  if (chroot("/") < 0)
    return 1;
  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 <chroot@plt>
cmp    $0x0,%rax
jge    1141 <main+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <main+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i32 @main() {
%1 = tail call i64 @chroot(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ shutdown_reflector();
void sighandler(int sig) { shutdown_reflector(); }


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

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

LLVM IR (-O0):
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @shutdown_reflector()
ret void
}

LLVM IR (-O2):
define void @sighandler(i32 %0) {
%2 = tail call i32 (...) @shutdown_reflector()
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

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


x86 assembly (clang, -O0):
<BigEndianWriteU32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
movslq -0x4(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BigEndianWriteU32>:
mov    %edi,%eax
sar    $0x18,%eax
cltq
mov    %rax,(%rsi)
mov    %edi,%eax
sar    $0x10,%eax
cltq
mov    %rax,0x8(%rsi)
movslq %edi,%rax
sar    $0x8,%edi
movslq %edi,%rcx
mov    %rcx,0x10(%rsi)
mov    %rax,0x18(%rsi)
ret

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

LLVM IR (-O2):
define void @BigEndianWriteU32(i32 %0, i64* nocapture writeonly %1) {
%3 = ashr i32 %0, 24
%4 = sext i32 %3 to i64
store i64 %4, i64* %1
%5 = ashr i32 %0, 16
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %1, i64 1
store i64 %6, i64* %7
%8 = ashr i32 %0, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %1, i64 2
store i64 %9, i64* %10
%11 = sext i32 %0 to i64
%12 = getelementptr inbounds i64, i64* %1, i64 3
store i64 %11, i64* %12
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ nrf_802154_pib_tx_power_get();
int8_t nrf_802154_tx_power_get(void) { return nrf_802154_pib_tx_power_get(); }


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

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

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

LLVM IR (-O2):
define i32 @nrf_802154_tx_power_get() {
%1 = tail call i32 (...) @nrf_802154_pib_tx_power_get()
ret i32 %1
}
OP(fd, f2) { op_f2(); }


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

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_f2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f2()
ret i32 undef
}
void constructor_derived_DPG_Solver_Face(struct Face *face_ptr,
                                         const struct Simulation *sim) {
  (void)(face_ptr);
  (void)(sim);
}


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

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

LLVM IR (-O0):
%struct.Face = type opaque
%struct.Simulation = type opaque
define void @constructor_derived_DPG_Solver_Face(%struct.Face* %0, %struct.Simulation* %1) {
%3 = alloca %struct.Face*
%4 = alloca %struct.Simulation*
store %struct.Face* %0, %struct.Face** %3
store %struct.Simulation* %1, %struct.Simulation** %4
%5 = load %struct.Face*, %struct.Face** %3
%6 = load %struct.Simulation*, %struct.Simulation** %4
ret void
}

LLVM IR (-O2):
%struct.Face = type opaque
%struct.Simulation = type opaque
define void @constructor_derived_DPG_Solver_Face(%struct.Face* nocapture %0, %struct.Simulation* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f(int signum) { printf("OUCH! \n"); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"OUCH! \0A\00"
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"OUCH! \00"
define void @f(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fatorial(int);
int superfatorial(int n) {
  int x;
  if (n <= 0)
    return 1;
  x = fatorial(n);
  return x * superfatorial(n - 1);
}


x86 assembly (clang, -O0):
<superfatorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1141 <superfatorial+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1168 <superfatorial+0x48>
mov    -0x8(%rbp),%edi
call   1030 <fatorial@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1040 <superfatorial@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<superfatorial>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1136 <superfatorial+0x26>
mov    %edi,%ebx
mov    $0x1,%ebp
xchg   %ax,%ax
mov    %ebx,%edi
call   1030 <fatorial@plt>
lea    -0x1(%rbx),%ecx
imul   %eax,%ebp
cmp    $0x1,%ebx
mov    %ecx,%ebx
ja     1120 <superfatorial+0x10>
jmp    113b <superfatorial+0x2b>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @superfatorial(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %16
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @fatorial(i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @superfatorial(i32 %13)
%15 = mul nsw i32 %11, %14
store i32 %15, i32* %2
br label %16
16: ; preds = %8, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @superfatorial(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 1, %1 ]
%6 = tail call i32 @fatorial(i32 %4)
%7 = add nsw i32 %4, -1
%8 = mul nsw i32 %6, %5
%9 = icmp ult i32 %4, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 1, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Type definitions */
struct hashmap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hashmap_get(struct hashmap *, char *, void **);
void *hashmap_get_value(struct hashmap *map, char *key) {
  void *value = NULL;
  hashmap_get(map, key, &value);
  return value;
}


x86 assembly (clang, -O0):
<hashmap_get_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <hashmap_get@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashmap_get_value>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdx
call   1030 <hashmap_get@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.hashmap = type { i32 }
define i8* @hashmap_get_value(%struct.hashmap* %0, i8* %1) {
%3 = alloca %struct.hashmap*
%4 = alloca i8*
%5 = alloca i8*
store %struct.hashmap* %0, %struct.hashmap** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load %struct.hashmap*, %struct.hashmap** %3
%7 = load i8*, i8** %4
%8 = call i32 @hashmap_get(%struct.hashmap* %6, i8* %7, i8** %5)
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
%struct.hashmap = type { i32 }
define i8* @hashmap_get_value(%struct.hashmap* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @hashmap_get(%struct.hashmap* %0, i8* %1, i8** %3)
%6 = load i8*, i8** %3
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void print_array(char array[], int size) {
  for (int i = 0; i < size; i++) {
    printf("Element: %c\n", array[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <print_array+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <print_array+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Element: %c\0A\00"
define void @print_array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Element: %c\0A\00"
define void @print_array(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Type definitions */
typedef unsigned int uint8_t;
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t FNV_hashStr(const char *data) {
  unsigned char *s = (unsigned char *)data;
  uint32_t hash = 2166136261U;
  while (*s) {
    hash = (16777619U * hash) ^ (uint8_t)*s++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<FNV_hashStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x811c9dc5,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <FNV_hashStr+0x47>
imul   $0x1000193,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <FNV_hashStr+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNV_hashStr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <FNV_hashStr+0x27>
add    $0x1,%rdi
mov    $0x811c9dc5,%eax
nop
imul   $0x1000193,%eax,%edx
movzbl %cl,%eax
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <FNV_hashStr+0x10>
ret
mov    $0x811c9dc5,%eax
ret

LLVM IR (-O0):
define i32 @FNV_hashStr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
store i32 -2128831035, i32* %4
br label %6
6: ; preds = %10, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32, i32* %4
%12 = mul i32 16777619, %11
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
%15 = load i8, i8* %13
%16 = zext i8 %15 to i32
%17 = xor i32 %12, %16
store i32 %17, i32* %4
br label %6
18: ; preds = %6
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @FNV_hashStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ -2128831035, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 16777619
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = zext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ -2128831035, %1 ], [ %11, %4 ]
ret i32 %15
}
void caller_2_2_1_2_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_2_1_2_1_2_1() {
ret void
}
/* Variables and functions */
scalar_t__ Pconcat();
scalar_t__ PstringToken();
scalar_t__ PvalueNameRef();
PstringValue() {
  int b = -1;
  ;
  b = PstringToken() || PvalueNameRef() || Pconcat();
  return (b);
}


x86 assembly (clang, -O0):
<PstringValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1030 <PstringToken@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1182 <PstringValue+0x52>
mov    $0x0,%al
call   1040 <PvalueNameRef@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1182 <PstringValue+0x52>
mov    $0x0,%al
call   1050 <Pconcat@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PstringValue>:
push   %rbx
xor    %eax,%eax
call   1030 <PstringToken@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    115d <PstringValue+0x2d>
xor    %eax,%eax
call   1040 <PvalueNameRef@plt>
test   %rax,%rax
jne    115d <PstringValue+0x2d>
xor    %eax,%eax
call   1050 <Pconcat@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @PstringValue() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i64 (...) @PstringToken()
%3 = icmp ne i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = call i64 (...) @PvalueNameRef()
%6 = icmp ne i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i64 (...) @Pconcat()
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %7, %4, %0
%11 = phi i1 [ true, %4 ], [ true, %0 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
store i32 %12, i32* %1
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @PstringValue() {
%1 = tail call i64 (...) @PstringToken()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i64 (...) @PvalueNameRef()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 (...) @Pconcat()
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 1, %3 ], [ 1, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
struct vert {
  int dummy;
};

/* Variables and functions */
int getDir(struct vert *, struct vert *);
int getDist(struct vert *, struct vert *);
int pathMustBeUndirected(struct vert *a, struct vert *b) {
  return getDir(a, b) != 2 || getDist(a, b) < 4;
}


x86 assembly (clang, -O0):
<pathMustBeUndirected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <getDir@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x2,%ecx
mov    %al,-0x11(%rbp)
jne    1163 <pathMustBeUndirected+0x43>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <getDist@plt>
cmp    $0x4,%eax
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathMustBeUndirected>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <getDir@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x2,%ecx
jne    1150 <pathMustBeUndirected+0x30>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <getDist@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4,%ecx
setl   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.vert = type { i32 }
define i32 @pathMustBeUndirected(%struct.vert* %0, %struct.vert* %1) {
%3 = alloca %struct.vert*
%4 = alloca %struct.vert*
store %struct.vert* %0, %struct.vert** %3
store %struct.vert* %1, %struct.vert** %4
%5 = load %struct.vert*, %struct.vert** %3
%6 = load %struct.vert*, %struct.vert** %4
%7 = call i32 @getDir(%struct.vert* %5, %struct.vert* %6)
%8 = icmp ne i32 %7, 2
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load %struct.vert*, %struct.vert** %3
%11 = load %struct.vert*, %struct.vert** %4
%12 = call i32 @getDist(%struct.vert* %10, %struct.vert* %11)
%13 = icmp slt i32 %12, 4
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ true, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.vert = type { i32 }
define i32 @pathMustBeUndirected(%struct.vert* %0, %struct.vert* %1) {
%3 = tail call i32 @getDir(%struct.vert* %0, %struct.vert* %1)
%4 = icmp eq i32 %3, 2
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @getDist(%struct.vert* %0, %struct.vert* %1)
%7 = icmp slt i32 %6, 4
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}