xunge/DecIR huggingface dataset:
/* Type definitions */
struct sStreamCodec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ StreamCodec_StreamCodec(struct sStreamCodec *,
                                           unsigned char *, unsigned int);
void StreamDecoder_StreamDecoder(struct sStreamCodec *p, unsigned char *buf,
                                 unsigned int bufsize) {
  StreamCodec_StreamCodec((struct sStreamCodec *)p, buf, bufsize);
}


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

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

LLVM IR (-O0):
%struct.sStreamCodec = type { i32 }
define void @StreamDecoder_StreamDecoder(%struct.sStreamCodec* %0, i8* %1, i32 %2) {
%4 = alloca %struct.sStreamCodec*
%5 = alloca i8*
%6 = alloca i32
store %struct.sStreamCodec* %0, %struct.sStreamCodec** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.sStreamCodec*, %struct.sStreamCodec** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @StreamCodec_StreamCodec(%struct.sStreamCodec* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.sStreamCodec = type { i32 }
define void @StreamDecoder_StreamDecoder(%struct.sStreamCodec* %0, i8* %1, i32 %2) {
%4 = tail call i32 @StreamCodec_StreamCodec(%struct.sStreamCodec* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ make_move(int);
int search() {
  for (int pos = (((1 - 1)) * 8 + ((1 - 1)));
       pos <= (((8 - 1)) * 8 + ((8 - 1))); ++pos) {
    if (make_move(pos)) {
      break;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3f,-0x4(%rbp)
jg     1153 <search+0x43>
mov    -0x4(%rbp),%edi
call   1030 <make_move@plt>
cmp    $0x0,%rax
je     1140 <search+0x30>
jmp    1153 <search+0x43>
jmp    1145 <search+0x35>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <search+0xf>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <make_move@plt>
test   %rax,%rax
jne    1136 <search+0x26>
lea    0x1(%rbx),%eax
cmp    $0x3f,%ebx
mov    %eax,%ebx
jne    1120 <search+0x10>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @search() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i64 @make_move(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 64
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 1
}
/* Variables and functions */
char const *getenv(char *);
const char *IoTHubAccount_GetIoTHubName(void) { return getenv("IOTHUB_NAME"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"IOTHUB_NAME\00"
define i8* @IoTHubAccount_GetIoTHubName() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [12 x i8] c"IOTHUB_NAME\00"
define i8* @IoTHubAccount_GetIoTHubName() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void d_defer_set_destroy() { empty_log("defer_set_destroy\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"defer_set_destroy\0A\00"
define void @d_defer_set_destroy() {
%1 = call i32 @empty_log(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"defer_set_destroy\0A\00"
define void @d_defer_set_destroy() {
%1 = tail call i32 @empty_log(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int digit_value(unsigned int character) {
  if (character >= 'a')
    return (character - ('a' - 10));
  if (character >= 'A')
    return (character - ('A' - 10));
  if (character <= '9')
    return (character - '0');
  return character;
}


x86 assembly (clang, -O0):
<digit_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jb     111f <digit_value+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <digit_value+0x55>
cmpl   $0x41,-0x8(%rbp)
jb     1137 <digit_value+0x37>
mov    -0x8(%rbp),%eax
sub    $0x37,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <digit_value+0x55>
cmpl   $0x39,-0x8(%rbp)
ja     114f <digit_value+0x4f>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <digit_value+0x55>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_value>:
mov    %edi,%eax
cmp    $0x61,%edi
jb     110b <digit_value+0xb>
add    $0xffffffa9,%eax
ret
cmp    $0x41,%eax
jb     1114 <digit_value+0x14>
add    $0xffffffc9,%eax
ret
lea    -0x30(%rax),%ecx
cmp    $0x3a,%eax
cmovae %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @digit_value(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp uge i32 %4, 97
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub i32 %7, 87
store i32 %8, i32* %2
br label %23
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp uge i32 %10, 65
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sub i32 %13, 55
store i32 %14, i32* %2
br label %23
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp ule i32 %16, 57
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub i32 %19, 48
store i32 %20, i32* %2
br label %23
21: ; preds = %15
%22 = load i32, i32* %3
store i32 %22, i32* %2
br label %23
23: ; preds = %21, %18, %12, %6
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @digit_value(i32 %0) {
%2 = icmp ugt i32 %0, 96
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = add i32 %0, -87
br label %13
5: ; preds = %1
%6 = icmp ugt i32 %0, 64
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = add nsw i32 %0, -55
br label %13
9: ; preds = %5
%10 = icmp ult i32 %0, 58
%11 = add nsw i32 %0, -48
%12 = select i1 %10, i32 %11, i32 %0
br label %13
13: ; preds = %9, %7, %3
%14 = phi i32 [ %4, %3 ], [ %8, %7 ], [ %12, %9 ]
ret i32 %14
}
/* Variables and functions */
unsigned int sleep(unsigned int);
int /*<<< orphan*/ unix_error(char *);
unsigned int Sleep(unsigned int secs) {
  unsigned int rc;
  if ((rc = sleep(secs)) < 0)
    unix_error("Sleep error");
  return rc;
}


x86 assembly (clang, -O0):
<Sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sleep@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jae    114b <Sleep+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <unix_error@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Sleep error\00"
define i32 @Sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @sleep(i32 %4)
store i32 %5, i32* %3
%6 = icmp ult i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @unix_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @Sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SSIIntClear(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000020))) = ui32IntFlags;
}


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

x86 assembly (clang, -O2):
<SSIIntClear>:
mov    %rsi,0x20(%rdi)
ret

LLVM IR (-O0):
define void @SSIIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 32
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @SSIIntClear(i64 %0, i64 %1) {
%3 = add i64 %0, 32
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clrscr();
void redraw() { clrscr(); }


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

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

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

LLVM IR (-O2):
define void @redraw() {
%1 = tail call i32 (...) @clrscr()
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *memCxtAlloc0(void *current, size_t needed) {
  void *allocated;
  allocated = malloc(needed);
  if (allocated == NULL)
    return (NULL);
  memset(allocated, 0, needed);
  return (allocated);
}


x86 assembly (clang, -O0):
<memCxtAlloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <memCxtAlloc0+0x35>
movq   $0x0,-0x8(%rbp)
jmp    116c <memCxtAlloc0+0x4c>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memCxtAlloc0>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1144 <memCxtAlloc0+0x24>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @memCxtAlloc0(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %17
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = load i64, i64* %5
%15 = call i32 @memset(i8* %13, i32 0, i64 %14)
%16 = load i8*, i8** %6
store i8* %16, i8** %3
br label %17
17: ; preds = %12, %11
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @memCxtAlloc0(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memset(i8* %3, i32 0, i64 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void croak_perror(const char *str) {
  fprintf(stderr, "*** Error: ");
  perror(str);
  exit(1);
}


x86 assembly (clang, -O0):
<croak_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<croak_perror>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"*** Error: \00"
define void @croak_perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @perror(i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"*** Error: \00"
define void @croak_perror(i8* nocapture %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @perror(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
void foo096(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo096(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ USBUART_ReInitComponent();
void USBUART_BUS_RESET_ISR(void) {
  do {
  } while (0);
  USBUART_ReInitComponent();
}


x86 assembly (clang, -O0):
<USBUART_BUS_RESET_ISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <USBUART_BUS_RESET_ISR+0x9>
jmp    111e <USBUART_BUS_RESET_ISR+0xe>
mov    $0x0,%al
call   1030 <USBUART_ReInitComponent@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @USBUART_BUS_RESET_ISR() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = call i32 (...) @USBUART_ReInitComponent()
ret void
}

LLVM IR (-O2):
define void @USBUART_BUS_RESET_ISR() {
%1 = tail call i32 (...) @USBUART_ReInitComponent()
ret void
}
unsigned xrop3_49_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D & stk3;
  stk1 = S | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_49_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_49_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
not    %sil
movzbl %sil,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_49_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, -1
%6 = zext i8 %5 to i32
%7 = or i32 %4, %6
%8 = xor i32 %7, -1
%9 = or i32 %8, %3
ret i32 %9
}
/* Variables and functions */
scalar_t__ minipack_is_nil(void *);
void minipack_unpack_nil(void *ptr, size_t *sz) {
  if (minipack_is_nil(ptr)) {
    *sz = 1;
  } else {
    *sz = 0;
  }
}


x86 assembly (clang, -O0):
<minipack_unpack_nil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <minipack_is_nil@plt>
cmp    $0x0,%rax
je     1143 <minipack_unpack_nil+0x33>
mov    -0x10(%rbp),%rax
movq   $0x1,(%rax)
jmp    114e <minipack_unpack_nil+0x3e>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minipack_unpack_nil>:
push   %rbx
mov    %rsi,%rbx
call   1030 <minipack_is_nil@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %rcx,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @minipack_unpack_nil(i8* %0, i64* nocapture writeonly %1) {
%3 = tail call i64 @minipack_is_nil(i8* %0)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i64
store i64 %5, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Dump_classHashStatus();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void throwException(char *exception) {
  printf("\n\e[31m\e[1mException:\e[0m %s\n", exception);
  Dump_classHashStatus();
  exit(0);
}


x86 assembly (clang, -O0):
<throwException>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <Dump_classHashStatus@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<throwException>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <Dump_classHashStatus@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"\0A\1B[31m\1B[1mException:\1B[0m %s\0A\00"
define void @throwException(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @Dump_classHashStatus()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0A\1B[31m\1B[1mException:\1B[0m %s\0A\00"
define void @throwException(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @Dump_classHashStatus()
%4 = tail call i32 @exit(i32 0)
unreachable
}
void *null_open(int argc, char **argv) { return &null_open; }


x86 assembly (clang, -O0):
<null_open>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ece(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_open>:
mov    0x2ed9(%rip),%rax
ret

LLVM IR (-O0):
define i8* @null_open(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i8* bitcast (i8* (i32, i8**)* @null_open to i8*)
}

LLVM IR (-O2):
define i8* @null_open(i32 %0, i8** nocapture readnone %1) {
ret i8* bitcast (i8* (i32, i8**)* @null_open to i8*)
}
int isNotAboveMaximumAmount(int memory_amount) { return memory_amount < 65535; }


x86 assembly (clang, -O0):
<isNotAboveMaximumAmount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffff,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNotAboveMaximumAmount>:
xor    %eax,%eax
cmp    $0xffff,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @isNotAboveMaximumAmount(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 65535
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isNotAboveMaximumAmount(i32 %0) {
%2 = icmp slt i32 %0, 65535
%3 = zext i1 %2 to i32
ret i32 %3
}
void initsetproctitle(int argc, char **argv, char **envp) {}


x86 assembly (clang, -O0):
<initsetproctitle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @initsetproctitle(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
ret void
}

LLVM IR (-O2):
define void @initsetproctitle(i32 %0, i8** nocapture %1, i8** nocapture %2) {
ret void
}
int _test_noc_control(int argc, char *argv[]) {}


x86 assembly (clang, -O0):
<_test_noc_control>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_test_noc_control(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};
typedef int /*<<< orphan*/ __u8;

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


x86 assembly (clang, -O0):
<cec_msg_record_status>:
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_record_status>:
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_RECORD_STATUS = global i32 0
define void @cec_msg_record_status(%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_RECORD_STATUS
%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_RECORD_STATUS = global i32 0
define void @cec_msg_record_status(%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_RECORD_STATUS
%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
}
/* Variables and functions */
int const SIGSEGV;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ hw_done();
int /*<<< orphan*/ printf(char *);
void sig_handler(const int sig) {
  if (sig == SIGSEGV)
    printf("SEG FAULT\n");
  hw_done();
  exit(0);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%eax
jne    1159 <sig_handler+0x29>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <hw_done@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
test   %edi,%edi
jne    1141 <sig_handler+0x11>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <hw_done@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@SIGSEGV = constant i32 0
@.str = [11 x i8] c"SEG FAULT\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGSEGV
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = call i32 (...) @hw_done()
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIGSEGV = constant i32 0
@str = [10 x i8] c"SEG FAULT\00"
define void @sig_handler(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @hw_done()
%7 = tail call i32 @exit(i32 0)
unreachable
}
int max3(int a, int b, int c) {
  return ((a > b) & (a > c)) ? a : ((b > a) & (b > c)) ? b : c;
}


x86 assembly (clang, -O0):
<max3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x4(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1140 <max3+0x40>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    117f <max3+0x7f>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x8(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1173 <max3+0x73>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1179 <max3+0x79>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max3>:
cmp    %edx,%esi
mov    %edx,%ecx
cmovg  %esi,%ecx
cmp    %edi,%esi
cmovle %edx,%ecx
cmp    %edx,%edi
mov    %ecx,%eax
cmovg  %edi,%eax
cmp    %esi,%edi
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @max3(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 = icmp sgt i32 %7, %8
%10 = zext i1 %9 to i32
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
%14 = zext i1 %13 to i32
%15 = and i32 %10, %14
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %3
%18 = load i32, i32* %4
br label %36
19: ; preds = %3
%20 = load i32, i32* %5
%21 = load i32, i32* %4
%22 = icmp sgt i32 %20, %21
%23 = zext i1 %22 to i32
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = icmp sgt i32 %24, %25
%27 = zext i1 %26 to i32
%28 = and i32 %23, %27
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %19
%31 = load i32, i32* %5
br label %34
32: ; preds = %19
%33 = load i32, i32* %6
br label %34
34: ; preds = %32, %30
%35 = phi i32 [ %31, %30 ], [ %33, %32 ]
br label %36
36: ; preds = %34, %17
%37 = phi i32 [ %18, %17 ], [ %35, %34 ]
ret i32 %37
}

LLVM IR (-O2):
define i32 @max3(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = and i1 %4, %5
%7 = icmp sgt i32 %1, %0
%8 = icmp sgt i32 %1, %2
%9 = and i1 %7, %8
%10 = select i1 %9, i32 %1, i32 %2
%11 = select i1 %6, i32 %0, i32 %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ motion_set(int);
void forward(void) { motion_set(0x06); }


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

x86 assembly (clang, -O2):
<forward>:
mov    $0x6,%edi
jmp    1030 <motion_set@plt>

LLVM IR (-O0):
define void @forward() {
%1 = call i32 @motion_set(i32 6)
ret void
}

LLVM IR (-O2):
define void @forward() {
%1 = tail call i32 @motion_set(i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ distribution(int, int *, int *, int *);
int /*<<< orphan*/ input(int *);
int /*<<< orphan*/ print_output(int, int, int, int);
int main(void) {
  int time, hour, minute, second;
  input(&time);
  distribution(time, &hour, &minute, &second);
  print_output(time, hour, minute, second);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <input@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <distribution@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <print_output@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
call   1030 <input@plt>
mov    0x8(%rsp),%edi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <distribution@plt>
mov    0x8(%rsp),%edi
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
call   1040 <print_output@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @input(i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @distribution(i32 %6, i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @print_output(i32 %8, i32 %9, i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @input(i32* %1)
%10 = load i32, i32* %1
%11 = call i32 @distribution(i32 %10, i32* %2, i32* %3, i32* %4)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = call i32 @print_output(i32 %12, i32 %13, i32 %14, i32 %15)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ aeron_client_conductor_on_cmd_destination(void *, void *,
                                                             int);
void aeron_client_conductor_on_cmd_add_destination(void *clientd, void *item) {
  aeron_client_conductor_on_cmd_destination(clientd, item, (0x07));
}


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

x86 assembly (clang, -O2):
<aeron_client_conductor_on_cmd_add_destination>:
mov    $0x7,%edx
jmp    1030 <aeron_client_conductor_on_cmd_destination@plt>

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

LLVM IR (-O2):
define void @aeron_client_conductor_on_cmd_add_destination(i8* %0, i8* %1) {
%3 = tail call i32 @aeron_client_conductor_on_cmd_destination(i8* %0, i8* %1, i32 7)
ret void
}
/* Variables and functions */
int suma(int);
int main(int argc, char *argv[]) {
  int num;
  num = suma(4);
  return num;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <suma@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x4,%edi
jmp    1030 <suma@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @suma(i32 4)
ret i32 %3
}
void R_GLstate_Multiply(void) {}


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

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

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

LLVM IR (-O2):
define void @R_GLstate_Multiply() {
ret void
}
/* Type definitions */
struct shape_data {
  int dummy;
};

/* Variables and functions */
double random_double();
int /*<<< orphan*/ square_init(struct shape_data *, double);
void square_random_init(struct shape_data *data) {
  double a = random_double();
  square_init(data, a);
}


x86 assembly (clang, -O0):
<square_random_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <random_double@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <square_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<square_random_init>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <random_double@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <square_init@plt>

LLVM IR (-O0):
%struct.shape_data = type { i32 }
define void @square_random_init(%struct.shape_data* %0) {
%2 = alloca %struct.shape_data*
%3 = alloca double
store %struct.shape_data* %0, %struct.shape_data** %2
%4 = call double (...) @random_double()
store double %4, double* %3
%5 = load %struct.shape_data*, %struct.shape_data** %2
%6 = load double, double* %3
%7 = call i32 @square_init(%struct.shape_data* %5, double %6)
ret void
}

LLVM IR (-O2):
%struct.shape_data = type { i32 }
define void @square_random_init(%struct.shape_data* %0) {
%2 = tail call double (...) @random_double()
%3 = tail call i32 @square_init(%struct.shape_data* %0, double %2)
ret void
}
int main() {
  float x, v, d;
  while (1) {
    while (x >= 0) {
      x = x + v * d;
      v = v - 9.81 * d;
    }
    v = -2 * v;
    x = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    1110 <main+0x10>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     116d <main+0x6d>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1110 <main+0x10>
movss  0xe8b(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    110b <main+0xb>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
br label %5
5: ; preds = %0, %20
br label %6
6: ; preds = %9, %5
%7 = load float, float* %2
%8 = fcmp oge float %7, 0.000000e+00
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load float, float* %2
%11 = load float, float* %3
%12 = load float, float* %4
%13 = call float @llvm.fmuladd.f32(float %11, float %12, float %10)
store float %13, float* %2
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = call double @llvm.fmuladd.f64(double -9.810000e+00, double %17, double %15)
%19 = fptrunc double %18 to float
store float %19, float* %3
br label %6
20: ; preds = %6
%21 = load float, float* %3
%22 = fmul float -2.000000e+00, %21
store float %22, float* %3
store float 0.000000e+00, float* %2
br label %5
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
long long cpucycles(void) {
  unsigned long long result;
  asm volatile(".byte 15;.byte 49;shlq $32,%%rdx;orq %%rdx,%%rax"
               : "=a"(result)::"%rdx");
  return result;
}


x86 assembly (clang, -O0):
<cpucycles>:
push   %rbp
mov    %rsp,%rbp
rdtsc
shl    $0x20,%rdx
or     %rdx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpucycles>:
rdtsc
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @cpucycles() {
%1 = alloca i64
%2 = call i64 asm sideeffect ".byte 15;.byte 49;shlq $$32,%rdx;orq %rdx,%rax", "={ax},~{rdx},~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @cpucycles() {
%1 = tail call i64 asm sideeffect ".byte 15;.byte 49;shlq $$32,%rdx;orq %rdx,%rax", "={ax},~{rdx},~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
void NativeVoidToVoid() {}


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

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

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

LLVM IR (-O2):
define void @NativeVoidToVoid() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void beep() {
  fprintf(stderr, "\x7");
  fflush(stderr);
}


x86 assembly (clang, -O0):
<beep>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<beep>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\07\00"
define void @beep() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\07\00"
define void @beep() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
ret void
}
int subtract_coords(unsigned char a, unsigned char b) {
  return ((a - b + 32) & 63) - 32;
}


x86 assembly (clang, -O0):
<subtract_coords>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
sub    %ecx,%eax
add    $0x20,%eax
and    $0x3f,%eax
sub    $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract_coords>:
sub    %esi,%edi
lea    0x20(%rdi),%eax
and    $0x3f,%eax
add    $0xffffffe0,%eax
ret

LLVM IR (-O0):
define i32 @subtract_coords(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = sub nsw i32 %6, %8
%10 = add nsw i32 %9, 32
%11 = and i32 %10, 63
%12 = sub nsw i32 %11, 32
ret i32 %12
}

LLVM IR (-O2):
define i32 @subtract_coords(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = add nuw nsw i32 %3, 32
%6 = sub nsw i32 %5, %4
%7 = and i32 %6, 63
%8 = add nsw i32 %7, -32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ rad_to_dms(double, int *, int *, double *);
void rad_to_hms(double theta, int *hrs, int *min, double *sec) {
  theta = theta / 15;
  rad_to_dms(theta, hrs, min, sec);
  return;
}


x86 assembly (clang, -O0):
<rad_to_hms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <rad_to_dms@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad_to_hms>:
divsd  0xee8(%rip),%xmm0
jmp    1030 <rad_to_dms@plt>

LLVM IR (-O0):
define void @rad_to_hms(double %0, i32* %1, i32* %2, double* %3) {
%5 = alloca double
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca double*
store double %0, double* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store double* %3, double** %8
%9 = load double, double* %5
%10 = fdiv double %9, 1.500000e+01
store double %10, double* %5
%11 = load double, double* %5
%12 = load i32*, i32** %6
%13 = load i32*, i32** %7
%14 = load double*, double** %8
%15 = call i32 @rad_to_dms(double %11, i32* %12, i32* %13, double* %14)
ret void
}

LLVM IR (-O2):
define void @rad_to_hms(double %0, i32* %1, i32* %2, double* %3) {
%5 = fdiv double %0, 1.500000e+01
%6 = tail call i32 @rad_to_dms(double %5, i32* %1, i32* %2, double* %3)
ret void
}
int main(int argc, const char *argv[]) { return 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ errorH(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
void intercepteeInt(int sig, siginfo_t *signalInformation, void *data) {
  errorH(14, '0', 0);
  exit(14);
}


x86 assembly (clang, -O0):
<intercepteeInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xe,%edi
mov    $0x30,%esi
xor    %edx,%edx
call   1030 <errorH@plt>
mov    $0xe,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<intercepteeInt>:
push   %rax
mov    $0xe,%edi
mov    $0x30,%esi
xor    %edx,%edx
call   1030 <errorH@plt>
mov    $0xe,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @intercepteeInt(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 @errorH(i32 14, i32 48, i32 0)
%8 = call i32 @exit(i32 14)
unreachable
}

LLVM IR (-O2):
define void @intercepteeInt(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @errorH(i32 14, i32 48, i32 0)
%5 = tail call i32 @exit(i32 14)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t square(uint32_t abc) { return abc * abc; }


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

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

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

LLVM IR (-O2):
define i32 @square(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Type definitions */
struct scsi_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scsi_device_resume(struct scsi_device *);
void device_resume_fn(struct scsi_device *sdev, void *data) {
  {
    scsi_device_resume(sdev);
    return;
  }
}


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

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

LLVM IR (-O0):
%struct.scsi_device = type { i32 }
define void @device_resume_fn(%struct.scsi_device* %0, i8* %1) {
%3 = alloca %struct.scsi_device*
%4 = alloca i8*
store %struct.scsi_device* %0, %struct.scsi_device** %3
store i8* %1, i8** %4
%5 = load %struct.scsi_device*, %struct.scsi_device** %3
%6 = call i32 @scsi_device_resume(%struct.scsi_device* %5)
ret void
}

LLVM IR (-O2):
%struct.scsi_device = type { i32 }
define void @device_resume_fn(%struct.scsi_device* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @scsi_device_resume(%struct.scsi_device* %0)
ret void
}
__typeof__(isupper((void *)1)) test_isupper_63(void) {
  return isupper((void *)1);
}


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

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

LLVM IR (-O0):
define i32 @test_isupper_63() {
%1 = call i32 @isupper(i32 ptrtoint (i8* inttoptr (i64 1 to i8*) to i32))
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isupper_63() {
%1 = tail call i32 @isupper(i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ gc_add_object(int /*<<< orphan*/);
int /*<<< orphan*/ stlarr_get_proto();
int /*<<< orphan*/ stlobj_get_proto();
void register_stdlib_prototypes() {
  gc_add_object(stlarr_get_proto());
  gc_add_object(stlobj_get_proto());
}


x86 assembly (clang, -O0):
<register_stdlib_prototypes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <stlarr_get_proto@plt>
mov    %eax,%edi
call   1030 <gc_add_object@plt>
mov    $0x0,%al
call   1050 <stlobj_get_proto@plt>
mov    %eax,%edi
call   1030 <gc_add_object@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_stdlib_prototypes>:
push   %rax
xor    %eax,%eax
call   1040 <stlarr_get_proto@plt>
mov    %eax,%edi
call   1030 <gc_add_object@plt>
xor    %eax,%eax
call   1050 <stlobj_get_proto@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <gc_add_object@plt>

LLVM IR (-O0):
define void @register_stdlib_prototypes() {
%1 = call i32 (...) @stlarr_get_proto()
%2 = call i32 @gc_add_object(i32 %1)
%3 = call i32 (...) @stlobj_get_proto()
%4 = call i32 @gc_add_object(i32 %3)
ret void
}

LLVM IR (-O2):
define void @register_stdlib_prototypes() {
%1 = tail call i32 (...) @stlarr_get_proto()
%2 = tail call i32 @gc_add_object(i32 %1)
%3 = tail call i32 (...) @stlobj_get_proto()
%4 = tail call i32 @gc_add_object(i32 %3)
ret void
}
/* Variables and functions */
int createShmIntAux(int);
int createShmInt() { return createShmIntAux(1); }


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

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

LLVM IR (-O0):
define i32 @createShmInt() {
%1 = call i32 @createShmIntAux(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @createShmInt() {
%1 = tail call i32 @createShmIntAux(i32 1)
ret i32 %1
}