xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_call_recv_initial_metadata() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_call_recv_initial_metadata>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_call_recv_initial_metadata>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_call_recv_initial_metadata() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_call_recv_initial_metadata() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ CLEAR_PRINTS();
int /*<<< orphan*/ PRINT_STRING_WITH_LITERAL_STRING(char *, char *, int, int);
void print_short(char *text) {
  CLEAR_PRINTS();
  PRINT_STRING_WITH_LITERAL_STRING("string", text, 1000, 1);
  return;
}


x86 assembly (clang, -O0):
<print_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <CLEAR_PRINTS@plt>
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x3e8,%edx
mov    $0x1,%ecx
call   1030 <PRINT_STRING_WITH_LITERAL_STRING@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_short>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <CLEAR_PRINTS@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
mov    $0x3e8,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1030 <PRINT_STRING_WITH_LITERAL_STRING@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"string\00"
define void @print_short(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @CLEAR_PRINTS()
%4 = load i8*, i8** %2
%5 = call i32 @PRINT_STRING_WITH_LITERAL_STRING(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 1000, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"string\00"
define void @print_short(i8* %0) {
%2 = tail call i32 (...) @CLEAR_PRINTS()
%3 = tail call i32 @PRINT_STRING_WITH_LITERAL_STRING(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1000, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void idle(void) {
  for (;;)
    pause();
}


x86 assembly (clang, -O0):
<idle>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <idle+0x9>
mov    $0x0,%al
call   1030 <pause@plt>
jmp    1119 <idle+0x9>

x86 assembly (clang, -O2):
<idle>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pause@plt>
jmp    1120 <idle+0x10>

LLVM IR (-O0):
define void @idle() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @pause()
br label %1
}

LLVM IR (-O2):
define void @idle() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @pause()
br label %1
}
void main_task(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @main_task() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
bool match_so_flags(int flags) {
  if ((flags & 0x00ff) != 0x0003)
    return false;
  switch (flags & 0xff00) {
  case 0x0100:
  case 0x0200:
  case 0x0300:
  case 0x0400:
  case 0x0500:
    return (sizeof(void *) == 8);
  }
  return true;
}


x86 assembly (clang, -O0):
<match_so_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
cmp    $0x3,%eax
je     1124 <match_so_flags+0x24>
movl   $0x0,-0x4(%rbp)
jmp    119d <match_so_flags+0x9d>
movzbl -0x7(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
sub    $0x100,%eax
je     118a <match_so_flags+0x8a>
jmp    113e <match_so_flags+0x3e>
mov    -0xc(%rbp),%eax
sub    $0x200,%eax
je     118a <match_so_flags+0x8a>
jmp    1151 <match_so_flags+0x51>
mov    -0xc(%rbp),%eax
sub    $0x300,%eax
je     118a <match_so_flags+0x8a>
jmp    1164 <match_so_flags+0x64>
mov    -0xc(%rbp),%eax
sub    $0x400,%eax
je     118a <match_so_flags+0x8a>
jmp    1177 <match_so_flags+0x77>
mov    -0xc(%rbp),%eax
sub    $0x500,%eax
jne    1196 <match_so_flags+0x96>
jmp    118a <match_so_flags+0x8a>
movl   $0x1,-0x4(%rbp)
jmp    119d <match_so_flags+0x9d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_so_flags>:
xor    %eax,%eax
cmp    $0x3,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @match_so_flags(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 255
%6 = icmp ne i32 %5, 3
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %13
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, 65280
switch i32 %10, label %12 [
i32 256, label %11
i32 512, label %11
i32 768, label %11
i32 1024, label %11
i32 1280, label %11
]
11: ; preds = %8, %8, %8, %8, %8
store i32 1, i32* %2
br label %13
12: ; preds = %8
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @match_so_flags(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 3
%4 = zext i1 %3 to i32
ret i32 %4
}
int string_length(char *str) {
  int length = 0;
  while (str[length] != '\0') {
    length++;
  }
  return length;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <string_length+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <string_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <string_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @string_length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int GetYearFromUser();
int /*<<< orphan*/ GiveInstructions();
int /*<<< orphan*/ PrintCalendar(int);
int main(int argc, const char *argv[]) {
  int year;
  GiveInstructions();
  year = GetYearFromUser();
  PrintCalendar(year);
  return 0;
}


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    $0x0,%al
call   1050 <GiveInstructions@plt>
mov    $0x0,%al
call   1040 <GetYearFromUser@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <PrintCalendar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <GiveInstructions@plt>
xor    %eax,%eax
call   1040 <GetYearFromUser@plt>
mov    %eax,%edi
call   1030 <PrintCalendar@plt>
xor    %eax,%eax
pop    %rcx
ret

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 (...) @GiveInstructions()
%8 = call i32 (...) @GetYearFromUser()
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @PrintCalendar(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @GiveInstructions()
%4 = tail call i32 (...) @GetYearFromUser()
%5 = tail call i32 @PrintCalendar(i32 %4)
ret i32 0
}
int rtime_check_working(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @rtime_check_working() {
ret i32 1
}
void foo_2_1_2_2_2_2_1_2_2() {}


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

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

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

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

/* Variables and functions */
int dtls_int_to_uint32(unsigned char *field, uint32_t value) {
  field[0] = (value >> 24) & 0xff;
  field[1] = (value >> 16) & 0xff;
  field[2] = (value >> 8) & 0xff;
  field[3] = value & 0xff;
  return 4;
}


x86 assembly (clang, -O0):
<dtls_int_to_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtls_int_to_uint32>:
bswap  %esi
mov    %esi,(%rdi)
mov    $0x4,%eax
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ getgid();
gid_t getegid(void) { return (getgid()); }


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

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

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

LLVM IR (-O2):
define i32 @getegid() {
%1 = tail call i32 (...) @getgid()
ret i32 %1
}
void *acessar(void *vetor, int posicao, int tam_estr) {
  char *t = (char *)vetor;
  return (void *)(t + (tam_estr * posicao));
}


x86 assembly (clang, -O0):
<acessar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<acessar>:
imul   %edx,%esi
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @acessar(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = mul nsw i32 %10, %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %9, i64 %13
ret i8* %14
}

LLVM IR (-O2):
define i8* @acessar(i8* readnone %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
unsigned short wma_convert_short(unsigned char *src) {
  return src[1] << 8 | src[0];
}


x86 assembly (clang, -O0):
<wma_convert_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wma_convert_short>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @wma_convert_short(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @wma_convert_short(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Variables and functions */
int intlen(int num) {
  int l = 1;
  while (num > 9) {
    l++;
    num /= 10;
  }
  return l;
}


x86 assembly (clang, -O0):
<intlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    1134 <intlen+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <intlen+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlen>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <intlen+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <intlen+0x20>
ret

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

LLVM IR (-O2):
define i32 @intlen(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i32 %5, 10
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Type definitions */
struct sCC1101PhyInfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CC1101Write(struct sCC1101PhyInfo *, unsigned char,
                               unsigned char *, int);
void CC1101SetRegister(struct sCC1101PhyInfo *phyInfo, unsigned char address,
                       unsigned char value) {
  CC1101Write(phyInfo, address, &value, 1);
}


x86 assembly (clang, -O0):
<CC1101SetRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xa(%rbp),%rdx
mov    $0x1,%ecx
movzbl -0x9(%rbp),%esi
call   1030 <CC1101Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CC1101SetRegister>:
push   %rax
mov    %dl,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0x1,%ecx
call   1030 <CC1101Write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
%struct.sCC1101PhyInfo = type { i32 }
define void @CC1101SetRegister(%struct.sCC1101PhyInfo* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
store i8 %2, i8* %4
%5 = call i32 @CC1101Write(%struct.sCC1101PhyInfo* %0, i8 zeroext %1, i8* %4, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ transmit_byte_via_SPI(int, int /*<<< orphan*/);
int /*<<< orphan*/ transmit_word_via_SPI(int, int /*<<< orphan*/);
void V3A_ResetFWRingBufParameter(void) {
  transmit_byte_via_SPI(((0x65E0) + 0x14), 0);
  transmit_byte_via_SPI(((0x65E0) + 0x15), 0);
  transmit_word_via_SPI(((0x65E0) + 0x16), 0);
}


x86 assembly (clang, -O0):
<V3A_ResetFWRingBufParameter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x65f4,%edi
xor    %esi,%esi
call   1030 <transmit_byte_via_SPI@plt>
mov    $0x65f5,%edi
xor    %esi,%esi
call   1030 <transmit_byte_via_SPI@plt>
mov    $0x65f6,%edi
xor    %esi,%esi
call   1040 <transmit_word_via_SPI@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<V3A_ResetFWRingBufParameter>:
push   %rax
mov    $0x65f4,%edi
xor    %esi,%esi
call   1030 <transmit_byte_via_SPI@plt>
mov    $0x65f5,%edi
xor    %esi,%esi
call   1030 <transmit_byte_via_SPI@plt>
mov    $0x65f6,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <transmit_word_via_SPI@plt>

LLVM IR (-O0):
define void @V3A_ResetFWRingBufParameter() {
%1 = call i32 @transmit_byte_via_SPI(i32 26100, i32 0)
%2 = call i32 @transmit_byte_via_SPI(i32 26101, i32 0)
%3 = call i32 @transmit_word_via_SPI(i32 26102, i32 0)
ret void
}

LLVM IR (-O2):
define void @V3A_ResetFWRingBufParameter() {
%1 = tail call i32 @transmit_byte_via_SPI(i32 26100, i32 0)
%2 = tail call i32 @transmit_byte_via_SPI(i32 26101, i32 0)
%3 = tail call i32 @transmit_word_via_SPI(i32 26102, i32 0)
ret void
}
int test_imm_72uint8_mem(unsigned char *val) {
  return ((*val) & (-0x72 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_72uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -114
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(char *bin_name) {
  printf("Usage: %s [options] \n", bin_name);
  printf("Options:\n"
         "\t-h, --help	Print this message and exit.\n"
         "\t-p, --password	Specify a password.\n"
         "\t-u, --username	Specify a username.\n"
         "\t-v, --verbose	Enable verbose mode.\n"
         "\t--version	Display version.\n");
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Usage: %s [options] \0A\00"
@.str.1 = [187 x i8] c"Options:\0A\09-h, --help\09Print this message and exit.\0A\09-p, --password\09Specify a password.\0A\09-u, --username\09Specify a username.\0A\09-v, --verbose\09Enable verbose mode.\0A\09--version\09Display version.\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Usage: %s [options] \0A\00"
@str = [186 x i8] c"Options:\0A\09-h, --help\09Print this message and exit.\0A\09-p, --password\09Specify a password.\0A\09-u, --username\09Specify a username.\0A\09-v, --verbose\09Enable verbose mode.\0A\09--version\09Display version.\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([186 x i8], [186 x i8]* @str, i64 0, i64 0))
ret void
}
int read_file_gzip(struct connection *conn) { return 1; }


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

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

LLVM IR (-O0):
%struct.connection = type opaque
define i32 @read_file_gzip(%struct.connection* %0) {
%2 = alloca %struct.connection*
store %struct.connection* %0, %struct.connection** %2
ret i32 1
}

LLVM IR (-O2):
%struct.connection = type opaque
define i32 @read_file_gzip(%struct.connection* nocapture readnone %0) {
ret i32 1
}
void foo() {
  int i;
  i = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @imx_scu_standby_enable() {
ret void
}
void PWMGenFaultTriggerSet(unsigned long ulBase, unsigned long ulGen,
                           unsigned long ulGroup,
                           unsigned long ulFaultTriggers) {
  ;
  ;
  ;

  ;

  ;
  if (ulGroup == 0) {
    (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000034))) =
        ulFaultTriggers;
  } else {
    (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000038))) =
        ulFaultTriggers;
  }
}


x86 assembly (clang, -O0):
<PWMGenFaultTriggerSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1134 <PWMGenFaultTriggerSet+0x34>
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rcx,0x34(%rax)
jmp    1144 <PWMGenFaultTriggerSet+0x44>
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rcx,0x38(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenFaultTriggerSet>:
xor    %eax,%eax
test   %rdx,%rdx
setne  %al
add    %rsi,%rdi
mov    %rcx,0x34(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @PWMGenFaultTriggerSet(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %7
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %4
%12 = load i64, i64* %8
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = add i64 %13, %14
%16 = add i64 %15, 52
%17 = inttoptr i64 %16 to i64*
store volatile i64 %12, i64* %17
br label %25
18: ; preds = %4
%19 = load i64, i64* %8
%20 = load i64, i64* %5
%21 = load i64, i64* %6
%22 = add i64 %20, %21
%23 = add i64 %22, 56
%24 = inttoptr i64 %23 to i64*
store volatile i64 %19, i64* %24
br label %25
25: ; preds = %18, %11
ret void
}

LLVM IR (-O2):
define void @PWMGenFaultTriggerSet(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp eq i64 %2, 0
%6 = add i64 %1, %0
%7 = select i1 %5, i64 52, i64 56
%8 = add i64 %6, %7
%9 = inttoptr i64 %8 to i64*
store volatile i64 %3, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void meniu() {
  printf("MENIU\n");
  printf("Pentru suma tastati     1\n");
  printf("Pentru produs tastati   2\n");
  printf("... ");
}


x86 assembly (clang, -O0):
<meniu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<meniu>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"MENIU\0A\00"
@.str.1 = [27 x i8] c"Pentru suma tastati 1\0A\00"
@.str.2 = [27 x i8] c"Pentru produs tastati 2\0A\00"
@.str.3 = [5 x i8] c"... \00"
define void @meniu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.3 = [5 x i8] c"... \00"
@str = [6 x i8] c"MENIU\00"
@str.4 = [26 x i8] c"Pentru suma tastati 1\00"
@str.5 = [26 x i8] c"Pentru produs tastati 2\00"
define void @meniu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long long cuberoot(unsigned long long);
unsigned long long invpyr(unsigned long long n) { return cuberoot(n * 6) + 1; }


x86 assembly (clang, -O0):
<invpyr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
imul   $0x6,-0x8(%rbp),%rdi
call   1030 <cuberoot@plt>
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invpyr>:
push   %rax
add    %rdi,%rdi
lea    (%rdi,%rdi,2),%rdi
call   1030 <cuberoot@plt>
add    $0x1,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @invpyr(i64 %0) {
%2 = mul i64 %0, 6
%3 = tail call i64 @cuberoot(i64 %2)
%4 = add i64 %3, 1
ret i64 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void TimerDisable(uint32_t ui32Base, uint32_t ui32Timer) {
  ;

  ;
  (*((volatile uint32_t *)(ui32Base + 0x0000000C))) &=
      ~(ui32Timer & (0x00000001 | 0x00000100));
}


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

x86 assembly (clang, -O2):
<TimerDisable>:
not    %esi
or     $0xfffffefe,%esi
movslq %edi,%rax
and    %esi,0xc(%rax)
ret

LLVM IR (-O0):
define void @TimerDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 257
%7 = xor i32 %6, -1
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 12
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, %7
store volatile i32 %13, i32* %11
ret void
}

LLVM IR (-O2):
define void @TimerDisable(i32 %0, i32 %1) {
%3 = and i32 %1, 257
%4 = xor i32 %3, -1
%5 = add nsw i32 %0, 12
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, %4
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a = 0;
  scanf("%d", &a);
  return a;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
int Cyc_IOEffect_cmp(void *a, void *b) { return a == b; }


x86 assembly (clang, -O0):
<Cyc_IOEffect_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_IOEffect_cmp>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @Cyc_IOEffect_cmp(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 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Cyc_IOEffect_cmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct ln_rst_time {
  int dummy;
};
struct ln_lnlat_posn {
  int dummy;
};
struct ln_equ_posn {
  int dummy;
};

/* Variables and functions */
int ln_get_object_rst_horizon_offset(double, struct ln_lnlat_posn *,
                                     struct ln_equ_posn *, long double,
                                     struct ln_rst_time *, double);
int ln_get_object_rst_horizon(double JD, struct ln_lnlat_posn *observer,
                              struct ln_equ_posn *object, long double horizon,
                              struct ln_rst_time *rst) {
  return ln_get_object_rst_horizon_offset(JD, observer, object, horizon, rst,
                                          0.5);
}


x86 assembly (clang, -O0):
<ln_get_object_rst_horizon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
fstpt  -0x30(%rbp)
mov    %rdx,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
fldt   -0x30(%rbp)
mov    -0x38(%rbp),%rdx
mov    %rsp,%rax
fstpt  (%rax)
movsd  0xeb0(%rip),%xmm1
call   1030 <ln_get_object_rst_horizon_offset@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_object_rst_horizon>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <ln_get_object_rst_horizon_offset@plt>

LLVM IR (-O0):
%struct.ln_lnlat_posn = type { i32 }
%struct.ln_equ_posn = type { i32 }
%struct.ln_rst_time = type { i32 }
define i32 @ln_get_object_rst_horizon(double %0, %struct.ln_lnlat_posn* %1, %struct.ln_equ_posn* %2, x86_fp80 %3, %struct.ln_rst_time* %4) {
%6 = alloca double
%7 = alloca %struct.ln_lnlat_posn*
%8 = alloca %struct.ln_equ_posn*
%9 = alloca x86_fp80
%10 = alloca %struct.ln_rst_time*
store double %0, double* %6
store %struct.ln_lnlat_posn* %1, %struct.ln_lnlat_posn** %7
store %struct.ln_equ_posn* %2, %struct.ln_equ_posn** %8
store x86_fp80 %3, x86_fp80* %9
store %struct.ln_rst_time* %4, %struct.ln_rst_time** %10
%11 = load double, double* %6
%12 = load %struct.ln_lnlat_posn*, %struct.ln_lnlat_posn** %7
%13 = load %struct.ln_equ_posn*, %struct.ln_equ_posn** %8
%14 = load x86_fp80, x86_fp80* %9
%15 = load %struct.ln_rst_time*, %struct.ln_rst_time** %10
%16 = call i32 @ln_get_object_rst_horizon_offset(double %11, %struct.ln_lnlat_posn* %12, %struct.ln_equ_posn* %13, x86_fp80 %14, %struct.ln_rst_time* %15, double 5.000000e-01)
ret i32 %16
}

LLVM IR (-O2):
%struct.ln_lnlat_posn = type { i32 }
%struct.ln_equ_posn = type { i32 }
%struct.ln_rst_time = type { i32 }
define i32 @ln_get_object_rst_horizon(double %0, %struct.ln_lnlat_posn* %1, %struct.ln_equ_posn* %2, x86_fp80 %3, %struct.ln_rst_time* %4) {
%6 = tail call i32 @ln_get_object_rst_horizon_offset(double %0, %struct.ln_lnlat_posn* %1, %struct.ln_equ_posn* %2, x86_fp80 %3, %struct.ln_rst_time* %4, double 5.000000e-01)
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef scalar_t__ ssize_t;
struct TYPE_3__ {
  scalar_t__ _IO_read_ptr;
  scalar_t__ _IO_read_end;
};
typedef TYPE_1__ FILE;

/* Variables and functions */
ssize_t diminuto_file_ready(const FILE *fp) {
  return (fp->_IO_read_end - fp->_IO_read_ptr);
}


x86 assembly (clang, -O0):
<diminuto_file_ready>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_file_ready>:
mov    0x8(%rdi),%rax
sub    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define i64 @diminuto_file_ready(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sub nsw i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64, i64 }
define i64 @diminuto_file_ready(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%5 = load i64, i64* %4
%6 = sub nsw i64 %3, %5
ret i64 %6
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int nc = 0;
  while (getchar() != EOF) {
    ++nc;
  }
  printf("nc = %d \n", nc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea4(%rip),%rcx
cmp    (%rcx),%rax
je     115b <main+0x3b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffff,%ebx
mov    0x2eb8(%rip),%r14
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%ebx
cmp    (%r14),%rax
jne    1130 <main+0x10>
lea    0xeba(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [10 x i8] c"nc = %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [10 x i8] c"nc = %d \0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i32 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *malloc_wrapper(void *unused, size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<malloc_wrapper>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @malloc_wrapper(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
int fb_hFileResetEx(int streamno) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fb_hFileResetEx(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int /*<<< orphan*/ **);
void fp_cleanup(FILE **f) {
  int c;
  for (c = 0; c < 2; c++) {
    if (f[c] != NULL) {
      fclose(f[c]);
    }
  }
  free(f);
}


x86 assembly (clang, -O0):
<fp_cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1174 <fp_cleanup+0x54>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1161 <fp_cleanup+0x41>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <fclose@plt>
jmp    1166 <fp_cleanup+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <fp_cleanup+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_cleanup>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1131 <fp_cleanup+0x11>
call   1040 <fclose@plt>
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     113f <fp_cleanup+0x1f>
call   1040 <fclose@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @fp_cleanup(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = getelementptr inbounds i32*, i32** %0, i64 1
%8 = load i32*, i32** %7
%9 = icmp eq i32* %8, null
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = tail call i32 @fclose(i32* %8)
br label %12
12: ; preds = %10, %6
%13 = tail call i32 @free(i32** %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ _fork(int /*<<< orphan*/, int /*<<< orphan*/ *);
pid_t fork(void) { return _fork(0, NULL); }


x86 assembly (clang, -O0):
<fork>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <_fork@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <_fork@plt>

LLVM IR (-O0):
define i32 @fork() {
%1 = call i32 @_fork(i32 0, i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @fork() {
%1 = tail call i32 @_fork(i32 0, i32* null)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x9_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x9_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x9_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x9_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x9_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
void crt0_unused(void) {}


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

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

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

LLVM IR (-O2):
define void @crt0_unused() {
ret void
}
float CG_OpFuncOR(const float a, const float b) { return (int)a | (int)b; }


x86 assembly (clang, -O0):
<CG_OpFuncOR>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
cvttss2si -0x4(%rbp),%eax
cvttss2si -0x8(%rbp),%ecx
or     %ecx,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_OpFuncOR>:
cvttss2si %xmm0,%eax
cvttss2si %xmm1,%ecx
or     %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
ret

LLVM IR (-O0):
define float @CG_OpFuncOR(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fptosi float %5 to i32
%7 = load float, float* %4
%8 = fptosi float %7 to i32
%9 = or i32 %6, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @CG_OpFuncOR(float %0, float %1) {
%3 = fptosi float %0 to i32
%4 = fptosi float %1 to i32
%5 = or i32 %4, %3
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
int find(int *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void search(int nums[], int target, int size) {
  int index = find(nums, target, size, 0);
  if (index >= 0)
    printf("Found it at index %d\n", index);
  else
    printf("Not found\n");
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
xor    %ecx,%ecx
call   1040 <find@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1166 <search+0x46>
mov    -0x14(%rbp),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1174 <search+0x54>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
push   %rax
xor    %ecx,%ecx
call   1050 <find@plt>
test   %eax,%eax
js     114d <search+0x1d>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>
lea    0xec2(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Found it at index %d\0A\00"
@.str.1 = [11 x i8] c"Not found\0A\00"
define void @search(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @find(i32* %8, i32 %9, i32 %10, i32 0)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %7
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %19
17: ; preds = %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %14
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Found it at index %d\0A\00"
@str = [10 x i8] c"Not found\00"
define void @search(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @find(i32* %0, i32 %1, i32 %2, i32 0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %10
8: ; preds = %3
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}