xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
main() {
  char *opername = "Addition";
  printf("%s", opername);
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"Addition\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __NR_pivot_root;
int syscall(int /*<<< orphan*/, char const *, char const *);
int raw_pivot_root(const char *new_root, const char *old_root) {
  return syscall(__NR_pivot_root, new_root, old_root);
}


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

x86 assembly (clang, -O2):
<raw_pivot_root>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_pivot_root = global i32 0
define i32 @raw_pivot_root(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @__NR_pivot_root
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @syscall(i32 %5, i8* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@__NR_pivot_root = global i32 0
define i32 @raw_pivot_root(i8* %0, i8* %1) {
%3 = load i32, i32* @__NR_pivot_root
%4 = tail call i32 @syscall(i32 %3, i8* %0, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int TargetEnableSlowTests(void) {
  return !!getenv("ENABLE_SLOW_TESTS") || !!getenv("ENABLE_VERY_SLOW_TESTS");
}


x86 assembly (clang, -O0):
<TargetEnableSlowTests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x1(%rbp)
jne    114d <TargetEnableSlowTests+0x3d>
lea    0xed7(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TargetEnableSlowTests>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     112a <TargetEnableSlowTests+0x1a>
pop    %rcx
ret
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"ENABLE_SLOW_TESTS\00"
@.str.1 = [23 x i8] c"ENABLE_VERY_SLOW_TESTS\00"
define i32 @TargetEnableSlowTests() {
%1 = call i32 @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = call i32 @getenv(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
br label %8
8: ; preds = %3, %0
%9 = phi i1 [ true, %0 ], [ %7, %3 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [18 x i8] c"ENABLE_SLOW_TESTS\00"
@.str.1 = [23 x i8] c"ENABLE_VERY_SLOW_TESTS\00"
define i32 @TargetEnableSlowTests() {
%1 = tail call i32 @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @getenv(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
struct s36 {
  struct {
    int : 0;
  } a[2][10];
  char b;
  char c;
} f36(void) {
  while (1) {
  }
}


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

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

LLVM IR (-O0):
define i16 @f36() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define i16 @f36() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned stub_os_packet_read(void *buf) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @stub_os_packet_read(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct ringbuffer {
  int dummy;
};

/* Variables and functions */
struct ringbuffer *ringbuffer_new(int);
struct ringbuffer *_create_rb(int size) {
  size = (size + 3) & ~3;
  if (size < 2048 * 2) {
    size = 2048 * 2;
  }
  struct ringbuffer *rb = ringbuffer_new(size);
  return rb;
}


x86 assembly (clang, -O0):
<_create_rb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
and    $0xfffffffc,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x1000,-0x4(%rbp)
jge    113b <_create_rb+0x2b>
movl   $0x1000,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ringbuffer_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_create_rb>:
add    $0x3,%edi
and    $0xfffffffc,%edi
cmp    $0x1001,%edi
mov    $0x1000,%eax
cmovl  %eax,%edi
jmp    1030 <ringbuffer_new@plt>

LLVM IR (-O0):
%struct.ringbuffer = type { i32 }
define %struct.ringbuffer* @_create_rb(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.ringbuffer*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 3
%6 = and i32 %5, -4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 4096
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 4096, i32* %2
br label %10
10: ; preds = %9, %1
%11 = load i32, i32* %2
%12 = call %struct.ringbuffer* @ringbuffer_new(i32 %11)
store %struct.ringbuffer* %12, %struct.ringbuffer** %3
%13 = load %struct.ringbuffer*, %struct.ringbuffer** %3
ret %struct.ringbuffer* %13
}

LLVM IR (-O2):
%struct.ringbuffer = type { i32 }
define %struct.ringbuffer* @_create_rb(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = and i32 %2, -4
%4 = icmp sgt i32 %3, 4096
%5 = select i1 %4, i32 %3, i32 4096
%6 = tail call %struct.ringbuffer* @ringbuffer_new(i32 %5)
ret %struct.ringbuffer* %6
}
void Tracking_UI_lightPressed() {}


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

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

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

LLVM IR (-O2):
define void @Tracking_UI_lightPressed() {
ret void
}
int ui_init(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ui_init() {
ret i32 1
}
int ft_strfindor(char *str, char c, int ret) {
  int res;
  res = 0;
  while (str[res]) {
    if (str[res] == c)
      return (res);
    res++;
  }
  return (ret);
}


x86 assembly (clang, -O0):
<ft_strfindor>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115b <ft_strfindor+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114d <ft_strfindor+0x4d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <ft_strfindor+0x61>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1118 <ft_strfindor+0x18>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strfindor>:
mov    %edx,%eax
mov    (%rdi),%dl
test   %dl,%dl
je     1122 <ft_strfindor+0x22>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
cmp    %sil,%dl
je     1123 <ft_strfindor+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ft_strfindor+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_strfindor(i8* nocapture %0, i8 signext %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %3, %10
%7 = phi i64 [ %11, %10 ], [ 0, %3 ]
%8 = phi i8 [ %13, %10 ], [ %4, %3 ]
%9 = icmp eq i8 %8, %1
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = add nuw i64 %7, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %17, label %6
15: ; preds = %6
%16 = trunc i64 %7 to i32
br label %17
17: ; preds = %10, %15, %3
%18 = phi i32 [ %2, %3 ], [ %16, %15 ], [ %2, %10 ]
ret i32 %18
}
void pendfunc(int x) {
  asm("    .global "
      "set_point1"
      "\n"
      "set_point1"
      ":\n"
      "    call "
      "pendfunc1"
      "\n");
}


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

x86 assembly (clang, -O2):
<pendfunc>:
call   1030 <pendfunc1@plt>
ret

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

LLVM IR (-O2):
define void @pendfunc(i32 %0) {
tail call void asm sideeffect " .global set_point1\0Aset_point1:\0A call pendfunc1\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
__attribute__((no, noclone)) signed __int128 t110_5sub(signed __int128 x) {
  signed __int128 r;
  if (__builtin_sub_overflow(x, (signed __int128)(3), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t110_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
add    $0xfffffffffffffffd,%rdx
adc    $0xffffffffffffffff,%rcx
seto   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t110_5sub+0x48>
jmp    115f <t110_5sub+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t110_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xfffffffffffffffd,%rbx
adc    $0xffffffffffffffff,%r14
jno    112b <t110_5sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t110_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %11, i128 3)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t110_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %6, i128 -3)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t hci_event_change_connection_link_key_complete_get_connection_handle(
    const uint8_t *event) {
  return little_endian_read_16(event, 3);
}


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

x86 assembly (clang, -O2):
<hci_event_change_connection_link_key_complete_get_connection_handle>:
mov    $0x3,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @hci_event_change_connection_link_key_complete_get_connection_handle(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 3)
ret i32 %2
}
void INT_Excep_PERIA_INTA213(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA213() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void USBDMAChannelStatusClear(uint32_t ui32Base, uint32_t ui32Channel,
                              uint32_t ui32Status) {
  ;
  ;
  ui32Status &= 0x00000100;
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) &=
      ~ui32Status;
}


x86 assembly (clang, -O0):
<USBDMAChannelStatusClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x100,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelStatusClear>:
not    %edx
or     $0xfffffeff,%edx
movslq %edi,%rax
movslq %esi,%rcx
shl    $0x4,%rcx
and    %edx,0x204(%rax,%rcx,1)
ret

LLVM IR (-O0):
define void @USBDMAChannelStatusClear(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* %6
%8 = and i32 %7, 256
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = xor i32 %9, -1
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 516
%13 = load i32, i32* %5
%14 = mul nsw i32 16, %13
%15 = add nsw i32 %12, %14
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = and i32 %18, %10
store volatile i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelStatusClear(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, 256
%5 = xor i32 %4, -1
%6 = add nsw i32 %0, 516
%7 = shl nsw i32 %1, 4
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, %5
store volatile i32 %12, i32* %10
ret void
}
/* Variables and functions */
int shm_unlink(char const *);
int closeShared(const char *designator) { return shm_unlink(designator); }


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

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

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

LLVM IR (-O2):
define i32 @closeShared(i8* %0) {
%2 = tail call i32 @shm_unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_config_parse_not_bool() {
  printf("NOT IMPLEMENTED:"
         "pa_config_parse_not_bool"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"NOT IMPLEMENTED:pa_config_parse_not_bool\0A\00"
define i32 @pa_config_parse_not_bool() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_config_parse_not_bool\00"
define i32 @pa_config_parse_not_bool() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _delay_us(int);
int /*<<< orphan*/ cal_angle(unsigned int);
int /*<<< orphan*/ motion_direction(int);
int /*<<< orphan*/ speed_control(unsigned int, int /*<<< orphan*/);
void forward_soft_right(unsigned int speed, unsigned int angle) {
  motion_direction(0b00000010);
  speed_control(speed, 0);
  cal_angle(angle * 2);
  _delay_us(10);
}


x86 assembly (clang, -O0):
<forward_soft_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x2,%edi
call   1040 <motion_direction@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1060 <speed_control@plt>
mov    -0x8(%rbp),%edi
shl    $0x1,%edi
call   1030 <cal_angle@plt>
mov    $0xa,%edi
call   1050 <_delay_us@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forward_soft_right>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edi
call   1040 <motion_direction@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1060 <speed_control@plt>
add    %ebx,%ebx
mov    %ebx,%edi
call   1030 <cal_angle@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <_delay_us@plt>

LLVM IR (-O0):
define void @forward_soft_right(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @motion_direction(i32 2)
%6 = load i32, i32* %3
%7 = call i32 @speed_control(i32 %6, i32 0)
%8 = load i32, i32* %4
%9 = mul i32 %8, 2
%10 = call i32 @cal_angle(i32 %9)
%11 = call i32 @_delay_us(i32 10)
ret void
}

LLVM IR (-O2):
define void @forward_soft_right(i32 %0, i32 %1) {
%3 = tail call i32 @motion_direction(i32 2)
%4 = tail call i32 @speed_control(i32 %0, i32 0)
%5 = shl i32 %1, 1
%6 = tail call i32 @cal_angle(i32 %5)
%7 = tail call i32 @_delay_us(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void fold_if(int a, int b) {
  if (a && b)
    foo();
  else
    bar();
}


x86 assembly (clang, -O0):
<fold_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114e <fold_if+0x2e>
cmpl   $0x0,-0x8(%rbp)
je     114e <fold_if+0x2e>
mov    $0x0,%al
call   1040 <foo@plt>
jmp    1155 <fold_if+0x35>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fold_if>:
test   %edi,%edi
je     112f <fold_if+0xf>
test   %esi,%esi
je     112f <fold_if+0xf>
xor    %eax,%eax
jmp    1040 <foo@plt>
xor    %eax,%eax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @fold_if(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @foo()
br label %14
12: ; preds = %7, %2
%13 = call i32 (...) @bar()
br label %14
14: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
define void @fold_if(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @foo()
br label %10
8: ; preds = %2
%9 = tail call i32 (...) @bar()
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, int, float);
int main() {
  float a = 7;
  int b = 5;
  int sum;
  printf("%.0f / %d = %.3f\n", a, b, a / b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%esi
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm2
divss  %xmm2,%xmm1
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movss  0xee0(%rip),%xmm0
movss  0xedc(%rip),%xmm1
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%.0f / %d = %.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store float 7.000000e+00, float* %2
store i32 5, i32* %3
%5 = load float, float* %2
%6 = load i32, i32* %3
%7 = load float, float* %2
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to float
%10 = fdiv float %7, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float %5, i32 %6, float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"%.0f / %d = %.3f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float 7.000000e+00, i32 5, float 0x3FF6666660000000)
ret i32 0
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int gettimeofday(struct timeval *, struct timezone *);
__attribute__((__weak__, __always___)) int
softboundmpx_gettimeofday(struct timeval *tv, struct timezone *tz) {
  return gettimeofday(tv, tz);
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define weak i32 @softboundmpx_gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = load %struct.timezone*, %struct.timezone** %4
%7 = call i32 @gettimeofday(%struct.timeval* %5, %struct.timezone* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define weak i32 @softboundmpx_gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = tail call i32 @gettimeofday(%struct.timeval* %0, %struct.timezone* %1)
ret i32 %3
}
/* Type definitions */
struct obus_object {
  int dummy;
};
struct net_interface {
  int dummy;
};

/* Variables and functions */
struct net_interface *net_interface_from_object(struct obus_object *);
struct obus_object *net_interface_object(struct net_interface *object) {
  struct obus_object *obj;
  obj = (struct obus_object *)object;
  if (net_interface_from_object(obj) != object)
    return NULL;
  return (struct obus_object *)object;
}


x86 assembly (clang, -O0):
<net_interface_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <net_interface_from_object@plt>
cmp    -0x10(%rbp),%rax
je     1144 <net_interface_object+0x34>
movq   $0x0,-0x8(%rbp)
jmp    114c <net_interface_object+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_interface_object>:
push   %rbx
mov    %rdi,%rbx
call   1030 <net_interface_from_object@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.obus_object = type { i32 }
%struct.net_interface = type { i32 }
define %struct.obus_object* @net_interface_object(%struct.net_interface* %0) {
%2 = alloca %struct.obus_object*
%3 = alloca %struct.net_interface*
%4 = alloca %struct.obus_object*
store %struct.net_interface* %0, %struct.net_interface** %3
%5 = load %struct.net_interface*, %struct.net_interface** %3
%6 = bitcast %struct.net_interface* %5 to %struct.obus_object*
store %struct.obus_object* %6, %struct.obus_object** %4
%7 = load %struct.obus_object*, %struct.obus_object** %4
%8 = call %struct.net_interface* @net_interface_from_object(%struct.obus_object* %7)
%9 = load %struct.net_interface*, %struct.net_interface** %3
%10 = icmp ne %struct.net_interface* %8, %9
br i1 %10, label %11, label %12
11: ; preds = %1
store %struct.obus_object* null, %struct.obus_object** %2
br label %15
12: ; preds = %1
%13 = load %struct.net_interface*, %struct.net_interface** %3
%14 = bitcast %struct.net_interface* %13 to %struct.obus_object*
store %struct.obus_object* %14, %struct.obus_object** %2
br label %15
15: ; preds = %12, %11
%16 = load %struct.obus_object*, %struct.obus_object** %2
ret %struct.obus_object* %16
}

LLVM IR (-O2):
%struct.obus_object = type { i32 }
%struct.net_interface = type { i32 }
define %struct.obus_object* @net_interface_object(%struct.net_interface* %0) {
%2 = bitcast %struct.net_interface* %0 to %struct.obus_object*
%3 = tail call %struct.net_interface* @net_interface_from_object(%struct.obus_object* %2)
%4 = icmp eq %struct.net_interface* %3, %0
%5 = select i1 %4, %struct.obus_object* %2, %struct.obus_object* null
ret %struct.obus_object* %5
}
void burn_loops(unsigned long loops) {
  unsigned long i;
  for (i = 0; i < loops; i++)
    asm volatile("" : : : "memory");
}


x86 assembly (clang, -O0):
<burn_loops>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    112f <burn_loops+0x2f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <burn_loops+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<burn_loops>:
test   %rdi,%rdi
je     1116 <burn_loops+0x16>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0xffffffffffffffff,%rdi
jne    1110 <burn_loops+0x10>
ret

LLVM IR (-O0):
define void @burn_loops(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i64, i64* %3
%11 = add i64 %10, 1
store i64 %11, i64* %3
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @burn_loops(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ 0, %1 ]
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
%5 = add nuw i64 %4, 1
%6 = icmp eq i64 %5, %0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
void thread_fn(void *data) {
  while (1) {
    sleep(1);
    printf("%s\n", __func__);
  }
}


x86 assembly (clang, -O0):
<thread_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <sleep@plt>
lea    0xec1(%rip),%rdi
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112c <thread_fn+0xc>

x86 assembly (clang, -O2):
<thread_fn>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1130 <thread_fn+0x10>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.thread_fn = [10 x i8] c"thread_fn\00"
define void @thread_fn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 1)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.thread_fn, i64 0, i64 0))
br label %3
}

LLVM IR (-O2):
@__func__.thread_fn = [10 x i8] c"thread_fn\00"
define void @thread_fn(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.thread_fn, i64 0, i64 0))
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void hot_sys_vWarning(char *reason, va_list args) {
  fprintf(stderr, "WARNING:HOT:");
  vfprintf(stderr, reason, args);
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<hot_sys_vWarning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hot_sys_vWarning>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb0(%rip),%r14
mov    (%r14),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <vfprintf@plt>
mov    (%r14),%edi
lea    0xeb7(%rip),%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"WARNING:HOT:\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @hot_sys_vWarning(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @vfprintf(i32 %7, i8* %8, i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"WARNING:HOT:\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @hot_sys_vWarning(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @vfprintf(i32 %5, i8* %0, i32 %1)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_size_group_get_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ errn_exit(int, char *);
int pthread_create(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   void *(*)(void *), void *);
void _create(pthread_t *t, void *(f)(void *), void *a) {
  int n = pthread_create(t, NULL, f, a);
  if (n)
    errn_exit(n, "_create");
}


x86 assembly (clang, -O0):
<_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_create@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1165 <_create+0x45>
mov    -0x1c(%rbp),%edi
lea    0xea0(%rip),%rsi
call   1030 <errn_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_create>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
call   1040 <pthread_create@plt>
test   %eax,%eax
je     1141 <_create+0x21>
lea    0xec7(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <errn_exit@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"_create\00"
define void @_create(i32* %0, i8* (i8*)* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8* (i8*)*
%6 = alloca i8*
%7 = alloca i32
store i32* %0, i32** %4
store i8* (i8*)* %1, i8* (i8*)** %5
store i8* %2, i8** %6
%8 = load i32*, i32** %4
%9 = load i8* (i8*)*, i8* (i8*)** %5
%10 = load i8*, i8** %6
%11 = call i32 @pthread_create(i32* %8, i32* null, i8* (i8*)* %9, i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %7
%16 = call i32 @errn_exit(i32 %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"_create\00"
define void @_create(i32* %0, i8* (i8*)* %1, i8* %2) {
%4 = tail call i32 @pthread_create(i32* %0, i32* null, i8* (i8*)* %1, i8* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @errn_exit(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
char phredToPhred33(int p) {
  if (p > 93)
    p = 93;
  else if (p < 0)
    p = 0;
  return ((char)(p + 33));
}


x86 assembly (clang, -O0):
<phredToPhred33>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5d,-0x4(%rbp)
jle    111d <phredToPhred33+0x1d>
movl   $0x5d,-0x4(%rbp)
jmp    1133 <phredToPhred33+0x33>
cmpl   $0x0,-0x4(%rbp)
jge    112e <phredToPhred33+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1133 <phredToPhred33+0x33>
mov    -0x4(%rbp),%eax
add    $0x21,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<phredToPhred33>:
xor    %eax,%eax
test   %edi,%edi
cmovg  %edi,%eax
add    $0x21,%al
cmp    $0x5e,%edi
movzbl %al,%ecx
mov    $0x7e,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @phredToPhred33(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 93
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 93, i32* %2
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
br label %11
11: ; preds = %10, %5
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 33
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @phredToPhred33(i32 %0) {
%2 = icmp sgt i32 %0, 93
%3 = icmp sgt i32 %0, 0
%4 = select i1 %3, i32 %0, i32 0
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 33
%7 = select i1 %2, i8 126, i8 %6
ret i8 %7
}
unsigned int ones32(register unsigned int x) {
  x -= ((x >> 1) & 0x55555555);
  x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
  x = (((x >> 4) + x) & 0x0f0f0f0f);
  x += (x >> 8);
  x += (x >> 16);
  return (x & 0x0000003f);
}


x86 assembly (clang, -O0):
<ones32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
add    -0x4(%rbp),%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ones32>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
and    $0x33333333,%eax
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @ones32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = and i32 %4, 1431655765
%6 = load i32, i32* %2
%7 = sub i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 2
%10 = and i32 %9, 858993459
%11 = load i32, i32* %2
%12 = and i32 %11, 858993459
%13 = add i32 %10, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = lshr i32 %14, 4
%16 = load i32, i32* %2
%17 = add i32 %15, %16
%18 = and i32 %17, 252645135
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 8
%21 = load i32, i32* %2
%22 = add i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = lshr i32 %23, 16
%25 = load i32, i32* %2
%26 = add i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = and i32 %27, 63
ret i32 %28
}

LLVM IR (-O2):
define i32 @ones32(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub i32 %0, %3
%5 = lshr i32 %4, 2
%6 = and i32 %5, 858993459
%7 = and i32 %4, 858993459
%8 = add nuw nsw i32 %6, %7
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 8
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 16
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
int DefMock_socket(int domain, int type, int protocol) { return 0; }


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

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

LLVM IR (-O0):
define i32 @DefMock_socket(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
ret i32 0
}

LLVM IR (-O2):
define i32 @DefMock_socket(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
struct protoent {
  int p_proto;
};

/* Variables and functions */
int /*<<< orphan*/ endprotoent();
struct protoent *getprotoent();
struct protoent *getprotobynumber(int num) {
  struct protoent *p;
  endprotoent();
  do
    p = getprotoent();
  while (p && p->p_proto != num);
  return p;
}


x86 assembly (clang, -O0):
<getprotobynumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <endprotoent@plt>
mov    $0x0,%al
call   1040 <getprotoent@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     115c <getprotobynumber+0x3c>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1132 <getprotobynumber+0x12>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getprotobynumber>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <endprotoent@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getprotoent@plt>
test   %rax,%rax
je     1140 <getprotobynumber+0x20>
cmp    %ebx,(%rax)
jne    1130 <getprotobynumber+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.protoent = type { i32 }
define %struct.protoent* @getprotobynumber(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.protoent*
store i32 %0, i32* %2
%4 = call i32 (...) @endprotoent()
br label %5
5: ; preds = %16, %1
%6 = call %struct.protoent* (...) @getprotoent()
store %struct.protoent* %6, %struct.protoent** %3
br label %7
7: ; preds = %5
%8 = load %struct.protoent*, %struct.protoent** %3
%9 = icmp ne %struct.protoent* %8, null
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load %struct.protoent*, %struct.protoent** %3
%12 = getelementptr inbounds %struct.protoent, %struct.protoent* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = load i32, i32* %2
%15 = icmp ne i32 %13, %14
br label %16
16: ; preds = %10, %7
%17 = phi i1 [ false, %7 ], [ %15, %10 ]
br i1 %17, label %5, label %18
18: ; preds = %16
%19 = load %struct.protoent*, %struct.protoent** %3
ret %struct.protoent* %19
}

LLVM IR (-O2):
%struct.protoent = type { i32 }
define %struct.protoent* @getprotobynumber(i32 %0) {
%2 = tail call i32 (...) @endprotoent()
br label %3
3: ; preds = %6, %1
%4 = tail call %struct.protoent* (...) @getprotoent()
%5 = icmp eq %struct.protoent* %4, null
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = getelementptr inbounds %struct.protoent, %struct.protoent* %4, i64 0, i32 0
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %6
ret %struct.protoent* %4
}
void gdk_window_set_events() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_events() {
ret void
}
void cli(void) { __asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @cli() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int next_square(int index, int num_elems) {
  int num = num_elems - index;
  return num * num;
}


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

x86 assembly (clang, -O2):
<next_square>:
mov    %esi,%eax
sub    %edi,%eax
imul   %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @next_square(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = mul nsw i32 %3, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mpu6050_write(int, int);
int /*<<< orphan*/ usleep(int);
void mpu6050_init() {
  mpu6050_write(0x6B, 0x00);
  usleep(500);
  mpu6050_write(0x1C, 0x00);
  usleep(500);
  mpu6050_write(0x1B, 0x00);
  usleep(500);
}


x86 assembly (clang, -O0):
<mpu6050_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6b,%edi
xor    %esi,%esi
call   1030 <mpu6050_write@plt>
mov    $0x1f4,%edi
call   1040 <usleep@plt>
mov    $0x1c,%edi
xor    %esi,%esi
call   1030 <mpu6050_write@plt>
mov    $0x1f4,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <mpu6050_write@plt>
mov    $0x1f4,%edi
call   1040 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpu6050_init>:
push   %rax
mov    $0x6b,%edi
xor    %esi,%esi
call   1030 <mpu6050_write@plt>
mov    $0x1f4,%edi
call   1040 <usleep@plt>
mov    $0x1c,%edi
xor    %esi,%esi
call   1030 <mpu6050_write@plt>
mov    $0x1f4,%edi
call   1040 <usleep@plt>
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <mpu6050_write@plt>
mov    $0x1f4,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @mpu6050_init() {
%1 = call i32 @mpu6050_write(i32 107, i32 0)
%2 = call i32 @usleep(i32 500)
%3 = call i32 @mpu6050_write(i32 28, i32 0)
%4 = call i32 @usleep(i32 500)
%5 = call i32 @mpu6050_write(i32 27, i32 0)
%6 = call i32 @usleep(i32 500)
ret void
}

LLVM IR (-O2):
define void @mpu6050_init() {
%1 = tail call i32 @mpu6050_write(i32 107, i32 0)
%2 = tail call i32 @usleep(i32 500)
%3 = tail call i32 @mpu6050_write(i32 28, i32 0)
%4 = tail call i32 @usleep(i32 500)
%5 = tail call i32 @mpu6050_write(i32 27, i32 0)
%6 = tail call i32 @usleep(i32 500)
ret void
}
unsigned int get_NextYear(unsigned int time) { return (time + 1000000); }


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

x86 assembly (clang, -O2):
<get_NextYear>:
lea    0xf4240(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_NextYear(i32 %0) {
%2 = add i32 %0, 1000000
ret i32 %2
}
void gtk_widget_queue_draw() {}


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

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

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

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