xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ expression();
int /*<<< orphan*/ match(char);
void less() {
  match('<');
  expression();
  emitln("pop\t%%ebx");
  emitln("cmp\t%%eax,%%ebx");
  emitln("setl\t%%eax");
}


x86 assembly (clang, -O0):
<less>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c,%edi
call   1050 <match@plt>
mov    $0x0,%al
call   1040 <expression@plt>
lea    0xeb4(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb2(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb6(%rip),%rdi
call   1030 <emitln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<less>:
push   %rax
mov    $0x3c,%edi
call   1050 <match@plt>
xor    %eax,%eax
call   1040 <expression@plt>
lea    0xeb7(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb5(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb9(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [16 x i8] c"cmp\09%%eax,%%ebx\00"
@.str.2 = [11 x i8] c"setl\09%%eax\00"
define void @less() {
%1 = call i32 @match(i8 signext 60)
%2 = call i32 (...) @expression()
%3 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @emitln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [16 x i8] c"cmp\09%%eax,%%ebx\00"
@.str.2 = [11 x i8] c"setl\09%%eax\00"
define void @less() {
%1 = tail call i32 @match(i8 signext 60)
%2 = tail call i32 (...) @expression()
%3 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @emitln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dej_adresare_jako_prvni(char *, int);
int strlen(char *);
void setridit_list_dir(char *buffer) {
  int lines = strlen(buffer) / (100 + 10 + 1 + 16 + 1);
  if (lines > 1)
    dej_adresare_jako_prvni(buffer, lines);
}


x86 assembly (clang, -O0):
<setridit_list_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1156 <setridit_list_dir+0x36>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <dej_adresare_jako_prvni@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setridit_list_dir>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x100,%eax
jl     113e <setridit_list_dir+0x1e>
shr    $0x7,%eax
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <dej_adresare_jako_prvni@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @setridit_list_dir(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 255
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = lshr i32 %2, 7
%6 = tail call i32 @dej_adresare_jako_prvni(i8* %0, i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *fileRead(char *, long *);
char *memungz(char *, int);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ ungz_initialize();
int main() {
  const char *PAGEJUMP =
      "<meta http-equiv=\"refresh\" content=\"0;url=http://www.baidu.com\">";
  long filelen;
  char *temp = fileRead("douban_gzip", &filelen);
  printf("file size %ld\n", filelen);
  ungz_initialize();
  char *b3 = memungz(temp, (int)filelen);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xee0(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <fileRead@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <ungz_initialize@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    %eax,%esi
call   1050 <memungz@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <fileRead@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rsi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <ungz_initialize@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1050 <memungz@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [65 x i8] c"<meta http-equiv=\22refresh\22 content=\220;url=http://www.baidu.com\22>\00"
@.str.1 = [12 x i8] c"douban_gzip\00"
@.str.2 = [15 x i8] c"file size %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8** %2
%6 = call i8* @fileRead(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64* %3)
store i8* %6, i8** %4
%7 = load i64, i64* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i64 %7)
%9 = call i32 (...) @ungz_initialize()
%10 = load i8*, i8** %4
%11 = load i64, i64* %3
%12 = trunc i64 %11 to i32
%13 = call i8* @memungz(i8* %10, i32 %12)
store i8* %13, i8** %5
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"douban_gzip\00"
@.str.2 = [15 x i8] c"file size %ld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i8* @fileRead(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i64 %4)
%6 = call i32 (...) @ungz_initialize()
%7 = load i64, i64* %1
%8 = trunc i64 %7 to i32
%9 = call i8* @memungz(i8* %3, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned int, size_t);
void sdu_delivered(void *arg, unsigned time_in_ms, void *buffer, size_t size) {
  printf("%s[ms=%04d]: %zd byte packet acknowledged\n", (char *)arg,
         time_in_ms % 10000, size);
}


x86 assembly (clang, -O0):
<sdu_delivered>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %ecx
mov    -0x20(%rbp),%rcx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdu_delivered>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    %edx,%eax
mov    $0xd1b71759,%edi
imul   %rax,%rdi
shr    $0x2d,%rdi
imul   $0x2710,%edi,%eax
sub    %eax,%edx
lea    0xecd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"%s[ms=%04d]: %zd byte packet acknowledged\0A\00"
define void @sdu_delivered(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = urem i32 %10, 10000
%12 = load i64, i64* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %11, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"%s[ms=%04d]: %zd byte packet acknowledged\0A\00"
define void @sdu_delivered(i8* %0, i32 %1, i8* nocapture readnone %2, i64 %3) {
%5 = urem i32 %1, 10000
%6 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5, i64 %3)
ret void
}
int get_biggest(int a, int b) {
  int c;
  if (a < b) {
    c = b;
  } else {
    c = a;
  }
  return c;
}


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

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

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

LLVM IR (-O2):
define i32 @get_biggest(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
char cnv_file2ch(int i) { return 'A' + i - 1 >= 'I' ? 'A' + i : 'A' + i - 1; }


x86 assembly (clang, -O0):
<cnv_file2ch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0x1,%eax
cmp    $0x49,%eax
jl     1127 <cnv_file2ch+0x27>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <cnv_file2ch+0x33>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cnv_file2ch>:
xor    %eax,%eax
cmp    $0x9,%edi
setge  %al
add    %edi,%eax
add    $0x40,%al
ret

LLVM IR (-O0):
define signext i8 @cnv_file2ch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 65, %3
%5 = sub nsw i32 %4, 1
%6 = icmp sge i32 %5, 73
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 65, %8
br label %14
10: ; preds = %1
%11 = load i32, i32* %2
%12 = add nsw i32 65, %11
%13 = sub nsw i32 %12, 1
br label %14
14: ; preds = %10, %7
%15 = phi i32 [ %9, %7 ], [ %13, %10 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @cnv_file2ch(i32 %0) {
%2 = icmp sgt i32 %0, 8
%3 = select i1 %2, i32 65, i32 64
%4 = add nsw i32 %3, %0
%5 = trunc i32 %4 to i8
ret i8 %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ uint16_t;
struct hle_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alist_clear(struct hle_t *, scalar_t__, scalar_t__);
void CLEARBUFF(struct hle_t *hle, uint32_t w1, uint32_t w2) {
  uint16_t dmem = w1;
  uint16_t count = w2;
  if (count == 0)
    return;
  alist_clear(hle, dmem, count);
}


x86 assembly (clang, -O0):
<CLEARBUFF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1144 <CLEARBUFF+0x34>
jmp    1155 <CLEARBUFF+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <alist_clear@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CLEARBUFF>:
test   %rdx,%rdx
je     111a <CLEARBUFF+0xa>
jmp    1030 <alist_clear@plt>
ret

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @CLEARBUFF(%struct.hle_t* %0, i64 %1, i64 %2) {
%4 = alloca %struct.hle_t*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store %struct.hle_t* %0, %struct.hle_t** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %5
store i64 %9, i64* %7
%10 = load i64, i64* %6
store i64 %10, i64* %8
%11 = load i64, i64* %8
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %3
br label %19
14: ; preds = %3
%15 = load %struct.hle_t*, %struct.hle_t** %4
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = call i32 @alist_clear(%struct.hle_t* %15, i64 %16, i64 %17)
br label %19
19: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @CLEARBUFF(%struct.hle_t* %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @alist_clear(%struct.hle_t* %0, i64 %1, i64 %2)
br label %7
7: ; preds = %3, %5
ret void
}
/* Variables and functions */
char *strdup(char *);
char *case2str(char *str) {
  char *newstr;
  if (str[0] != '-') {
    return str;
  }
  newstr = strdup(str);
  newstr[0] = 'm';
  return newstr;
}


x86 assembly (clang, -O0):
<case2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1139 <case2str+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <case2str+0x45>
mov    -0x10(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x6d,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<case2str>:
push   %rax
mov    %rdi,%rax
cmpb   $0x2d,(%rdi)
jne    1124 <case2str+0x14>
mov    %rax,%rdi
call   1030 <strdup@plt>
movb   $0x6d,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @case2str(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @strdup(i8* %0)
store i8 109, i8* %5
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ %0, %1 ]
ret i8* %7
}
void swap_double(double *a, double *b) {
  double c = *a;
  *a = *b;
  *b = c;
}


x86 assembly (clang, -O0):
<swap_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  %xmm1,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @swap_double(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
store double %7, double* %5
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double, double* %5
%12 = load double*, double** %4
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @swap_double(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ mpz_t;
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_add_ui(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mul_2exp(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ mpz_set_si(int /*<<< orphan*/, int);
void mpz_set_int64(mpz_t z, int64_t x) {
  mpz_set_si(z, (x >> 32));
  mpz_mul_2exp(z, z, 32);
  mpz_add_ui(z, z, (uint32_t)x);
}


x86 assembly (clang, -O0):
<mpz_set_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <mpz_set_si@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    $0x20,%edx
call   1050 <mpz_mul_2exp@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <mpz_add_ui@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpz_set_int64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <mpz_set_si@plt>
mov    %ebp,%edi
mov    %ebp,%esi
mov    $0x20,%edx
call   1050 <mpz_mul_2exp@plt>
mov    %ebp,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mpz_add_ui@plt>

LLVM IR (-O0):
define void @mpz_set_int64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %6, 32
%8 = call i32 @mpz_set_si(i32 %5, i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @mpz_mul_2exp(i32 %9, i32 %10, i32 32)
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @mpz_add_ui(i32 %12, i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @mpz_set_int64(i32 %0, i32 %1) {
%3 = tail call i32 @mpz_set_si(i32 %0, i32 poison)
%4 = tail call i32 @mpz_mul_2exp(i32 %0, i32 %0, i32 32)
%5 = tail call i32 @mpz_add_ui(i32 %0, i32 %0, i32 %1)
ret void
}
const char *getSpec(void) { return "typ_spec { name=typ_EnvType; }"; }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"typ_spec { name=typ_EnvType; }\00"
define i8* @getSpec() {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [31 x i8] c"typ_spec { name=typ_EnvType; }\00"
define i8* @getSpec() {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int xfork(void) {
  printf("fork() not implemented\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<xfork>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<xfork>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"fork() not implemented\0A\00"
define i32 @xfork() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [23 x i8] c"fork() not implemented\00"
define i32 @xfork() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
struct zbuf {
  int dummy;
};

/* Variables and functions */
void *__zbuf_pull(struct zbuf *, size_t, int);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void zbuf_get(struct zbuf *zb, void *dst, size_t len) {
  void *src = (__zbuf_pull(zb, len, 1));
  if (src)
    memcpy(dst, src, len);
}


x86 assembly (clang, -O0):
<zbuf_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <__zbuf_pull@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1166 <zbuf_get+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zbuf_get>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
mov    $0x1,%edx
call   1030 <__zbuf_pull@plt>
test   %rax,%rax
je     1151 <zbuf_get+0x31>
mov    %r14,%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.zbuf = type { i32 }
define void @zbuf_get(%struct.zbuf* %0, i8* %1, i64 %2) {
%4 = alloca %struct.zbuf*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store %struct.zbuf* %0, %struct.zbuf** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.zbuf*, %struct.zbuf** %4
%9 = load i64, i64* %6
%10 = call i8* @__zbuf_pull(%struct.zbuf* %8, i64 %9, i32 1)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = load i8*, i8** %7
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
br label %18
18: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
%struct.zbuf = type { i32 }
define void @zbuf_get(%struct.zbuf* %0, i8* %1, i64 %2) {
%4 = tail call i8* @__zbuf_pull(%struct.zbuf* %0, i64 %2, i32 1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @memcpy(i8* %1, i8* %4, i64 %2)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getch();
void init(void) { getch(); }


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

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

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

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @getch()
ret void
}
int less_than(int i, int n) { return i < n; }


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

x86 assembly (clang, -O2):
<less_than>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @less_than(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @less_than(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int gen_test_open_file(char *file_name) {
  FILE *test_opener = fopen(file_name, "r");
  if (test_opener != NULL) {
    fclose(test_opener);
    return 1;
  } else
    printf("FAILED TO OPEN FILE, DANG");
  return 0;
}


x86 assembly (clang, -O0):
<gen_test_open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1170 <gen_test_open_file+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1183 <gen_test_open_file+0x53>
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_test_open_file>:
push   %rax
lea    0xec8(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1151 <gen_test_open_file+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [26 x i8] c"FAILED TO OPEN FILE, DANG\00"
define i32 @gen_test_open_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @fclose(i32* %10)
store i32 1, i32* %2
br label %15
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12
store i32 0, i32* %2
br label %15
15: ; preds = %14, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [26 x i8] c"FAILED TO OPEN FILE, DANG\00"
define i32 @gen_test_open_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 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 %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %9
}
int brcm_pcie_bounce_register_dev(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @brcm_pcie_bounce_register_dev(%struct.device* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef void DIR;

/* Variables and functions */
void *opendir(char const *);
void *_opendir(const char *dir) {
  DIR *dp;
  dp = opendir(dir);
  if (dp == NULL)
    return NULL;
  return dp;
}


x86 assembly (clang, -O0):
<_opendir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1141 <_opendir+0x31>
movq   $0x0,-0x8(%rbp)
jmp    1149 <_opendir+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @_opendir(i8* nocapture %0) {
%2 = tail call i8* @opendir(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ GPIO6_7_8_9_DriverIRQHandler();
__attribute__((weak)) void GPIO6_7_8_9_IRQHandler(void) {
  GPIO6_7_8_9_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @GPIO6_7_8_9_IRQHandler() {
%1 = tail call i32 (...) @GPIO6_7_8_9_DriverIRQHandler()
ret void
}
/* Variables and functions */
char *CG_ConfigString(int);
int /*<<< orphan*/ CG_InitGlass();
int /*<<< orphan*/ trap_FX_RegisterEffect(char const *);
void CG_RegisterEffects(void) {
  const char *effectName;
  int i;
  for (i = 1; i < 64; i++) {
    effectName =
        CG_ConfigString(((((((32 + 256) + 256) + 32) + 64) + 64) + 64) + i);
    if (!effectName[0]) {
      break;
    }
    trap_FX_RegisterEffect(effectName);
  }
  CG_InitGlass();
}


x86 assembly (clang, -O0):
<CG_RegisterEffects>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1184 <CG_RegisterEffects+0x54>
mov    -0xc(%rbp),%edi
add    $0x300,%edi
call   1050 <CG_ConfigString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    116d <CG_RegisterEffects+0x3d>
jmp    1184 <CG_RegisterEffects+0x54>
mov    -0x8(%rbp),%rdi
call   1030 <trap_FX_RegisterEffect@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <CG_RegisterEffects+0xf>
mov    $0x0,%al
call   1040 <CG_InitGlass@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_RegisterEffects>:
push   %rbx
mov    $0x301,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1050 <CG_ConfigString@plt>
cmpb   $0x0,(%rax)
je     115f <CG_RegisterEffects+0x2f>
mov    %rax,%rdi
call   1030 <trap_FX_RegisterEffect@plt>
add    $0x1,%ebx
cmp    $0x340,%ebx
jne    1140 <CG_RegisterEffects+0x10>
xor    %eax,%eax
pop    %rbx
jmp    1040 <CG_InitGlass@plt>

LLVM IR (-O0):
define void @CG_RegisterEffects() {
%1 = alloca i8*
%2 = alloca i32
store i32 1, i32* %2
br label %3
3: ; preds = %18, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 64
br i1 %5, label %6, label %21
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 768, %7
%9 = call i8* @CG_ConfigString(i32 %8)
store i8* %9, i8** %1
%10 = load i8*, i8** %1
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %6
br label %21
15: ; preds = %6
%16 = load i8*, i8** %1
%17 = call i32 @trap_FX_RegisterEffect(i8* %16)
br label %18
18: ; preds = %15
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %3
21: ; preds = %14, %3
%22 = call i32 (...) @CG_InitGlass()
ret void
}

LLVM IR (-O2):
define void @CG_RegisterEffects() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 1, %0 ], [ %9, %7 ]
%3 = add nuw nsw i32 %2, 768
%4 = tail call i8* @CG_ConfigString(i32 %3)
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = tail call i32 @trap_FX_RegisterEffect(i8* %4)
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 64
br i1 %10, label %11, label %1
11: ; preds = %1, %7
%12 = tail call i32 (...) @CG_InitGlass()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DrawDoor(double, double);
int /*<<< orphan*/ DrawOutline(double, double);
int /*<<< orphan*/ DrawWindows(double, double);
void DrawHouse(double x, double y) {
  DrawOutline(x, y);
  DrawDoor(x + (3.0 - 0.4) / 2, y);
  DrawWindows(x, y);
}


x86 assembly (clang, -O0):
<DrawHouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <DrawOutline@plt>
movsd  0xea7(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <DrawDoor@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <DrawWindows@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawHouse>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <DrawOutline@plt>
movsd  0xeb3(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1050 <DrawDoor@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
jmp    1040 <DrawWindows@plt>

LLVM IR (-O0):
define void @DrawHouse(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @DrawOutline(double %5, double %6)
%8 = load double, double* %3
%9 = fadd double %8, 1.300000e+00
%10 = load double, double* %4
%11 = call i32 @DrawDoor(double %9, double %10)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @DrawWindows(double %12, double %13)
ret void
}

LLVM IR (-O2):
define void @DrawHouse(double %0, double %1) {
%3 = tail call i32 @DrawOutline(double %0, double %1)
%4 = fadd double %0, 1.300000e+00
%5 = tail call i32 @DrawDoor(double %4, double %1)
%6 = tail call i32 @DrawWindows(double %0, double %1)
ret void
}
/* Variables and functions */
scalar_t__ gpio_read(int);
int /*<<< orphan*/ printf(char *);
void cc1101_tx_end_wait() {
  while (!(gpio_read(4)))
    ;
  while ((gpio_read(4)))
    ;
  printf("Message Sent.\n\r");
}


x86 assembly (clang, -O0):
<cc1101_tx_end_wait>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <cc1101_tx_end_wait+0x9>
mov    $0x4,%edi
call   1040 <gpio_read@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1149 <cc1101_tx_end_wait+0x29>
jmp    114e <cc1101_tx_end_wait+0x2e>
jmp    1129 <cc1101_tx_end_wait+0x9>
jmp    1153 <cc1101_tx_end_wait+0x33>
mov    $0x4,%edi
call   1040 <gpio_read@plt>
cmp    $0x0,%rax
je     116c <cc1101_tx_end_wait+0x4c>
jmp    1153 <cc1101_tx_end_wait+0x33>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc1101_tx_end_wait>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x4,%edi
call   1040 <gpio_read@plt>
test   %rax,%rax
je     1130 <cc1101_tx_end_wait+0x10>
nop
mov    $0x4,%edi
call   1040 <gpio_read@plt>
test   %rax,%rax
jne    1140 <cc1101_tx_end_wait+0x20>
lea    0xeaa(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Message Sent.\0A\0D\00"
define void @cc1101_tx_end_wait() {
br label %1
1: ; preds = %5, %0
%2 = call i64 @gpio_read(i32 4)
%3 = icmp ne i64 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
br label %7
7: ; preds = %10, %6
%8 = call i64 @gpio_read(i32 4)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
br label %7
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Message Sent.\0A\0D\00"
define void @cc1101_tx_end_wait() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 @gpio_read(i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1, %4
%5 = tail call i64 @gpio_read(i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *interrupt_handler(void *data) {
  pthread_exit(NULL);
  return NULL;
}


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

x86 assembly (clang, -O2):
<interrupt_handler>:
push   %rax
xor    %edi,%edi
call   1030 <pthread_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @interrupt_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @pthread_exit(i32* null)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @interrupt_handler(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
ret i8* null
}
void lgtd_proto_list_tags(struct lgtd_client *client) { (void)client; }


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

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

LLVM IR (-O0):
%struct.lgtd_client = type opaque
define void @lgtd_proto_list_tags(%struct.lgtd_client* %0) {
%2 = alloca %struct.lgtd_client*
store %struct.lgtd_client* %0, %struct.lgtd_client** %2
%3 = load %struct.lgtd_client*, %struct.lgtd_client** %2
ret void
}

LLVM IR (-O2):
%struct.lgtd_client = type opaque
define void @lgtd_proto_list_tags(%struct.lgtd_client* nocapture %0) {
ret void
}
void transfer_boundary_from_device_a_(long *Mesh_pointer) {}


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

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

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

LLVM IR (-O2):
define void @transfer_boundary_from_device_a_(i64* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xxx2(void) { printf("MAIN2\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"MAIN2\00"
define void @xxx2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char **argv) {
  printf("Usage: %s [+|-] RomanNumeral RomanNumeral\n", argv[0]);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    (%rdi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: %s [+|-] RomanNumeral RomanNumeral\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Usage: %s [+|-] RomanNumeral RomanNumeral\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void cb_set_configuration(int idx) {}


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

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

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

LLVM IR (-O2):
define void @cb_set_configuration(i32 %0) {
ret void
}
void ff_hevc_put_hevc_qpel_h24_8_sse4() {}


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

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

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

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

/* Variables and functions */
scalar_t__ fwrite(void *, int, int, int /*<<< orphan*/ *);
int pc_writebin(void *handle, void *buffer, int size) {
  return (int)fwrite(buffer, 1, size, (FILE *)handle) == size;
}


x86 assembly (clang, -O0):
<pc_writebin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pc_writebin>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pc_writebin(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i64 @fwrite(i8* %7, i32 1, i32 %8, i32* %10)
%12 = trunc i64 %11 to i32
%13 = load i32, i32* %6
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @pc_writebin(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i64 @fwrite(i8* %1, i32 1, i32 %2, i32* %4)
%6 = trunc i64 %5 to i32
%7 = icmp eq i32 %6, %2
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
struct buf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufput(struct buf *, char *, int);
int latex_linebreak(struct buf *ob, void *opaque) {
  bufput(ob, "\\\\", sizeof "\\\\" - 1);
  return 1;
}


x86 assembly (clang, -O0):
<latex_linebreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x2,%edx
call   1030 <bufput@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<latex_linebreak>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x2,%edx
call   1030 <bufput@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.buf = type { i32 }
@.str = [3 x i8] c"\\\\\00"
define i32 @latex_linebreak(%struct.buf* %0, i8* %1) {
%3 = alloca %struct.buf*
%4 = alloca i8*
store %struct.buf* %0, %struct.buf** %3
store i8* %1, i8** %4
%5 = load %struct.buf*, %struct.buf** %3
%6 = call i32 @bufput(%struct.buf* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 1
}

LLVM IR (-O2):
%struct.buf = type { i32 }
@.str = [3 x i8] c"\\\\\00"
define i32 @latex_linebreak(%struct.buf* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @bufput(%struct.buf* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 1
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c))
    return c + ('a' - 'A');
  else
    return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
scalar_t__ moremem(int /*<<< orphan*/ *, int);
char *newString() {
  char *str;
  *(str = (char *)moremem(NULL, 16)) = '\0';
  return (str);
}


x86 assembly (clang, -O0):
<newString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
mov    $0x10,%esi
call   1030 <moremem@plt>
mov    %rax,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newString>:
push   %rax
xor    %edi,%edi
mov    $0x10,%esi
call   1030 <moremem@plt>
movb   $0x0,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @newString() {
%1 = alloca i8*
%2 = call i64 @moremem(i32* null, i32 16)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
store i8 0, i8* %3
%4 = load i8*, i8** %1
ret i8* %4
}

LLVM IR (-O2):
define i8* @newString() {
%1 = tail call i64 @moremem(i32* null, i32 16)
%2 = inttoptr i64 %1 to i8*
store i8 0, i8* %2
ret i8* %2
}
/* Variables and functions */
double __dmod(double, double);
double sin(double);
double __dsind(double x) {
  double circle = 360.0;
  return sin(.017453292519943295 * __dmod(x, circle));
}


x86 assembly (clang, -O0):
<__dsind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__dmod@plt>
movaps %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dsind>:
push   %rax
movsd  0xed7(%rip),%xmm1
call   1030 <__dmod@plt>
mulsd  0xed2(%rip),%xmm0
pop    %rax
jmp    1040 <sin@plt>

LLVM IR (-O0):
define double @__dsind(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 3.600000e+02, double* %3
%4 = load double, double* %2
%5 = load double, double* %3
%6 = call double @__dmod(double %4, double %5)
%7 = fmul double 0x3F91DF46A2529D39, %6
%8 = call double @sin(double %7)
ret double %8
}

LLVM IR (-O2):
define double @__dsind(double %0) {
%2 = tail call double @__dmod(double %0, double 3.600000e+02)
%3 = fmul double %2, 0x3F91DF46A2529D39
%4 = tail call double @sin(double %3)
ret double %4
}
int unload(char *arguments) {}


x86 assembly (clang, -O0):
<unload>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @unload(i8* nocapture readnone %0) {
ret i32 undef
}
int ptrace_sandbox_get_long(struct pt_sandbox *p_sandbox, unsigned long ptr,
                            unsigned long *p_out) {
  (void)p_sandbox;
  (void)ptr;
  (void)p_out;
  return -1;
}


x86 assembly (clang, -O0):
<ptrace_sandbox_get_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define i32 @ptrace_sandbox_get_long(%struct.pt_sandbox* %0, i64 %1, i64* %2) {
%4 = alloca %struct.pt_sandbox*
%5 = alloca i64
%6 = alloca i64*
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load %struct.pt_sandbox*, %struct.pt_sandbox** %4
%8 = load i64, i64* %5
%9 = load i64*, i64** %6
ret i32 -1
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define i32 @ptrace_sandbox_get_long(%struct.pt_sandbox* nocapture readnone %0, i64 %1, i64* nocapture readnone %2) {
ret i32 -1
}