xunge/DecIR huggingface dataset:
int semanage_str_count(const char *data, char what) {
  int count = 0;
  if (!data)
    return 0;
  while (*data) {
    if (*data == what)
      ++count;
    ++data;
  }
  return count;
}


x86 assembly (clang, -O0):
<semanage_str_count>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    112c <semanage_str_count+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1171 <semanage_str_count+0x71>
jmp    1131 <semanage_str_count+0x31>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <semanage_str_count+0x6b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    115a <semanage_str_count+0x5a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1131 <semanage_str_count+0x31>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<semanage_str_count>:
xor    %eax,%eax
test   %rdi,%rdi
je     1135 <semanage_str_count+0x35>
mov    (%rdi),%cl
test   %cl,%cl
je     1135 <semanage_str_count+0x35>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <semanage_str_count+0x20>
ret

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

LLVM IR (-O2):
define i32 @semanage_str_count(i8* %0, i8 signext %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %17, label %7
7: ; preds = %4, %7
%8 = phi i8 [ %15, %7 ], [ %5, %4 ]
%9 = phi i32 [ %13, %7 ], [ 0, %4 ]
%10 = phi i8* [ %14, %7 ], [ %0, %4 ]
%11 = icmp eq i8 %8, %1
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %9, %12
%14 = getelementptr inbounds i8, i8* %10, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %7, %4, %2
%18 = phi i32 [ 0, %2 ], [ 0, %4 ], [ %13, %7 ]
ret i32 %18
}
void init_bone(void) {}


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

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

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

LLVM IR (-O2):
define void @init_bone() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void ADC3_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @ADC3_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @ADC3_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
size_t strlen(char const *);
char *strrchr(const char *cs, int c) {
  for (size_t i = strlen(cs); i >= 0; --i) {
    if (cs[i] == ((char)c)) {
      return (&cs[i]);
    }
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jb     1178 <strrchr+0x68>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x14(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1162 <strrchr+0x52>
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <strrchr+0x70>
jmp    1167 <strrchr+0x57>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <strrchr+0x1c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
movsbl %bpl,%ecx
add    %rbx,%rax
add    $0x1,%rax
nopl   0x0(%rax,%rax,1)
movsbl -0x1(%rax),%edx
add    $0xffffffffffffffff,%rax
cmp    %edx,%ecx
jne    1130 <strrchr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = shl i32 %1, 24
%5 = ashr exact i32 %4, 24
br label %6
6: ; preds = %6, %2
%7 = phi i64 [ %3, %2 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %5, %10
%12 = add i64 %7, -1
br i1 %11, label %13, label %6
13: ; preds = %6
%14 = getelementptr inbounds i8, i8* %0, i64 %7
ret i8* %14
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ x;
};
struct TYPE_4__ {
  TYPE_1__ xgraphicsexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xgraphicsexpose_x(void *_p) {
  return (int)((XEvent *)_p)->xgraphicsexpose.x;
}


x86 assembly (clang, -O0):
<get_XEvent_xgraphicsexpose_x>:
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_xgraphicsexpose_x>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xgraphicsexpose_x(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_xgraphicsexpose_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int main() {
  char a[] = "Hello world!";
  printf("%lu\n", strlen(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec3(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x11(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x21646c726f7720,%rax
mov    %rax,0xd(%rsp)
movabs $0x6f77206f6c6c6548,%rax
20 77 6f
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <strlen@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [13 x i8] c"Hello world!\00"
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8]
store i32 0, i32* %1
%3 = bitcast [13 x i8]* %2 to i8*
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [13 x i8] c"Hello world!\00"
@.str = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int TIOCM_CD;
int get_mlines(int);
int get_dcd(int fd) {
  if (get_mlines(fd) & TIOCM_CD)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<get_dcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <get_mlines@plt>
mov    0x2eb6(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1141 <get_dcd+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <get_dcd+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dcd>:
push   %rax
call   1030 <get_mlines@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
test   %eax,(%rdx)
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCM_CD = global i32 0
define i32 @get_dcd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @get_mlines(i32 %4)
%6 = load i32, i32* @TIOCM_CD
%7 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@TIOCM_CD = global i32 0
define i32 @get_dcd(i32 %0) {
%2 = tail call i32 @get_mlines(i32 %0)
%3 = load i32, i32* @TIOCM_CD
%4 = and i32 %3, %2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned short aciCrcUpdate(unsigned short crc, unsigned char data) {
  data ^= (crc & 0xff);
  data ^= data << 4;
  return ((((unsigned short)data << 8) | ((crc >> 8) & 0xff)) ^
          (unsigned char)(data >> 4) ^ ((unsigned short)data << 3));
}


x86 assembly (clang, -O0):
<aciCrcUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzwl -0x2(%rbp),%ecx
and    $0xff,%ecx
movzbl -0x3(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%ecx
shl    $0x4,%ecx
movzbl -0x3(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
movzwl %ax,%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
movzbl -0x3(%rbp),%ecx
sar    $0x4,%ecx
movzbl %cl,%ecx
xor    %ecx,%eax
movzbl -0x3(%rbp),%ecx
movzwl %cx,%ecx
shl    $0x3,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aciCrcUpdate>:
xor    %edi,%esi
mov    %esi,%eax
shl    $0x4,%al
xor    %sil,%al
movzbl %al,%eax
mov    %eax,%ecx
shl    $0x8,%ecx
shr    $0x8,%edi
or     %edi,%ecx
mov    %eax,%edx
shr    $0x4,%dl
movzbl %dl,%edx
shl    $0x3,%eax
xor    %edx,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @aciCrcUpdate(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = and i32 %6, 255
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = xor i32 %9, %7
%11 = trunc i32 %10 to i8
store i8 %11, i8* %4
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 4
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = xor i32 %16, %14
%18 = trunc i32 %17 to i8
store i8 %18, i8* %4
%19 = load i8, i8* %4
%20 = zext i8 %19 to i16
%21 = zext i16 %20 to i32
%22 = shl i32 %21, 8
%23 = load i16, i16* %3
%24 = zext i16 %23 to i32
%25 = ashr i32 %24, 8
%26 = and i32 %25, 255
%27 = or i32 %22, %26
%28 = load i8, i8* %4
%29 = zext i8 %28 to i32
%30 = ashr i32 %29, 4
%31 = trunc i32 %30 to i8
%32 = zext i8 %31 to i32
%33 = xor i32 %27, %32
%34 = load i8, i8* %4
%35 = zext i8 %34 to i16
%36 = zext i16 %35 to i32
%37 = shl i32 %36, 3
%38 = xor i32 %33, %37
%39 = trunc i32 %38 to i16
ret i16 %39
}

LLVM IR (-O2):
define zeroext i16 @aciCrcUpdate(i16 zeroext %0, i8 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = xor i8 %3, %1
%5 = shl i8 %4, 4
%6 = xor i8 %5, %4
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = lshr i16 %0, 8
%10 = zext i16 %9 to i32
%11 = or i32 %8, %10
%12 = lshr i8 %6, 4
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %7, 3
%15 = xor i32 %14, %13
%16 = xor i32 %15, %11
%17 = trunc i32 %16 to i16
ret i16 %17
}
void delMatrix(int **arr, int order) {
  int i = 0;
  for (i = 0; i < order; i++)
    free(arr[i]);
  free(arr);
}


x86 assembly (clang, -O0):
<delMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <delMatrix+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <delMatrix+0x1d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <delMatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <delMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @delMatrix(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
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 i32**, i32*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32*, i32** %11, i64 %13
%15 = load i32*, i32** %14
%16 = bitcast i32* %15 to i8*
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
%21 = load i32**, i32*** %3
%22 = bitcast i32** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @delMatrix(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ udp_ev3_close();
void ev3_uninit(void) { udp_ev3_close(); }


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

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

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

LLVM IR (-O2):
define void @ev3_uninit() {
%1 = tail call i32 (...) @udp_ev3_close()
ret void
}
const char *Function_Brief(void) { return "Function Object"; }


x86 assembly (clang, -O0):
<Function_Brief>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Function_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Function Object\00"
define i8* @Function_Brief() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"Function Object\00"
define i8* @Function_Brief() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
void RTCircBufFree(void) {}


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

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

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

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

/* Variables and functions */
int fegetenv(int /*<<< orphan*/ *);
int feholdexcept(fenv_t *envp) { return fegetenv(envp); }


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

x86 assembly (clang, -O2):
<feholdexcept>:
jmp    1030 <fegetenv@plt>

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

LLVM IR (-O2):
define i32 @feholdexcept(i32* %0) {
%2 = tail call i32 @fegetenv(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void finslib_milli_second_sleep(int msec) { usleep(1000 * msec); }


x86 assembly (clang, -O0):
<finslib_milli_second_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finslib_milli_second_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @finslib_milli_second_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 1000, %3
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @finslib_milli_second_sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  while (str[len] != 0)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int core4_safe(char const *);
int U_EMRSCALEWINDOWEXTEX_safe(const char *record) {
  return (core4_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMRSCALEWINDOWEXTEX_safe>:
jmp    1030 <core4_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSCALEWINDOWEXTEX_safe(i8* %0) {
%2 = tail call i32 @core4_safe(i8* %0)
ret i32 %2
}
void SysCtlADCSpeedSet(unsigned long ulSpeed) {

  ;
  ;
  (*((volatile unsigned long *)(0x400FE100))) =
      (((*((volatile unsigned long *)(0x400FE100))) & ~(0x00000F00)) | ulSpeed);
  (*((volatile unsigned long *)(0x400FE110))) =
      (((*((volatile unsigned long *)(0x400FE110))) & ~(0x00000F00)) | ulSpeed);
  (*((volatile unsigned long *)(0x400FE120))) =
      (((*((volatile unsigned long *)(0x400FE120))) & ~(0x00000F00)) | ulSpeed);
}


x86 assembly (clang, -O0):
<SysCtlADCSpeedSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400fe100,%eax
mov    (%rax),%rcx
and    $0xfffffffffffff0ff,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe100,%eax
mov    %rcx,(%rax)
mov    $0x400fe110,%eax
mov    (%rax),%rcx
and    $0xfffffffffffff0ff,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe110,%eax
mov    %rcx,(%rax)
mov    $0x400fe120,%eax
mov    (%rax),%rcx
and    $0xfffffffffffff0ff,%rcx
or     -0x8(%rbp),%rcx
mov    $0x400fe120,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlADCSpeedSet>:
mov    $0xfffffffffffff0ff,%rax
mov    0x400fe100,%rcx
40
and    %rax,%rcx
or     %rdi,%rcx
mov    %rcx,0x400fe100
40
mov    0x400fe110,%rcx
40
and    %rax,%rcx
or     %rdi,%rcx
mov    %rcx,0x400fe110
40
and    0x400fe120,%rax
40
or     %rdi,%rax
mov    %rax,0x400fe120
40
ret

LLVM IR (-O0):
define void @SysCtlADCSpeedSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1074782464 to i64*)
%4 = and i64 %3, -3841
%5 = load i64, i64* %2
%6 = or i64 %4, %5
store volatile i64 %6, i64* inttoptr (i64 1074782464 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1074782480 to i64*)
%8 = and i64 %7, -3841
%9 = load i64, i64* %2
%10 = or i64 %8, %9
store volatile i64 %10, i64* inttoptr (i64 1074782480 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1074782496 to i64*)
%12 = and i64 %11, -3841
%13 = load i64, i64* %2
%14 = or i64 %12, %13
store volatile i64 %14, i64* inttoptr (i64 1074782496 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlADCSpeedSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074782464 to i64*)
%3 = and i64 %2, -3841
%4 = or i64 %3, %0
store volatile i64 %4, i64* inttoptr (i64 1074782464 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1074782480 to i64*)
%6 = and i64 %5, -3841
%7 = or i64 %6, %0
store volatile i64 %7, i64* inttoptr (i64 1074782480 to i64*)
%8 = load volatile i64, i64* inttoptr (i64 1074782496 to i64*)
%9 = and i64 %8, -3841
%10 = or i64 %9, %0
store volatile i64 %10, i64* inttoptr (i64 1074782496 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_pin(int);
int /*<<< orphan*/ set_pin(int);
void clock() {
  set_pin((1 << 2));
  clear_pin((1 << 2));
}


x86 assembly (clang, -O0):
<clock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <set_pin@plt>
mov    $0x4,%edi
call   1040 <clear_pin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock>:
push   %rax
mov    $0x4,%edi
call   1030 <set_pin@plt>
mov    $0x4,%edi
pop    %rax
jmp    1040 <clear_pin@plt>

LLVM IR (-O0):
define void @clock() {
%1 = call i32 @set_pin(i32 4)
%2 = call i32 @clear_pin(i32 4)
ret void
}

LLVM IR (-O2):
define void @clock() {
%1 = tail call i32 @set_pin(i32 4)
%2 = tail call i32 @clear_pin(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void ws_default_errhandler(int level, char *msg) {
  fprintf(stderr, "%d: %s", level, msg);
  if (!level) {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<ws_default_errhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    115c <ws_default_errhandler+0x3c>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_default_errhandler>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
test   %ebx,%ebx
je     1143 <ws_default_errhandler+0x23>
pop    %rbx
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%d: %s\00"
define void @ws_default_errhandler(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%d: %s\00"
define void @ws_default_errhandler(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x09() {
  Assert_real((islower(9) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              50, ("islower should be 0 for 0x09"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x09>:
push   %rax
mov    $0x9,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x09\00"
define void @t_islower_0x09() {
%1 = call i64 @islower(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x09\00"
define void @t_islower_0x09() {
%1 = tail call i64 @islower(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int write_exact(char *, int);
int write_cmd(char *buf, int len) {
  char li;
  li = (len >> 8) & 0xff;
  write_exact(&li, 1);
  li = len & 0xff;
  write_exact(&li, 1);
  return write_exact(buf, len);
}


x86 assembly (clang, -O0):
<write_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,-0xd(%rbp)
lea    -0xd(%rbp),%rdi
mov    $0x1,%esi
call   1030 <write_exact@plt>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,-0xd(%rbp)
lea    -0xd(%rbp),%rdi
mov    $0x1,%esi
call   1030 <write_exact@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <write_exact@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_cmd>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r15
mov    %bh,0xf(%rsp)
lea    0xf(%rsp),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <write_exact@plt>
mov    %bl,0xf(%rsp)
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <write_exact@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <write_exact@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @write_cmd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = call i32 @write_exact(i8* %5, i32 1)
%11 = load i32, i32* %4
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
store i8 %13, i8* %5
%14 = call i32 @write_exact(i8* %5, i32 1)
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @write_exact(i8* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @write_cmd(i8* %0, i32 %1) {
%3 = alloca i8
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = call i32 @write_exact(i8* %3, i32 1)
%7 = trunc i32 %1 to i8
store i8 %7, i8* %3
%8 = call i32 @write_exact(i8* %3, i32 1)
%9 = call i32 @write_exact(i8* %0, i32 %1)
ret i32 %9
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void AESIntDisable(uint32_t intFlags) {

  ;
  (*((volatile unsigned long *)(0x40024000 + 0x00000784))) &= ~intFlags;
}


x86 assembly (clang, -O0):
<AESIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x40024784,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x40024784,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
not    %rax
and    %rax,0x40024784
40
ret

LLVM IR (-O0):
define void @AESIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1073891204 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1073891204 to i64*)
ret void
}

LLVM IR (-O2):
define void @AESIntDisable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1073891204 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1073891204 to i64*)
ret void
}
void foo55() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_is_cursor_position() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c, lw;
  lw = 0;
  while ((c = getchar()) != EOF) {
    if (c != ' ' || lw != ' ')
      putchar(c);
    lw = c;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1176 <main+0x56>
cmpl   $0x20,-0x8(%rbp)
jne    1163 <main+0x43>
cmpl   $0x20,-0xc(%rbp)
je     116b <main+0x4b>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1141 <main+0x21>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %ebx,%ebx
jmp    1163 <main+0x43>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
je     1137 <main+0x17>
mov    %ebx,%ecx
mov    %eax,%ebx
cmp    $0x20,%ecx
jne    1150 <main+0x30>
cmp    $0x20,%ebx
je     1157 <main+0x37>
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %17, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 32
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 32
br i1 %13, label %14, label %17
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = call i32 @putchar(i32 %15)
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %2
store i32 %18, i32* %3
br label %4
19: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %16, label %4
4: ; preds = %0, %12
%5 = phi i32 [ %13, %12 ], [ %1, %0 ]
%6 = phi i32 [ %5, %12 ], [ 0, %0 ]
%7 = icmp ne i32 %5, 32
%8 = icmp ne i32 %6, 32
%9 = or i1 %8, %7
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 @putchar(i32 %5)
br label %12
12: ; preds = %4, %10
%13 = tail call i32 (...) @getchar()
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %4
16: ; preds = %12, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *prgm_name) {
  printf("%s [errno]\n", prgm_name);
  printf("  Translates a given errno into a system error string\n");
  printf("  using the library call strerror().\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s [errno]\0A\00"
@.str.1 = [55 x i8] c" Translates a given errno into a system error string\0A\00"
@.str.2 = [38 x i8] c" using the library call strerror().\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s [errno]\0A\00"
@str = [54 x i8] c" Translates a given errno into a system error string\00"
@str.3 = [37 x i8] c" using the library call strerror().\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
void exec_assembler(void) { error(1); }


x86 assembly (clang, -O0):
<exec_assembler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_assembler>:
mov    $0x1,%edi
jmp    1030 <error@plt>

LLVM IR (-O0):
define void @exec_assembler() {
%1 = call i32 @error(i32 1)
ret void
}

LLVM IR (-O2):
define void @exec_assembler() {
%1 = tail call i32 @error(i32 1)
ret void
}
void x11_xorg(void) {}


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

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

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

LLVM IR (-O2):
define void @x11_xorg() {
ret void
}
int test_imm_9Fint32_mem(int *val) {
  return ((*val) & (0x9F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Fint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 159
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo(int *x) {
  int a;
  for (a = 0; a < 2; a++)
    if (x[a])
      goto lab;
  __builtin_unreachable();
lab:;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1143 <foo+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1130 <foo+0x30>
jmp    1143 <foo+0x43>
jmp    1135 <foo+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <foo+0xf>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %7
br label %20
15: ; preds = %7
br label %16
16: ; preds = %15
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
unreachable
20: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
ret void
}
void rop3_118_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = T & stk4;
  stk2 = *D | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_118_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xe(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_118_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8, i8* %10
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = or i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8, i8* %6
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i8, i8* %5
%48 = zext i8 %47 to i32
%49 = and i32 %46, %48
%50 = or i32 %43, %49
%51 = load i8*, i8** %4
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = load i8, i8* %6
%55 = zext i8 %54 to i32
%56 = and i32 %53, %55
%57 = or i32 %50, %56
%58 = trunc i32 %57 to i8
%59 = load i8*, i8** %4
store i8 %58, i8* %59
ret void
}

LLVM IR (-O2):
define void @rop3_118_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
void foo691(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo691(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *ya_malloc(size_t size) {
  void *m = malloc(size);
  if (!m) {
    fprintf(stderr, "The end of the world. Malloc failed and I will "
                    "crash and burn.\n");
    fflush(stderr);
    abort();
  }
  return m;
}


x86 assembly (clang, -O0):
<ya_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    118e <ya_malloc+0x4e>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ya_malloc>:
push   %rbx
call   1050 <malloc@plt>
test   %rax,%rax
je     114d <ya_malloc+0xd>
pop    %rbx
ret
mov    0x2e8c(%rip),%rbx
mov    (%rbx),%edi
lea    0xea3(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"The end of the world. Malloc failed and I will crash and burn.\0A\00"
define i8* @ya_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 @fflush(i32 %11)
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"The end of the world. Malloc failed and I will crash and burn.\0A\00"
define noalias i8* @ya_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: isprefix.driver TIP ICEBERG\n");
  exit(2);
}


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    $0x2,%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    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: isprefix.driver TIP ICEBERG\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: isprefix.driver TIP ICEBERG\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}