xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int INT64_MIN;
int64_t safe_div_func_int64_t_s_s(int64_t _si1, int64_t _si2) {
  if (_si2 == 0 || (_si1 == INT64_MIN && _si2 == -1))
    return _si1;
  return _si1 / _si2;
}


x86 assembly (clang, -O0):
<safe_div_func_int64_t_s_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1130 <safe_div_func_int64_t_s_s+0x30>
mov    -0x8(%rbp),%eax
mov    0x2eca(%rip),%rcx
cmp    (%rcx),%eax
jne    113b <safe_div_func_int64_t_s_s+0x3b>
cmpl   $0xffffffff,-0xc(%rbp)
jne    113b <safe_div_func_int64_t_s_s+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <safe_div_func_int64_t_s_s+0x45>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_div_func_int64_t_s_s>:
mov    %edi,%eax
test   %esi,%esi
je     1116 <safe_div_func_int64_t_s_s+0x16>
cmp    $0xffffffff,%esi
jne    1117 <safe_div_func_int64_t_s_s+0x17>
mov    0x2ed6(%rip),%rcx
cmp    %eax,(%rcx)
jne    1117 <safe_div_func_int64_t_s_s+0x17>
ret
cltd
idiv   %esi
ret

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

LLVM IR (-O2):
@INT64_MIN = global i32 0
define i32 @safe_div_func_int64_t_s_s(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = load i32, i32* @INT64_MIN
%6 = icmp eq i32 %5, %0
%7 = icmp eq i32 %1, -1
%8 = and i1 %7, %6
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = sdiv i32 %0, %1
br label %11
11: ; preds = %2, %4, %9
%12 = phi i32 [ %10, %9 ], [ %0, %4 ], [ %0, %2 ]
ret i32 %12
}
/* Variables and functions */
int strlen(char *);
int toDownload(char *str) {
  if (strlen(str) > 2 && str[0] == 'D' && str[1] == ' ')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<toDownload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jle    115b <toDownload+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x44,%eax
jne    115b <toDownload+0x4b>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
jne    115b <toDownload+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <toDownload+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toDownload>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x3,%eax
jl     112e <toDownload+0x1e>
cmpb   $0x44,(%rbx)
jne    112e <toDownload+0x1e>
mov    $0x1,%eax
cmpb   $0x20,0x1(%rbx)
je     1130 <toDownload+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toDownload(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %20
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 68
br i1 %12, label %13, label %20
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 32
br i1 %18, label %19, label %20
19: ; preds = %13
store i32 1, i32* %2
br label %21
20: ; preds = %13, %7, %1
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @toDownload(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 2
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 68
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %0, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 32
br i1 %10, label %12, label %11
11: ; preds = %7, %4, %1
br label %12
12: ; preds = %7, %11
%13 = phi i32 [ 0, %11 ], [ 1, %7 ]
ret i32 %13
}
void ADC1Seq3_Handler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @ADC1Seq3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void _sync_tsc(void) {
  asm volatile("cpuid" : : : "%rax", "%rbx", "%rcx", "%rdx");
}


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

x86 assembly (clang, -O2):
<_sync_tsc>:
push   %rbx
cpuid
pop    %rbx
ret

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

LLVM IR (-O2):
define void @_sync_tsc() {
tail call void asm sideeffect "cpuid", "~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ accept_inclusive_OR_expression();
int /*<<< orphan*/ parse_logical_AND_expression();
void accept_logical_AND_expression() {
  accept_inclusive_OR_expression();
  parse_logical_AND_expression();
}


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

x86 assembly (clang, -O2):
<accept_logical_AND_expression>:
push   %rax
xor    %eax,%eax
call   1040 <accept_inclusive_OR_expression@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <parse_logical_AND_expression@plt>

LLVM IR (-O0):
define void @accept_logical_AND_expression() {
%1 = call i32 (...) @accept_inclusive_OR_expression()
%2 = call i32 (...) @parse_logical_AND_expression()
ret void
}

LLVM IR (-O2):
define void @accept_logical_AND_expression() {
%1 = tail call i32 (...) @accept_inclusive_OR_expression()
%2 = tail call i32 (...) @parse_logical_AND_expression()
ret void
}
/* Variables and functions */
int myAtoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char str[20] = "abc";
  int val = 0;
  val = myAtoi(str);
  printf("%d\n", val);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <myAtoi@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%rdi
call   1040 <myAtoi@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [20 x i8] c"abc\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [20 x i8]* %2 to i8*
store i32 0, i32* %3
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i32 @myAtoi(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [20 x i8] c"abc\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @myAtoi(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fact1(int);
int mul(int, int /*<<< orphan*/);
int fact2(int n) {
  if (n == 0)
    return 1;
  else
    return mul(n, fact1(n - 1));
}


x86 assembly (clang, -O0):
<fact2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1141 <fact2+0x21>
movl   $0x1,-0x4(%rbp)
jmp    115f <fact2+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fact1@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <mul@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fact2>:
test   %edi,%edi
je     1139 <fact2+0x19>
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <fact1@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mul@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @fact2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @fact1(i32 %4)
%6 = tail call i32 @mul(i32 %0, i32 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 1, %1 ]
ret i32 %8
}
int MMsToPoints(int m) { return m * 2363 / 100; }


x86 assembly (clang, -O0):
<MMsToPoints>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x93b,-0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMsToPoints>:
imul   $0x93b,%edi,%eax
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @MMsToPoints(i32 %0) {
%2 = mul nsw i32 %0, 2363
%3 = sdiv i32 %2, 100
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void debug(void) {
  printf("File: %s Line: %d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/hoastyle/Makefile-Tutorial/refs/heads/"
         "master/src/tools/debug.c",
         5);
}


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

x86 assembly (clang, -O2):
<debug>:
lea    0xee9(%rip),%rdi
lea    0xef5(%rip),%rsi
mov    $0x5,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"File: %s Line: %d\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hoastyle/Makefile-Tutorial/refs/heads/master/src/tools/debug.c\00"
define void @debug() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 5)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"File: %s Line: %d\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hoastyle/Makefile-Tutorial/refs/heads/master/src/tools/debug.c\00"
define void @debug() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 5)
ret void
}
void escape(char *str) {
  char *c = str;
  while (*c != '\0') {
    if (*c == '"') {
      *c = ' ';
    }
    if (*c < 32) {
      *c = ' ';
    } else if (*c > 126) {
      *c = ' ';
    }
    c += 1;
  }
}


x86 assembly (clang, -O0):
<escape>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1180 <escape+0x80>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1137 <escape+0x37>
mov    -0x10(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jge    1153 <escape+0x53>
mov    -0x10(%rbp),%rax
movb   $0x20,(%rax)
jmp    116f <escape+0x6f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jle    116a <escape+0x6a>
mov    -0x10(%rbp),%rax
movb   $0x20,(%rax)
jmp    116f <escape+0x6f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <escape+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<escape>:
jmp    1117 <escape+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x20,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x22,%al
je     1110 <escape+0x10>
test   %al,%al
je     112a <escape+0x2a>
add    $0x81,%al
cmp    $0xa0,%al
jbe    1110 <escape+0x10>
jmp    1113 <escape+0x13>
ret

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

LLVM IR (-O2):
define void @escape(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i8* [ %0, %1 ], [ %10, %9 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %11
i8 34, label %8
]
5: ; preds = %2
%6 = add i8 %4, -127
%7 = icmp ult i8 %6, -95
br i1 %7, label %8, label %9
8: ; preds = %5, %2
store i8 32, i8* %3
br label %9
9: ; preds = %5, %8
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ audio_ic_set_analog_gain();
int /*<<< orphan*/ menu_numeric_toggle(void *, int, int /*<<< orphan*/, int);
void analog_gain_toggle(void *priv, int delta) {
  menu_numeric_toggle(priv, delta, 0, 5);
  audio_ic_set_analog_gain();
}


x86 assembly (clang, -O0):
<analog_gain_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
mov    $0x5,%ecx
call   1030 <menu_numeric_toggle@plt>
mov    $0x0,%al
call   1040 <audio_ic_set_analog_gain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analog_gain_toggle>:
push   %rax
xor    %edx,%edx
mov    $0x5,%ecx
call   1030 <menu_numeric_toggle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <audio_ic_set_analog_gain@plt>

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

LLVM IR (-O2):
define void @analog_gain_toggle(i8* %0, i32 %1) {
%3 = tail call i32 @menu_numeric_toggle(i8* %0, i32 %1, i32 0, i32 5)
%4 = tail call i32 (...) @audio_ic_set_analog_gain()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dlclose(void *);
void rmtFreeLibrary(void *handle) { dlclose(handle); }


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

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

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

LLVM IR (-O2):
define void @rmtFreeLibrary(i8* %0) {
%2 = tail call i32 @dlclose(i8* %0)
ret void
}
int test_imm_74uint8_reg(unsigned char val) {
  return ((val) & (-0x74 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_74uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff8c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_74uint8_reg>:
test   $0x8c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_74uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -116
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
I0AR1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if (22 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl 0x43d11(%rax),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1142 <I0AR1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <I0AR1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0AR1>:
xor    %eax,%eax
cmpb   $0x16,0x43d11(%r9)
16
setae  %al
ret

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

LLVM IR (-O2):
define i32 @I0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = getelementptr inbounds i8, i8* %5, i64 277777
%8 = load i8, i8* %7
%9 = icmp ugt i8 %8, 21
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
double ln_get_neptune_earth_dist(double);
double ln_get_neptune_solar_dist(double);
double log10(double);
double ln_get_neptune_magnitude(double JD) {
  double delta, r;
  r = ln_get_neptune_solar_dist(JD);
  delta = ln_get_neptune_earth_dist(JD);
  return -6.87 + 5.0 * log10(r * delta);
}


x86 assembly (clang, -O0):
<ln_get_neptune_magnitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_neptune_solar_dist@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <ln_get_neptune_earth_dist@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <log10@plt>
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_neptune_magnitude>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <ln_get_neptune_solar_dist@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <ln_get_neptune_earth_dist@plt>
mulsd  0x10(%rsp),%xmm0
call   1040 <log10@plt>
mulsd  0xe9d(%rip),%xmm0
addsd  0xe9d(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ln_get_neptune_magnitude(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @ln_get_neptune_solar_dist(double %5)
store double %6, double* %4
%7 = load double, double* %2
%8 = call double @ln_get_neptune_earth_dist(double %7)
store double %8, double* %3
%9 = load double, double* %4
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = call double @log10(double %11)
%13 = call double @llvm.fmuladd.f64(double 5.000000e+00, double %12, double -6.870000e+00)
ret double %13
}

LLVM IR (-O2):
define double @ln_get_neptune_magnitude(double %0) {
%2 = tail call double @ln_get_neptune_solar_dist(double %0)
%3 = tail call double @ln_get_neptune_earth_dist(double %0)
%4 = fmul double %2, %3
%5 = tail call double @log10(double %4)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 5.000000e+00, double -6.870000e+00)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ datasette_control_internal(int);
int /*<<< orphan*/ datasette_event_record(int);
scalar_t__ event_playback_active();
int /*<<< orphan*/ network_connected();
void datasette_control(int command) {
  if (event_playback_active())
    return;
  datasette_event_record(command);
  if (!network_connected())
    datasette_control_internal(command);
}


x86 assembly (clang, -O0):
<datasette_control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <event_playback_active@plt>
cmp    $0x0,%rax
je     1161 <datasette_control+0x21>
jmp    1181 <datasette_control+0x41>
mov    -0x4(%rbp),%edi
call   1050 <datasette_event_record@plt>
mov    $0x0,%al
call   1040 <network_connected@plt>
cmp    $0x0,%eax
jne    1181 <datasette_control+0x41>
mov    -0x4(%rbp),%edi
call   1060 <datasette_control_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<datasette_control>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <event_playback_active@plt>
test   %rax,%rax
jne    1161 <datasette_control+0x21>
mov    %ebx,%edi
call   1050 <datasette_event_record@plt>
xor    %eax,%eax
call   1040 <network_connected@plt>
test   %eax,%eax
je     1163 <datasette_control+0x23>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1060 <datasette_control_internal@plt>

LLVM IR (-O0):
define void @datasette_control(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @event_playback_active()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @datasette_event_record(i32 %7)
%9 = call i32 (...) @network_connected()
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = call i32 @datasette_control_internal(i32 %12)
br label %14
14: ; preds = %5, %11, %6
ret void
}

LLVM IR (-O2):
define void @datasette_control(i32 %0) {
%2 = tail call i64 (...) @event_playback_active()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i32 @datasette_event_record(i32 %0)
%6 = tail call i32 (...) @network_connected()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @datasette_control_internal(i32 %0)
br label %10
10: ; preds = %1, %8, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ jhc_exit(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void __attribute__((noreturn)) __attribute__((unused)) jhc_error(char *s) {
  fflush(stdout);
  fputs(s, stderr);
  fputs("\n", stderr);
  jhc_exit(1);
}


x86 assembly (clang, -O0):
<jhc_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
lea    0xe94(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x1,%edi
call   1030 <jhc_exit@plt>

x86 assembly (clang, -O2):
<jhc_error>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e94(%rip),%r14
mov    (%r14),%esi
mov    %rbx,%rdi
call   1040 <fputs@plt>
mov    (%r14),%esi
lea    0xe9f(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x1,%edi
call   1030 <jhc_exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @jhc_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @jhc_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @jhc_error(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @jhc_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int go_to_warp_speed(int speed) { printf("%d\n", speed); }


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

x86 assembly (clang, -O2):
<go_to_warp_speed>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @go_to_warp_speed(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
const char *SKP_Silk_SDK_get_version() {
  static const char version[] = "1.0.2";
  return version;
}


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

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

LLVM IR (-O0):
@SKP_Silk_SDK_get_version.version = internal constant [6 x i8] c"1.0.2\00"
define i8* @SKP_Silk_SDK_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @SKP_Silk_SDK_get_version.version, i64 0, i64 0)
}

LLVM IR (-O2):
@SKP_Silk_SDK_get_version.version = internal constant [6 x i8] c"1.0.2\00"
define i8* @SKP_Silk_SDK_get_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @SKP_Silk_SDK_get_version.version, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
char *malloc(size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *string_alloc(char *orig, size_t len) {
  register char *ret;
  if (len == 0) {
    len = strlen(orig);
  }
  assert(ret = malloc((len + 1) * sizeof(char)));
  strncpy(ret, orig, len);
  ret[len] = 0;
  return ret;
}


x86 assembly (clang, -O0):
<string_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1168 <string_alloc+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1060 <malloc@plt>
mov    %rax,%rdi
mov    %rdi,-0x18(%rbp)
call   1050 <assert@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_alloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
test   %rsi,%rsi
jne    115b <string_alloc+0x1b>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rax,%r15
lea    0x1(%r15),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @string_alloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %4
br label %11
11: ; preds = %8, %2
%12 = load i64, i64* %4
%13 = add i64 %12, 1
%14 = mul i64 %13, 1
%15 = call i8* @malloc(i64 %14)
store i8* %15, i8** %5
%16 = call i32 @assert(i8* %15)
%17 = load i8*, i8** %5
%18 = load i8*, i8** %3
%19 = load i64, i64* %4
%20 = call i32 @strncpy(i8* %17, i8* %18, i64 %19)
%21 = load i8*, i8** %5
%22 = load i64, i64* %4
%23 = getelementptr inbounds i8, i8* %21, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %5
ret i8* %24
}

LLVM IR (-O2):
define i8* @string_alloc(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %6
6: ; preds = %4, %2
%7 = phi i64 [ %5, %4 ], [ %1, %2 ]
%8 = add i64 %7, 1
%9 = tail call i8* @malloc(i64 %8)
%10 = tail call i32 @assert(i8* %9)
%11 = tail call i32 @strncpy(i8* %9, i8* %0, i64 %7)
%12 = getelementptr inbounds i8, i8* %9, i64 %7
store i8 0, i8* %12
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
int le32dec(int /*<<< orphan*/ const *);
uint64_t le64dec(const void *pp) {
  uint8_t const *p = (uint8_t const *)pp;
  return (((uint64_t)le32dec(p + 4) << 32) | le32dec(p));
}


x86 assembly (clang, -O0):
<le64dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1030 <le32dec@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <le32dec@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le64dec>:
push   %rbx
mov    %rdi,%rbx
add    $0x10,%rdi
call   1030 <le32dec@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <le32dec@plt>

LLVM IR (-O0):
define i32 @le64dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 4
%8 = call i32 @le32dec(i32* %7)
%9 = shl i32 %8, 32
%10 = load i32*, i32** %3
%11 = call i32 @le32dec(i32* %10)
%12 = or i32 %9, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @le64dec(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 16
%4 = bitcast i8* %3 to i32*
%5 = tail call i32 @le32dec(i32* %4)
%6 = tail call i32 @le32dec(i32* %2)
ret i32 poison
}
/* Type definitions */
struct lrt_trans {
  int dummy;
};

/* Variables and functions */
scalar_t__ lrt_trans_gmem();
int /*<<< orphan*/ lrt_trans_idbase();
scalar_t__ lrt_trans_offset(int /*<<< orphan*/, uintptr_t);
struct lrt_trans *lrt_trans_id2gt(uintptr_t i) {
  return (struct lrt_trans *)(((uintptr_t)lrt_trans_gmem()) +
                              lrt_trans_offset(lrt_trans_idbase(), i));
}


x86 assembly (clang, -O0):
<lrt_trans_id2gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <lrt_trans_gmem@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <lrt_trans_idbase@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <lrt_trans_offset@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrt_trans_id2gt>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <lrt_trans_gmem@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <lrt_trans_idbase@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1040 <lrt_trans_offset@plt>
add    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.lrt_trans = type { i32 }
define %struct.lrt_trans* @lrt_trans_id2gt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @lrt_trans_gmem()
%4 = call i32 (...) @lrt_trans_idbase()
%5 = load i64, i64* %2
%6 = call i64 @lrt_trans_offset(i32 %4, i64 %5)
%7 = add i64 %3, %6
%8 = inttoptr i64 %7 to %struct.lrt_trans*
ret %struct.lrt_trans* %8
}

LLVM IR (-O2):
%struct.lrt_trans = type { i32 }
define %struct.lrt_trans* @lrt_trans_id2gt(i64 %0) {
%2 = tail call i64 (...) @lrt_trans_gmem()
%3 = tail call i32 (...) @lrt_trans_idbase()
%4 = tail call i64 @lrt_trans_offset(i32 %3, i64 %0)
%5 = add i64 %4, %2
%6 = inttoptr i64 %5 to %struct.lrt_trans*
ret %struct.lrt_trans* %6
}
int flong_Hash(void *elem, int nrelem) {
  long int *l = ((long int *)elem);
  return (*l) % nrelem;
}


x86 assembly (clang, -O0):
<flong_Hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0xc(%rbp),%rcx
cqto
idiv   %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flong_Hash>:
mov    (%rdi),%rax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111b <flong_Hash+0x1b>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @flong_Hash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = srem i64 %9, %11
%13 = trunc i64 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @flong_Hash(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = sext i32 %1 to i64
%6 = srem i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_is_compatible() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_is_compatible"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [45 x i8] c"NOT IMPLEMENTED:pa_format_info_is_compatible\00"
define i32 @pa_format_info_is_compatible() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xunmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xunmap_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xunmap.send_event = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xunmap_send_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xunmap_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xunmap_send_event(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xunmap_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void copy_register_stack() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @hideTheMouse() {
ret void
}
/* Variables and functions */
void seg_fault() {
  int *p = NULL;
  (*p)++;
}


x86 assembly (clang, -O0):
<seg_fault>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @seg_fault() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
int test_imm_47int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x47 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_47int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x47,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_47int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 71
%7 = icmp ne i64 %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_47int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 4653056
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int cs_nonzero(int i, int j, double aij, void *other) {
  return (aij != 0);
  (void)i;
  (void)j;
  (void)other;
}


x86 assembly (clang, -O0):
<cs_nonzero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs_nonzero>:
xorpd  %xmm1,%xmm1
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cs_nonzero(i32 %0, i32 %1, double %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double %2, double* %7
store i8* %3, i8** %8
%9 = load double, double* %7
%10 = fcmp une double %9, 0.000000e+00
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @cs_nonzero(i32 %0, i32 %1, double %2, i8* nocapture readnone %3) {
%5 = fcmp une double %2, 0.000000e+00
%6 = zext i1 %5 to i32
ret i32 %6
}
void SetCPUClockSpeed(long newcpuspeed) {}


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

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

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

LLVM IR (-O2):
define void @SetCPUClockSpeed(i64 %0) {
ret void
}
void measure_scr_init(void) {}


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

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

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

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

/* Variables and functions */
char *nop_process_label_get(pid_t pid) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @nop_process_label_get(i32 %0) {
ret i8* null
}
char const *basefilename(p)
char const *p;
{
  register char const *b = p, *q = p;
  for (;;)
    switch (*q++) {
    case '/':
      b = q;
      break;
    case 0:
      return b;
    }
}


x86 assembly (clang, -O0):
<basefilename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
test   %eax,%eax
je     1158 <basefilename+0x58>
jmp    113a <basefilename+0x3a>
mov    -0x1c(%rbp),%eax
sub    $0x2f,%eax
jne    115e <basefilename+0x5e>
jmp    114b <basefilename+0x4b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    115e <basefilename+0x5e>
mov    -0x10(%rbp),%rax
pop    %rbp
ret
jmp    1118 <basefilename+0x18>

x86 assembly (clang, -O2):
<basefilename>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
movsbl (%rcx),%edx
add    $0x1,%rcx
cmp    $0x2f,%edx
je     1122 <basefilename+0x22>
test   %edx,%edx
jne    1110 <basefilename+0x10>
jmp    1127 <basefilename+0x27>
mov    %rcx,%rax
jmp    1110 <basefilename+0x10>
ret

LLVM IR (-O0):
define i8* @basefilename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %2
store i8* %6, i8** %4
br label %7
7: ; preds = %16, %1
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
switch i32 %11, label %16 [
i32 47, label %12
i32 0, label %14
]
12: ; preds = %7
%13 = load i8*, i8** %4
store i8* %13, i8** %3
br label %16
14: ; preds = %7
%15 = load i8*, i8** %3
ret i8* %15
16: ; preds = %7, %12
br label %7
}

LLVM IR (-O2):
define i8* @basefilename(i8* %0) {
br label %2
2: ; preds = %4, %1
%3 = phi i8* [ %0, %1 ], [ %6, %4 ]
br label %4
4: ; preds = %2, %4
%5 = phi i8* [ %6, %4 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
switch i32 %8, label %4 [
i32 47, label %2
i32 0, label %9
]
9: ; preds = %4
ret i8* %3
}
char inb(short port) {
  char ret;
  __asm__ volatile("inb %1, %0" : "=a"(ret) : "dN"(port));
  return ret;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define signext i8 @inb(i16 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @inb(i16 signext %0) {
%2 = tail call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
unsigned int strlen(char *);
char *removelast(char *input, unsigned int n) {
  if ((strlen(input) - n) < 1) {
    return NULL;
  }
  input[strlen(input) - n] = '\0';
  return input;
}


x86 assembly (clang, -O0):
<removelast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
sub    -0x14(%rbp),%eax
cmp    $0x1,%eax
jae    1141 <removelast+0x31>
movq   $0x0,-0x8(%rbp)
jmp    1169 <removelast+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
sub    -0x14(%rbp),%ecx
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removelast>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    %ebp,%eax
jne    1125 <removelast+0x15>
xor    %ebx,%ebx
jmp    1133 <removelast+0x23>
mov    %rbx,%rdi
call   1030 <strlen@plt>
sub    %ebp,%eax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @removelast(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = load i32, i32* %5
%9 = sub i32 %7, %8
%10 = icmp ult i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %21
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = load i8*, i8** %4
%15 = call i32 @strlen(i8* %14)
%16 = load i32, i32* %5
%17 = sub i32 %15, %16
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %13, i64 %18
store i8 0, i8* %19
%20 = load i8*, i8** %4
store i8* %20, i8** %3
br label %21
21: ; preds = %12, %11
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @removelast(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp eq i32 %3, %1
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
%7 = sub i32 %6, %1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %2, %5
%11 = phi i8* [ %0, %5 ], [ null, %2 ]
ret i8* %11
}
void solibfunction(void) {}


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

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

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

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