xunge/DecIR huggingface dataset:
void rop3_58_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D ^ S;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_58_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%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
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%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_58_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
xor    %sil,%cl
or     %dl,%cl
xor    %sil,%cl
mov    %edx,%eax
not    %al
or     %sil,%al
and    %cl,%al
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_58_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, %1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_mov_to_DPTR(FILE *stream, uint8_t data16_high, uint8_t data16_low) {
  fprintf(stream,
          "MOV   DPTR, #"
          "0x%04X"
          "             ",
          (data16_high << 8) + data16_low);
}


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

x86 assembly (clang, -O2):
<fprint_mov_to_DPTR>:
shl    $0x8,%esi
add    %esi,%edx
lea    0xee4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"MOV DPTR,x%04X \00"
define void @fprint_mov_to_DPTR(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = shl i32 %8, 8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"MOV DPTR,x%04X \00"
define void @fprint_mov_to_DPTR(i32* nocapture %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 8
%5 = add nsw i32 %4, %2
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CCM_2_DriverIRQHandler();
__attribute__((weak)) void CCM_2_IRQHandler(void) { CCM_2_DriverIRQHandler(); }


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

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

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

LLVM IR (-O2):
define weak void @CCM_2_IRQHandler() {
%1 = tail call i32 (...) @CCM_2_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ array_get_size(void const *);
bool array_is_empty(const void *array) {
  return ((array == NULL) || !(array_get_size(array)));
}


x86 assembly (clang, -O0):
<array_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1140 <array_is_empty+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <array_get_size@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_is_empty>:
test   %rdi,%rdi
je     1129 <array_is_empty+0x19>
push   %rax
call   1030 <array_get_size@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @array_is_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @array_get_size(i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br label %10
10: ; preds = %5, %1
%11 = phi i1 [ true, %1 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @array_is_empty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @array_get_size(i8* %0)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
int isPowerOfP(int n, int p) {
  if (n == 0)
    return 0;
  while (n % p == 0) {
    n /= p;
  }
  return n == 1;
}


x86 assembly (clang, -O0):
<isPowerOfP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <isPowerOfP+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1155 <isPowerOfP+0x55>
jmp    1125 <isPowerOfP+0x25>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1146 <isPowerOfP+0x46>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1125 <isPowerOfP+0x25>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPowerOfP>:
test   %edi,%edi
je     1129 <isPowerOfP+0x29>
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
cltd
idiv   %esi
test   %edx,%edx
jne    1120 <isPowerOfP+0x20>
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,%edi
jmp    1110 <isPowerOfP+0x10>
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPowerOfP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %23
9: ; preds = %2
br label %10
10: ; preds = %15, %9
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %10
%16 = load i32, i32* %5
%17 = load i32, i32* %4
%18 = sdiv i32 %17, %16
store i32 %18, i32* %4
br label %10
19: ; preds = %10
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 1
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %19, %8
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @isPowerOfP(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = srem i32 %0, %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4, %7
%8 = phi i32 [ %9, %7 ], [ %0, %4 ]
%9 = sdiv i32 %8, %1
%10 = srem i32 %9, %1
%11 = icmp eq i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %4
%13 = phi i32 [ %0, %4 ], [ %9, %7 ]
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %2, %12
%17 = phi i32 [ %15, %12 ], [ 0, %2 ]
ret i32 %17
}
double trunc(double x) { return __builtin_trunc(x); }


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

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

LLVM IR (-O0):
define double @trunc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.trunc.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @trunc(double %0) {
%2 = tail call double @llvm.trunc.f64(double %0)
ret double %2
}
/* Variables and functions */
scalar_t__ strlen(char const *);
char *strncpy(char *, char const *, scalar_t__);
char *strcpy(char *dst, const char *src) {
  return strncpy(dst, src, strlen(src) + 1);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @strncpy(i8* %5, i8* %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %4)
ret i8* %0
}
/* Variables and functions */
int _vga_get_cursor_position_offset();
int vga_get_cursor_position_row();
int vga_get_cursor_position_column(void) {
  return ((_vga_get_cursor_position_offset() / 2) -
          (vga_get_cursor_position_row() * 80));
}


x86 assembly (clang, -O0):
<vga_get_cursor_position_column>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <_vga_get_cursor_position_offset@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <vga_get_cursor_position_row@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
imul   $0x50,%ecx,%ecx
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vga_get_cursor_position_column>:
push   %rbx
xor    %eax,%eax
call   1040 <_vga_get_cursor_position_offset@plt>
mov    %eax,%ebx
shr    $0x1f,%eax
add    %eax,%ebx
sar    %ebx
xor    %eax,%eax
call   1030 <vga_get_cursor_position_row@plt>
shl    $0x4,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @vga_get_cursor_position_column() {
%1 = call i32 (...) @_vga_get_cursor_position_offset()
%2 = sdiv i32 %1, 2
%3 = call i32 (...) @vga_get_cursor_position_row()
%4 = mul nsw i32 %3, 80
%5 = sub nsw i32 %2, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @vga_get_cursor_position_column() {
%1 = tail call i32 (...) @_vga_get_cursor_position_offset()
%2 = sdiv i32 %1, 2
%3 = tail call i32 (...) @vga_get_cursor_position_row()
%4 = mul i32 %3, -80
%5 = add i32 %4, %2
ret i32 %5
}
/* Type definitions */
struct udev {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ get_sys_link(struct udev *, char *, char const *, char *,
                                size_t);
ssize_t util_get_sys_driver(struct udev *udev, const char *syspath,
                            char *driver, size_t size) {
  return get_sys_link(udev, "driver", syspath, driver, size);
}


x86 assembly (clang, -O0):
<util_get_sys_driver>:
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),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xec1(%rip),%rsi
call   1030 <get_sys_link@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_get_sys_driver>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee0(%rip),%rsi
jmp    1030 <get_sys_link@plt>

LLVM IR (-O0):
%struct.udev = type { i32 }
@.str = [7 x i8] c"driver\00"
define i32 @util_get_sys_driver(%struct.udev* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca %struct.udev*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store %struct.udev* %0, %struct.udev** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load %struct.udev*, %struct.udev** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @get_sys_link(%struct.udev* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.udev = type { i32 }
@.str = [7 x i8] c"driver\00"
define i32 @util_get_sys_driver(%struct.udev* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @get_sys_link(%struct.udev* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i64 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ CurrentTime;
int /*<<< orphan*/ PointerRoot;
int /*<<< orphan*/ RevertToPointerRoot;
int /*<<< orphan*/ XSetInputFocus(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/);
void reset_focus(Display *d, XEvent *e) {
  XSetInputFocus(d, PointerRoot, RevertToPointerRoot, CurrentTime);
}


x86 assembly (clang, -O0):
<reset_focus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ecx
call   1030 <XSetInputFocus@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_focus>:
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
mov    0x2eb7(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <XSetInputFocus@plt>

LLVM IR (-O0):
@PointerRoot = global i32 0
@RevertToPointerRoot = global i32 0
@CurrentTime = global i32 0
define void @reset_focus(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* @PointerRoot
%7 = load i32, i32* @RevertToPointerRoot
%8 = load i32, i32* @CurrentTime
%9 = call i32 @XSetInputFocus(i32* %5, i32 %6, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@PointerRoot = global i32 0
@RevertToPointerRoot = global i32 0
@CurrentTime = global i32 0
define void @reset_focus(i32* %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @PointerRoot
%4 = load i32, i32* @RevertToPointerRoot
%5 = load i32, i32* @CurrentTime
%6 = tail call i32 @XSetInputFocus(i32* %0, i32 %3, i32 %4, i32 %5)
ret void
}
double __min_double(double x, double y) { return ((x) > (y) ? (y) : (x)); }


x86 assembly (clang, -O0):
<__min_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <__min_double+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <__min_double+0x37>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__min_double>:
minsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @__min_double(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
br label %12
10: ; preds = %2
%11 = load double, double* %3
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @__min_double(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Type definitions */
struct foobar {
  int dummy;
};
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  struct foobar *a;
  printf("%ld\n", sizeof(a));
  return 0;
}


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

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

LLVM IR (-O0):
%struct.foobar = type { i32 }
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.foobar*
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
%struct.foobar = type { i32 }
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
unsigned int bmin_uint(unsigned int a, unsigned int b) {
  return (a < b ? a : b);
}


x86 assembly (clang, -O0):
<bmin_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <bmin_uint+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <bmin_uint+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmin_uint>:
mov    %esi,%eax
cmp    %esi,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @bmin_uint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @bmin_uint(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int insertionsort() { return 0; }


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

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

LLVM IR (-O0):
define i32 @insertionsort() {
ret i32 0
}

LLVM IR (-O2):
define i32 @insertionsort() {
ret i32 0
}
void avpriv_get_gamma_from_trc() {}


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

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

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

LLVM IR (-O2):
define void @avpriv_get_gamma_from_trc() {
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
char *carmen_file_extension(const char *filename) {
  return strrchr(filename, '.');
}


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

x86 assembly (clang, -O2):
<carmen_file_extension>:
mov    $0x2e,%esi
jmp    1030 <strrchr@plt>

LLVM IR (-O0):
define i8* @carmen_file_extension(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strrchr(i8* %3, i8 signext 46)
ret i8* %4
}

LLVM IR (-O2):
define i8* @carmen_file_extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
ret i8* %2
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t ror32(uint32_t word, unsigned int shift) {
  return (word >> shift) | (word << (32 - shift));
}


x86 assembly (clang, -O0):
<ror32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror32>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @ror32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ror32(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
double floating_point_bit_fields_message2_signal2_decode(float value) {
  return ((double)value);
}


x86 assembly (clang, -O0):
<floating_point_bit_fields_message2_signal2_decode>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floating_point_bit_fields_message2_signal2_decode>:
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @floating_point_bit_fields_message2_signal2_decode(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
ret double %4
}

LLVM IR (-O2):
define double @floating_point_bit_fields_message2_signal2_decode(float %0) {
%2 = fpext float %0 to double
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ mutex_fact_achievable(int, int);
int gam_order(int g, int f) {
  if (!mutex_fact_achievable(f, g))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<gam_order>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <mutex_fact_achievable@plt>
cmp    $0x0,%eax
jne    113e <gam_order+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <gam_order+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gam_order>:
push   %rax
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
call   1030 <mutex_fact_achievable@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gam_order(i32 %0, i32 %1) {
%3 = tail call i32 @mutex_fact_achievable(i32 %1, i32 %0)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void borra_ll(int *head, int *tail, int *ll) {
  int l;
  int temp;
  if (*head == -1)
    return;
  l = *head;
  while (l != -1) {
    temp = ll[l];
    ll[l] = -1;
    l = temp;
  }
  *head = -1;
  *tail = -1;
}


x86 assembly (clang, -O0):
<borra_ll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    1122 <borra_ll+0x22>
jmp    1171 <borra_ll+0x71>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
je     115d <borra_ll+0x5d>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <borra_ll+0x2b>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<borra_ll>:
mov    (%rdi),%eax
cmp    $0xffffffff,%eax
je     112e <borra_ll+0x2e>
nopw   0x0(%rax,%rax,1)
movslq %eax,%rcx
mov    (%rdx,%rcx,4),%eax
movl   $0xffffffff,(%rdx,%rcx,4)
cmp    $0xffffffff,%eax
jne    1110 <borra_ll+0x10>
movl   $0xffffffff,(%rdi)
movl   $0xffffffff,(%rsi)
ret

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

LLVM IR (-O2):
define void @borra_ll(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = icmp eq i32 %4, -1
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ %4, %3 ]
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %2, i64 %8
%10 = load i32, i32* %9
store i32 -1, i32* %9
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %6
12: ; preds = %6
store i32 -1, i32* %0
store i32 -1, i32* %1
br label %13
13: ; preds = %3, %12
ret void
}
int fun_00(char *x, char *y, int z) { return ((x[1] & x[2]) == 0) + z; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    0x2(%rdi),%cl
and    0x1(%rdi),%cl
mov    %edx,%eax
cmp    $0x1,%cl
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @fun_00(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = and i32 %10, %14
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = load i32, i32* %6
%19 = add nsw i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @fun_00(i8* nocapture %0, i8* nocapture readnone %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = and i8 %7, %5
%9 = icmp eq i8 %8, 0
%10 = zext i1 %9 to i32
%11 = add nsw i32 %10, %2
ret i32 %11
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ CEC_MSG_SET_AUDIO_RATE;
void cec_msg_set_audio_rate(struct cec_msg *msg, __u8 audio_rate) {
  msg->len = 3;
  msg->msg[1] = CEC_MSG_SET_AUDIO_RATE;
  msg->msg[2] = audio_rate;
}


x86 assembly (clang, -O0):
<cec_msg_set_audio_rate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    0x2ecc(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_msg_set_audio_rate>:
movl   $0x3,(%rdi)
mov    0x2edb(%rip),%rax
mov    (%rax),%eax
mov    0x8(%rdi),%rcx
mov    %eax,0x4(%rcx)
mov    %esi,0x8(%rcx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_SET_AUDIO_RATE = global i32 0
define void @cec_msg_set_audio_rate(%struct.cec_msg* %0, i32 %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32 %1, i32* %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
store i32 3, i32* %6
%7 = load i32, i32* @CEC_MSG_SET_AUDIO_RATE
%8 = load %struct.cec_msg*, %struct.cec_msg** %3
%9 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %8, i32 0, i32 1
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 %7, i32* %11
%12 = load i32, i32* %4
%13 = load %struct.cec_msg*, %struct.cec_msg** %3
%14 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %13, i32 0, i32 1
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 2
store i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_SET_AUDIO_RATE = global i32 0
define void @cec_msg_set_audio_rate(%struct.cec_msg* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
store i32 3, i32* %3
%4 = load i32, i32* @CEC_MSG_SET_AUDIO_RATE
%5 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%6 = load i32*, i32** %5
%7 = getelementptr inbounds i32, i32* %6, i64 1
store i32 %4, i32* %7
%8 = getelementptr inbounds i32, i32* %6, i64 2
store i32 %1, i32* %8
ret void
}
void fa42(void) {
a:
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    p01B:
      goto p01B;
      goto a;
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa42>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <fa42+0x9>
jmp    1109 <fa42+0x9>

x86 assembly (clang, -O2):
<fa42>:
jmp    1100 <fa42>

LLVM IR (-O0):
define void @fa42() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %0
br label %8
8: ; preds = %8, %7
br label %8
9: ; No predecessors!
br label %10
10: ; preds = %10, %9
br label %10
11: ; preds = %11
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa42() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
char toupper(char);
void doUpper(void) {
  char ch;
  while ((ch = getchar()) != '\n')
    putchar(toupper(ch));
  putchar('\n');
}


x86 assembly (clang, -O0):
<doUpper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     1164 <doUpper+0x34>
movsbl -0x1(%rbp),%edi
call   1040 <toupper@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1138 <doUpper+0x8>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doUpper>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%al
je     115d <doUpper+0x2d>
movsbl %al,%edi
call   1040 <toupper@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1140 <doUpper+0x10>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @doUpper() {
%1 = alloca i8
br label %2
2: ; preds = %6, %0
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load i8, i8* %1
%8 = call signext i8 @toupper(i8 signext %7)
%9 = call i32 @putchar(i8 signext %8)
br label %2
10: ; preds = %2
%11 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @doUpper() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp eq i8 %1, 10
br i1 %2, label %9, label %3
3: ; preds = %0, %3
%4 = phi i8 [ %7, %3 ], [ %1, %0 ]
%5 = tail call signext i8 @toupper(i8 signext %4)
%6 = tail call i32 @putchar(i8 signext %5)
%7 = tail call signext i8 (...) @getchar()
%8 = icmp eq i8 %7, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %0
%10 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Type definitions */
struct IP {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ locate_network(char *);
int /*<<< orphan*/ update_network_direct(int /*<<< orphan*/, struct IP *);
void update_network(char *look_for, struct IP *ip) {
  update_network_direct(locate_network(look_for), ip);
}


x86 assembly (clang, -O0):
<update_network>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <locate_network@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <update_network_direct@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_network>:
push   %rbx
mov    %rsi,%rbx
call   1030 <locate_network@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <update_network_direct@plt>

LLVM IR (-O0):
%struct.IP = type { i32 }
define void @update_network(i8* %0, %struct.IP* %1) {
%3 = alloca i8*
%4 = alloca %struct.IP*
store i8* %0, i8** %3
store %struct.IP* %1, %struct.IP** %4
%5 = load i8*, i8** %3
%6 = call i32 @locate_network(i8* %5)
%7 = load %struct.IP*, %struct.IP** %4
%8 = call i32 @update_network_direct(i32 %6, %struct.IP* %7)
ret void
}

LLVM IR (-O2):
%struct.IP = type { i32 }
define void @update_network(i8* %0, %struct.IP* %1) {
%3 = tail call i32 @locate_network(i8* %0)
%4 = tail call i32 @update_network_direct(i32 %3, %struct.IP* %1)
ret void
}
int Cyc_Character_islower(unsigned char c) { return c >= 'a' ? c <= 'z' : 0; }


x86 assembly (clang, -O0):
<Cyc_Character_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     112e <Cyc_Character_islower+0x2e>
movzbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
jmp    1138 <Cyc_Character_islower+0x38>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1138 <Cyc_Character_islower+0x38>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Character_islower>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @Cyc_Character_islower(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 122
%10 = zext i1 %9 to i32
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %6
%13 = phi i32 [ %10, %6 ], [ 0, %11 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @Cyc_Character_islower(i8 zeroext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX1(int);
int /*<<< orphan*/ LSR8(int /*<<< orphan*/);
void Op5EM1X1(void) { LSR8(AbsoluteIndexedXX1(3)); }


x86 assembly (clang, -O0):
<Op5EM1X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
call   1040 <LSR8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op5EM1X1>:
push   %rax
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <LSR8@plt>

LLVM IR (-O0):
define void @Op5EM1X1() {
%1 = call i32 @AbsoluteIndexedXX1(i32 3)
%2 = call i32 @LSR8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op5EM1X1() {
%1 = tail call i32 @AbsoluteIndexedXX1(i32 3)
%2 = tail call i32 @LSR8(i32 %1)
ret void
}
sub3(i) int i;
{ return i - (5 + i); }


x86 assembly (clang, -O0):
<sub3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x5,%ecx
sub    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sub3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 5, %4
%6 = sub nsw i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @sub3(i32 %0) {
ret i32 -5
}
/* Variables and functions */
int dialog_editbox(char const *, char *, int /*<<< orphan*/,
                   int /*<<< orphan*/);
int /*<<< orphan*/ numeric_arg(char **, int);
int call_editbox(const char *t, char *av[], int *offset_add) {
  *offset_add = 4;
  return dialog_editbox(t, av[1], numeric_arg(av, 2), numeric_arg(av, 3));
}


x86 assembly (clang, -O0):
<call_editbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1040 <numeric_arg@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1040 <numeric_arg@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
call   1030 <dialog_editbox@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_editbox>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movl   $0x4,(%rdx)
mov    0x8(%rsi),%r15
mov    %rsi,%rdi
mov    $0x2,%esi
call   1040 <numeric_arg@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <numeric_arg@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dialog_editbox@plt>

LLVM IR (-O0):
define i32 @call_editbox(i8* %0, i8** %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
store i32 4, i32* %7
%8 = load i8*, i8** %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = call i32 @numeric_arg(i8** %12, i32 2)
%14 = load i8**, i8*** %5
%15 = call i32 @numeric_arg(i8** %14, i32 3)
%16 = call i32 @dialog_editbox(i8* %8, i8* %11, i32 %13, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @call_editbox(i8* %0, i8** %1, i32* nocapture writeonly %2) {
store i32 4, i32* %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @numeric_arg(i8** %1, i32 2)
%7 = tail call i32 @numeric_arg(i8** %1, i32 3)
%8 = tail call i32 @dialog_editbox(i8* %0, i8* %5, i32 %6, i32 %7)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int mvwprintw(int /*<<< orphan*/ *, int, int, char const *, int);
int i_mvwprintw(WINDOW *win, int y, int x, const char *fmt, int i) {
  return (mvwprintw(win, y, x, fmt, i));
}


x86 assembly (clang, -O0):
<i_mvwprintw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <mvwprintw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_mvwprintw>:
jmp    1030 <mvwprintw@plt>

LLVM IR (-O0):
define i32 @i_mvwprintw(i32* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @mvwprintw(i32* %11, i32 %12, i32 %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @i_mvwprintw(i32* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @mvwprintw(i32* %0, i32 %1, i32 %2, i8* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ nap();
void execute() { nap(); }


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

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

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

LLVM IR (-O2):
define void @execute() {
%1 = tail call i32 (...) @nap()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ lfs2_frombe32(int /*<<< orphan*/);
uint32_t lfs2_tobe32(uint32_t a) { return lfs2_frombe32(a); }


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

x86 assembly (clang, -O2):
<lfs2_tobe32>:
jmp    1030 <lfs2_frombe32@plt>

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

LLVM IR (-O2):
define i32 @lfs2_tobe32(i32 %0) {
%2 = tail call i32 @lfs2_frombe32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_send_pkt_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::send_pkt (rtpp_stream_send_pkt) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


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

x86 assembly (clang, -O2):
<rtpp_stream_send_pkt_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [85 x i8] c"Method rtpp_stream@%p::send_pkt (rtpp_stream_send_pkt) is invoked after destruction\0A\00"
define void @rtpp_stream_send_pkt_fin(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 ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [85 x i8] c"Method rtpp_stream@%p::send_pkt (rtpp_stream_send_pkt) is invoked after destruction\0A\00"
define void @rtpp_stream_send_pkt_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void abe_aps_tuning(void) {}


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

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

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

LLVM IR (-O2):
define void @abe_aps_tuning() {
ret void
}
unsigned char get_byte(const unsigned char *inp, unsigned int bitpos) {
  const unsigned char *addr;
  addr = inp + (bitpos >> 3);
  return (addr[0] << (bitpos & 7)) | (addr[1] >> (8 - (bitpos & 7)));
}


x86 assembly (clang, -O0):
<get_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x3,%ecx
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
shl    %cl,%eax
mov    -0x18(%rbp),%rcx
movzbl 0x1(%rcx),%edx
mov    -0xc(%rbp),%esi
and    $0x7,%esi
mov    $0x8,%ecx
sub    %esi,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_byte>:
mov    %esi,%ecx
mov    %esi,%eax
shr    $0x3,%rax
movzbl 0x1(%rdi,%rax,1),%edx
movzbl (%rdi,%rax,1),%eax
shl    $0x8,%eax
or     %edx,%eax
and    $0x7,%cl
shl    %cl,%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define zeroext i8 @get_byte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = lshr i32 %7, 3
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = load i32, i32* %4
%16 = and i32 %15, 7
%17 = shl i32 %14, %16
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i32, i32* %4
%23 = and i32 %22, 7
%24 = sub i32 8, %23
%25 = ashr i32 %21, %24
%26 = or i32 %17, %25
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @get_byte(i8* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %7
%9 = trunc i32 %1 to i8
%10 = tail call i8 @llvm.fshl.i8(i8 %6, i8 %8, i8 %9)
ret i8 %10
}