xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isalnum(char const);
int isstralnum(const char *t) {
  while (isalnum(*t) && (*t++ != '\0'))
    ;
  return *t == '\0';
}


x86 assembly (clang, -O0):
<isstralnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1155 <isstralnum+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1165 <isstralnum+0x55>
jmp    116a <isstralnum+0x5a>
jmp    111c <isstralnum+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isstralnum>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <isalnum@plt>
test   %rax,%rax
je     113b <isstralnum+0x2b>
lea    0x1(%rbx),%rcx
cmpb   $0x0,(%rbx)
mov    %rcx,%rbx
jne    1120 <isstralnum+0x10>
jmp    113e <isstralnum+0x2e>
mov    %rbx,%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isstralnum(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i8* [ %0, %1 ], [ %8, %7 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isalnum(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2, %7
%12 = phi i8* [ %8, %7 ], [ %3, %2 ]
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
char *sp_skip_alnum(char const *, char *);
char *sp_skip_whitespaces(char const *);
char *sp_strndup(char const *, int);
const char *sp_extract_next_word(const char *line, const char **word) {
  const char *end;
  line = sp_skip_whitespaces(line);
  end = sp_skip_alnum(line, "-");
  *word = sp_strndup(line, end - line);
  return end;
}


x86 assembly (clang, -O0):
<sp_extract_next_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <sp_skip_whitespaces@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea8(%rip),%rsi
call   1030 <sp_skip_alnum@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
call   1040 <sp_strndup@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp_extract_next_word>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
call   1050 <sp_skip_whitespaces@plt>
mov    %rax,%rbx
lea    0xeb9(%rip),%rsi
mov    %rax,%rdi
call   1030 <sp_skip_alnum@plt>
mov    %rax,%r15
mov    %r15d,%esi
sub    %ebx,%esi
mov    %rbx,%rdi
call   1040 <sp_strndup@plt>
mov    %rax,(%r14)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
define i8* @sp_extract_next_word(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8*
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = load i8*, i8** %3
%7 = call i8* @sp_skip_whitespaces(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @sp_skip_alnum(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %5
%10 = load i8*, i8** %3
%11 = load i8*, i8** %5
%12 = load i8*, i8** %3
%13 = ptrtoint i8* %11 to i64
%14 = ptrtoint i8* %12 to i64
%15 = sub i64 %13, %14
%16 = trunc i64 %15 to i32
%17 = call i8* @sp_strndup(i8* %10, i32 %16)
%18 = load i8**, i8*** %4
store i8* %17, i8** %18
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
define i8* @sp_extract_next_word(i8* %0, i8** nocapture writeonly %1) {
%3 = tail call i8* @sp_skip_whitespaces(i8* %0)
%4 = tail call i8* @sp_skip_alnum(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = ptrtoint i8* %4 to i64
%6 = ptrtoint i8* %3 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = tail call i8* @sp_strndup(i8* %3, i32 %8)
store i8* %9, i8** %1
ret i8* %4
}
int config_CARDREADER_DB2COM(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @config_CARDREADER_DB2COM() {
ret i32 0
}

LLVM IR (-O2):
define i32 @config_CARDREADER_DB2COM() {
ret i32 0
}
int *test3(int aa, int bb, int cc) {
  printf("test3\n");
  printf("name = }fileName\n");
  printf("%s: enter\n", __FUNCTION__);
  printf("%s: exit\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rbx
lea    0xeed(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"test3\0A\00"
@.str.1 = [18 x i8] c"name = }fileName\0A\00"
@.str.2 = [11 x i8] c"%s: enter\0A\00"
@__FUNCTION__.test3 = [6 x i8] c"test3\00"
@.str.3 = [10 x i8] c"%s: exit\0A\00"
define i32* @test3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test3, i64 0, i64 0))
%12 = load i32*, i32** %4
ret i32* %12
}

LLVM IR (-O2):
@.str.2 = [11 x i8] c"%s: enter\0A\00"
@.str.3 = [10 x i8] c"%s: exit\0A\00"
@str = [6 x i8] c"test3\00"
@str.4 = [17 x i8] c"name = }fileName\00"
define noalias i32* @test3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32* undef
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_log1p();
scalar_t__ log1p(double);
void test_log1p(double d) {
  if (log1p(d) != log1p(d))
    link_failure_log1p();
}


x86 assembly (clang, -O0):
<test_log1p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log1p@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log1p@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_log1p+0x3c>
mov    $0x0,%al
call   1030 <link_failure_log1p@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log1p>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <log1p@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1040 <log1p@plt>
cmp    %rax,%rbx
jne    1149 <test_log1p+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_log1p@plt>

LLVM IR (-O0):
define void @test_log1p(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @log1p(double %3)
%5 = load double, double* %2
%6 = call i64 @log1p(double %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_log1p()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_log1p(double %0) {
%2 = tail call i64 @log1p(double %0)
%3 = tail call i64 @log1p(double %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_log1p()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int const GLfloat;

/* Variables and functions */
GLfloat DOT3(const GLfloat a[3], const GLfloat b[3]) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}


x86 assembly (clang, -O0):
<DOT3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
mov    -0x10(%rbp),%rdx
imul   0x4(%rdx),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
mov    -0x10(%rbp),%rdx
imul   0x8(%rdx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DOT3>:
mov    (%rsi),%eax
imul   (%rdi),%eax
mov    0x4(%rsi),%ecx
imul   0x4(%rdi),%ecx
add    %eax,%ecx
mov    0x8(%rsi),%eax
imul   0x8(%rdi),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @DOT3(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %7, %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = mul nsw i32 %14, %17
%19 = add nsw i32 %11, %18
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 2
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = getelementptr inbounds i32, i32* %23, i64 2
%25 = load i32, i32* %24
%26 = mul nsw i32 %22, %25
%27 = add nsw i32 %19, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @DOT3(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %3
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, %7
%11 = add nsw i32 %10, %5
%12 = getelementptr inbounds i32, i32* %0, i64 2
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %1, i64 2
%15 = load i32, i32* %14
%16 = mul nsw i32 %15, %13
%17 = add nsw i32 %11, %16
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ testCreation();
int /*<<< orphan*/ testPut();
int /*<<< orphan*/ testPutAndHas();
int main(void) {
  testCreation();
  printf("--\n");
  testPut();
  printf("--\n");
  testPutAndHas();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <testCreation@plt>
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <testPut@plt>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <testPutAndHas@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <testCreation@plt>
lea    0xeb1(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <testPut@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <testPutAndHas@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"--\0A\00"
define i32 @main() {
%1 = call i32 (...) @testCreation()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @testPut()
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @testPutAndHas()
ret i32 0
}

LLVM IR (-O2):
@str.1 = [3 x i8] c"--\00"
define i32 @main() {
%1 = tail call i32 (...) @testCreation()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.1, i64 0, i64 0))
%3 = tail call i32 (...) @testPut()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.1, i64 0, i64 0))
%5 = tail call i32 (...) @testPutAndHas()
ret i32 0
}
unsigned f2u(float f) {
  union {
    float f;
    unsigned u;
  } a;
  a.f = f;
  return a.u;
}


x86 assembly (clang, -O0):
<f2u>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2u>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @f2u(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f2u(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
int fun1001() { return 1001; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x3e9,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x3e9,%eax
ret

LLVM IR (-O0):
define i32 @fun1001() {
ret i32 1001
}

LLVM IR (-O2):
define i32 @fun1001() {
ret i32 1001
}
/* Variables and functions */
double my_sqrt(double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("sqrt +2 = %g\n", my_sqrt(2.0));
  printf("sqrt -2 = %g\n", my_sqrt(-2.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
call   1040 <my_sqrt@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  0xeb0(%rip),%xmm0
call   1040 <my_sqrt@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <my_sqrt@plt>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
movsd  0xec6(%rip),%xmm0
call   1040 <my_sqrt@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"sqrt +2 = %g\0A\00"
@.str.1 = [14 x i8] c"sqrt -2 = %g\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @my_sqrt(double 2.000000e+00)
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call double @my_sqrt(double -2.000000e+00)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"sqrt +2 = %g\0A\00"
@.str.1 = [14 x i8] c"sqrt -2 = %g\0A\00"
define i32 @main() {
%1 = tail call double @my_sqrt(double 2.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @my_sqrt(double -2.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MrSetSeekTimePositionEnabled(int);
void RSL_CanSetPosition(void *rslObj, int canSetPosition) {
  MrSetSeekTimePositionEnabled(canSetPosition);
}


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

x86 assembly (clang, -O2):
<RSL_CanSetPosition>:
mov    %esi,%edi
jmp    1030 <MrSetSeekTimePositionEnabled@plt>

LLVM IR (-O0):
define void @RSL_CanSetPosition(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 = call i32 @MrSetSeekTimePositionEnabled(i32 %5)
ret void
}

LLVM IR (-O2):
define void @RSL_CanSetPosition(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @MrSetSeekTimePositionEnabled(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ushort;

/* Variables and functions */
unsigned char ANT_Initf(char *, unsigned char);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
unsigned char ANT_Init(unsigned char devno, ushort baud) {
  char dev[40];
  sprintf(dev, "/dev/ttyUSB%d", devno);
  return ANT_Initf(dev, devno);
}


x86 assembly (clang, -O0):
<ANT_Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec4(%rip),%rsi
movzbl -0x1(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <ANT_Initf@plt>
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANT_Init>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
lea    0xed0(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <ANT_Initf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/dev/ttyUSB%d\00"
define zeroext i8 @ANT_Init(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca [40 x i8]
store i8 %0, i8* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %3
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%10 = load i8, i8* %3
%11 = call zeroext i8 @ANT_Initf(i8* %9, i8 zeroext %10)
ret i8 %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"/dev/ttyUSB%d\00"
define zeroext i8 @ANT_Init(i8 zeroext %0, i32 %1) {
%3 = alloca [40 x i8]
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
%6 = call zeroext i8 @ANT_Initf(i8* %4, i8 zeroext %0)
ret i8 %6
}
double x2fix(double *d) { return *d; }


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

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

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

LLVM IR (-O2):
define double @x2fix(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ merge_sort(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ show(int *, int);
int main() {
  int A[] = {3, 1, 4, 1, 5, 9, 2, 6};
  merge_sort(A, 0, 7);
  show(A, 8);
  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,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1040 <merge_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1030 <show@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1040 <merge_sort@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <show@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.A = [8 x i32] [i32 3, i32 1, i32 4, i32 1, i32 5, i32 9, i32 2, i32 6]
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i32]
store i32 0, i32* %1
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 @merge_sort(i32* %4, i32 0, i32 7)
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%7 = call i32 @show(i32* %6, i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [8 x i32] [i32 3, i32 1, i32 4, i32 1, i32 5, i32 9, i32 2, i32 6]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @merge_sort(i32* %3, i32 0, i32 7)
%5 = call i32 @show(i32* %3, i32 8)
ret i32 0
}
unsigned int sdmmc_read32(unsigned short reg) {
  return *(volatile unsigned int *)(0x10006000u + reg);
}


x86 assembly (clang, -O0):
<sdmmc_read32>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10006000,%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_read32>:
mov    %edi,%eax
mov    0x10006000(%rax),%eax
ret

LLVM IR (-O0):
define i32 @sdmmc_read32(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = add i32 268460032, %4
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @sdmmc_read32(i16 zeroext %0) {
%2 = zext i16 %0 to i64
%3 = add nuw nsw i64 %2, 268460032
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ Config;

/* Variables and functions */
int /*<<< orphan*/ free(void *);
int UnloadConfig(void **Config) {
  unsigned int i = sizeof(Config);
  while (--i != 0) {
    free((Config)[i]);
  }
  free(*Config);
  return 0;
}


x86 assembly (clang, -O0):
<UnloadConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     114a <UnloadConfig+0x3a>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1123 <UnloadConfig+0x13>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnloadConfig>:
push   %rbx
mov    %rdi,%rbx
mov    0x38(%rdi),%rdi
call   1030 <free@plt>
mov    0x30(%rbx),%rdi
call   1030 <free@plt>
mov    0x28(%rbx),%rdi
call   1030 <free@plt>
mov    0x20(%rbx),%rdi
call   1030 <free@plt>
mov    0x18(%rbx),%rdi
call   1030 <free@plt>
mov    0x10(%rbx),%rdi
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @UnloadConfig(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 7
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
%5 = getelementptr inbounds i8*, i8** %0, i64 6
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
%8 = getelementptr inbounds i8*, i8** %0, i64 5
%9 = load i8*, i8** %8
%10 = tail call i32 @free(i8* %9)
%11 = getelementptr inbounds i8*, i8** %0, i64 4
%12 = load i8*, i8** %11
%13 = tail call i32 @free(i8* %12)
%14 = getelementptr inbounds i8*, i8** %0, i64 3
%15 = load i8*, i8** %14
%16 = tail call i32 @free(i8* %15)
%17 = getelementptr inbounds i8*, i8** %0, i64 2
%18 = load i8*, i8** %17
%19 = tail call i32 @free(i8* %18)
%20 = getelementptr inbounds i8*, i8** %0, i64 1
%21 = load i8*, i8** %20
%22 = tail call i32 @free(i8* %21)
%23 = load i8*, i8** %0
%24 = tail call i32 @free(i8* %23)
ret i32 0
}
void signed_char_shr_signed_char(signed char *LHS, signed char RHS) {
  (*LHS) >>= RHS;
}


x86 assembly (clang, -O0):
<signed_char_shr_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
sar    %cl,%edx
mov    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_shr_signed_char>:
mov    %esi,%ecx
movsbl (%rdi),%eax
sar    %cl,%eax
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_shr_signed_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = ashr i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @signed_char_shr_signed_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = zext i8 %1 to i32
%6 = ashr i32 %4, %5
%7 = trunc i32 %6 to i8
store i8 %7, i8* %0
ret void
}
signed long int signedlongint_ignoring_unsignedint(signed long int x,
                                                   unsigned int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlongint_ignoring_unsignedint>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @signedlongint_ignoring_unsignedint(i64 returned %0, i32 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void add(int f_num1, int f_num2) {
  printf("%d + %d  = %d\n", f_num1, f_num2, (f_num1 + f_num2));
}


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

x86 assembly (clang, -O2):
<add>:
mov    %esi,%edx
mov    %edi,%esi
lea    (%rdx,%rsi,1),%ecx
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%d + %d = %d\0A\00"
define void @add(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 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d + %d = %d\0A\00"
define void @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret void
}
/* Variables and functions */
char toupper(int /*<<< orphan*/);
int name_value(char *s) {
  int value = 0;
  while (*s)
    value += (toupper(*s++) - 'A') + 1;
  return value;
}


x86 assembly (clang, -O0):
<name_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <name_value+0x4b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <name_value+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_value>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114f <name_value+0x3f>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
add    %eax,%r14d
add    $0xffffffc0,%r14d
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <name_value+0x20>
jmp    1152 <name_value+0x42>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @name_value(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %14, %4 ], [ %2, %1 ]
%6 = phi i32 [ %13, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = tail call signext i8 @toupper(i32 %9)
%11 = sext i8 %10 to i32
%12 = add i32 %6, -64
%13 = add i32 %12, %11
%14 = load i8, i8* %8
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %13, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ kol_paint_string(int, int, char *, int);
int /*<<< orphan*/ kol_sleep(int);
int /*<<< orphan*/ kolibri_window_define(int, int, int, int, int, int, char *);
int main() {
  kolibri_window_define(100, 100, 500, 500, 0x13FFFFFF, 1, "KFTP");
  kol_paint_string(105, 105, "FTP ADDRESS : ", 0x80FF0000);
  kol_sleep(10000);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%esi
mov    $0x1f4,%ecx
mov    $0x13ffffff,%r8d
mov    $0x1,%r9d
lea    0xeab(%rip),%rax
mov    %esi,%edi
mov    %ecx,%edx
mov    %rax,(%rsp)
call   1040 <kolibri_window_define@plt>
mov    $0x69,%esi
lea    0xe97(%rip),%rdx
mov    $0x80ff0000,%ecx
mov    %esi,%edi
call   1050 <kol_paint_string@plt>
mov    $0x2710,%edi
call   1030 <kol_sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rax
mov    %rax,(%rsp)
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x1f4,%edx
mov    $0x1f4,%ecx
mov    $0x13ffffff,%r8d
mov    $0x1,%r9d
call   1040 <kolibri_window_define@plt>
lea    0xe9d(%rip),%rdx
mov    $0x69,%edi
mov    $0x69,%esi
mov    $0x80ff0000,%ecx
call   1050 <kol_paint_string@plt>
mov    $0x2710,%edi
call   1030 <kol_sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"KFTP\00"
@.str.1 = [15 x i8] c"FTP ADDRESS : \00"
define i32 @main() {
%1 = call i32 @kolibri_window_define(i32 100, i32 100, i32 500, i32 500, i32 335544319, i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @kol_paint_string(i32 105, i32 105, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 -2130771968)
%3 = call i32 @kol_sleep(i32 10000)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"KFTP\00"
@.str.1 = [15 x i8] c"FTP ADDRESS : \00"
define i32 @main() {
%1 = tail call i32 @kolibri_window_define(i32 100, i32 100, i32 500, i32 500, i32 335544319, i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @kol_paint_string(i32 105, i32 105, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 -2130771968)
%3 = tail call i32 @kol_sleep(i32 10000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
size_t uint64_size(int /*<<< orphan*/);
int /*<<< orphan*/ zigzag64(int /*<<< orphan*/);
size_t sint64_size(int64_t v) { return uint64_size(zigzag64(v)); }


x86 assembly (clang, -O0):
<sint64_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <zigzag64@plt>
mov    %eax,%edi
call   1040 <uint64_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sint64_size>:
push   %rax
call   1030 <zigzag64@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <uint64_size@plt>

LLVM IR (-O0):
define i64 @sint64_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @zigzag64(i32 %3)
%5 = call i64 @uint64_size(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @sint64_size(i32 %0) {
%2 = tail call i32 @zigzag64(i32 %0)
%3 = tail call i64 @uint64_size(i32 %2)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_ONEREQ;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_ONEREQ_it;
OCSP_ONEREQ *d2i_OCSP_ONEREQ(OCSP_ONEREQ **a, const unsigned char **in,
                             long len) {
  return (OCSP_ONEREQ *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                      &OCSP_ONEREQ_it);
}


x86 assembly (clang, -O0):
<d2i_OCSP_ONEREQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2ea9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_OCSP_ONEREQ>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@OCSP_ONEREQ_it = global i32 0
define i32* @d2i_OCSP_ONEREQ(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @OCSP_ONEREQ_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@OCSP_ONEREQ_it = global i32 0
define i32* @d2i_OCSP_ONEREQ(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @OCSP_ONEREQ_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
int main() {
  double d = 1.0 / 0.0;
  _Bool b = d == d && (d - d) != (d - d);
  if (!b)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x12(%rbp)
jne    116a <main+0x5a>
jp     116a <main+0x5a>
movsd  -0x10(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
mov    %al,-0x11(%rbp)
testb  $0x1,-0x11(%rbp)
jne    1181 <main+0x71>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i8
store i32 0, i32* %1
store double 0x7FF0000000000000, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fcmp oeq double %4, %5
br i1 %6, label %7, label %15
7: ; preds = %0
%8 = load double, double* %2
%9 = load double, double* %2
%10 = fsub double %8, %9
%11 = load double, double* %2
%12 = load double, double* %2
%13 = fsub double %11, %12
%14 = fcmp une double %10, %13
br label %15
15: ; preds = %7, %0
%16 = phi i1 [ false, %0 ], [ %14, %7 ]
%17 = zext i1 %16 to i8
store i8 %17, i8* %3
%18 = load i8, i8* %3
%19 = trunc i8 %18 to i1
br i1 %19, label %21, label %20
20: ; preds = %15
unreachable
21: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init_irq();
int /*<<< orphan*/ key_init();
int /*<<< orphan*/ led_init();
int /*<<< orphan*/ led_off();
int gboot_main() {
  led_init();
  key_init();
  init_irq();
  led_off();
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<gboot_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <led_init@plt>
mov    $0x0,%al
call   1030 <key_init@plt>
mov    $0x0,%al
call   1050 <init_irq@plt>
mov    $0x0,%al
call   1040 <led_off@plt>
jmp    1160 <gboot_main+0x20>

x86 assembly (clang, -O2):
<gboot_main>:
push   %rax
xor    %eax,%eax
call   1060 <led_init@plt>
xor    %eax,%eax
call   1030 <key_init@plt>
xor    %eax,%eax
call   1050 <init_irq@plt>
xor    %eax,%eax
call   1040 <led_off@plt>
nopl   (%rax)
jmp    1160 <gboot_main+0x20>

LLVM IR (-O0):
define i32 @gboot_main() {
%1 = call i32 (...) @led_init()
%2 = call i32 (...) @key_init()
%3 = call i32 (...) @init_irq()
%4 = call i32 (...) @led_off()
br label %5
5: ; preds = %0, %5
br label %5
}

LLVM IR (-O2):
define i32 @gboot_main() {
%1 = tail call i32 (...) @led_init()
%2 = tail call i32 (...) @key_init()
%3 = tail call i32 (...) @init_irq()
%4 = tail call i32 (...) @led_off()
br label %5
5: ; preds = %0, %5
br label %5
}
short add_short(short x, short y) { return x + y; }


x86 assembly (clang, -O0):
<add_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
add    %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_short>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define signext i16 @add_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = add nsw i32 %6, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @add_short(i16 signext %0, i16 signext %1) {
%3 = add i16 %1, %0
ret i16 %3
}
/* Type definitions */
struct page {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ClearPageChecked(struct page *);
void clear_cold_data(struct page *page) { ClearPageChecked(page); }


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

x86 assembly (clang, -O2):
<clear_cold_data>:
jmp    1030 <ClearPageChecked@plt>

LLVM IR (-O0):
%struct.page = type { i32 }
define void @clear_cold_data(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
%3 = load %struct.page*, %struct.page** %2
%4 = call i32 @ClearPageChecked(%struct.page* %3)
ret void
}

LLVM IR (-O2):
%struct.page = type { i32 }
define void @clear_cold_data(%struct.page* %0) {
%2 = tail call i32 @ClearPageChecked(%struct.page* %0)
ret void
}
int SDL_imageFilterMultMMX(unsigned char *Src1, unsigned char *Src2,
                           unsigned char *Dest, unsigned int SrcLength) {
  return (-1);
}


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

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

LLVM IR (-O0):
define i32 @SDL_imageFilterMultMMX(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @SDL_imageFilterMultMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 -1
}
__attribute__((vector_size((4) * sizeof(int)))) int
foo(__attribute__((vector_size((4) * sizeof(int)))) int x) {
  return (x == x) + (x != x) + (x > x) + (x < x) + (x >= x) + (x <= x);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movaps %xmm0,-0x10(%rbp)
pcmpeqd %xmm1,%xmm1
movaps 0xeed(%rip),%xmm0
paddd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movaps 0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define <4 x i32> @foo(<4 x i32> %0) {
%2 = alloca <4 x i32>
store <4 x i32> %0, <4 x i32>* %2
%3 = load <4 x i32>, <4 x i32>* %2
%4 = load <4 x i32>, <4 x i32>* %2
%5 = icmp eq <4 x i32> %3, %4
%6 = sext <4 x i1> %5 to <4 x i32>
%7 = load <4 x i32>, <4 x i32>* %2
%8 = load <4 x i32>, <4 x i32>* %2
%9 = icmp ne <4 x i32> %7, %8
%10 = sext <4 x i1> %9 to <4 x i32>
%11 = add <4 x i32> %6, %10
%12 = load <4 x i32>, <4 x i32>* %2
%13 = load <4 x i32>, <4 x i32>* %2
%14 = icmp sgt <4 x i32> %12, %13
%15 = sext <4 x i1> %14 to <4 x i32>
%16 = add <4 x i32> %11, %15
%17 = load <4 x i32>, <4 x i32>* %2
%18 = load <4 x i32>, <4 x i32>* %2
%19 = icmp slt <4 x i32> %17, %18
%20 = sext <4 x i1> %19 to <4 x i32>
%21 = add <4 x i32> %16, %20
%22 = load <4 x i32>, <4 x i32>* %2
%23 = load <4 x i32>, <4 x i32>* %2
%24 = icmp sge <4 x i32> %22, %23
%25 = sext <4 x i1> %24 to <4 x i32>
%26 = add <4 x i32> %21, %25
%27 = load <4 x i32>, <4 x i32>* %2
%28 = load <4 x i32>, <4 x i32>* %2
%29 = icmp sle <4 x i32> %27, %28
%30 = sext <4 x i1> %29 to <4 x i32>
%31 = add <4 x i32> %26, %30
ret <4 x i32> %31
}

LLVM IR (-O2):
define <4 x i32> @foo(<4 x i32> %0) {
ret <4 x i32> <i32 -3, i32 -3, i32 -3, i32 -3>
}
int smb1357_set_fast_charge(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @smb1357_set_fast_charge() {
ret i32 0
}

LLVM IR (-O2):
define i32 @smb1357_set_fast_charge() {
ret i32 0
}
void windup(void) {}


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

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

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

LLVM IR (-O2):
define void @windup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *progname) {
  printf("Usage: %s fontfile [fontfile ...]\n", progname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%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 = [35 x i8] c"Usage: %s fontfile [fontfile ...]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Usage: %s fontfile [fontfile ...]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
__attribute__((cold)) int ulaw2linear(unsigned char u_val) {
  int t;
  u_val = ~u_val;
  t = ((u_val & (0xf)) << 3) + (0x84);
  t <<= ((unsigned)u_val & (0x70)) >> (4);
  return (u_val & (0x80)) ? ((0x84) - t) : (t - (0x84));
}


x86 assembly (clang, -O0):
<ulaw2linear>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
shl    $0x3,%eax
add    $0x84,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%ecx
and    $0x70,%ecx
shr    $0x4,%ecx
mov    -0x8(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     115a <ulaw2linear+0x5a>
mov    $0x84,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <ulaw2linear+0x65>
mov    -0x8(%rbp),%eax
sub    $0x84,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulaw2linear>:
not    %dil
movzbl %dil,%edx
lea    0x0(,%rdx,8),%eax
mov    $0x84,%esi
or     %esi,%eax
movzbl %al,%eax
mov    %edx,%ecx
shr    $0x4,%cl
and    $0x7,%cl
shl    %cl,%eax
sub    %eax,%esi
add    $0xffffff7c,%eax
test   $0x80,%dl
cmovne %esi,%eax
ret

LLVM IR (-O0):
define i32 @ulaw2linear(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = xor i32 %5, -1
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = and i32 %9, 15
%11 = shl i32 %10, 3
%12 = add nsw i32 %11, 132
store i32 %12, i32* %3
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = and i32 %14, 112
%16 = lshr i32 %15, 4
%17 = load i32, i32* %3
%18 = shl i32 %17, %16
store i32 %18, i32* %3
%19 = load i8, i8* %2
%20 = zext i8 %19 to i32
%21 = and i32 %20, 128
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %1
%24 = load i32, i32* %3
%25 = sub nsw i32 132, %24
br label %29
26: ; preds = %1
%27 = load i32, i32* %3
%28 = sub nsw i32 %27, 132
br label %29
29: ; preds = %26, %23
%30 = phi i32 [ %25, %23 ], [ %28, %26 ]
ret i32 %30
}

LLVM IR (-O2):
define i32 @ulaw2linear(i8 zeroext %0) {
%2 = xor i8 %0, -1
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 3
%5 = and i32 %4, 120
%6 = or i32 %5, 132
%7 = lshr i32 %3, 4
%8 = and i32 %7, 7
%9 = shl i32 %6, %8
%10 = and i32 %3, 128
%11 = icmp eq i32 %10, 0
%12 = sub nsw i32 132, %9
%13 = add nsw i32 %9, -132
%14 = select i1 %11, i32 %13, i32 %12
ret i32 %14
}
/* Variables and functions */
scalar_t__ malloc(int);
char *CuStrAlloc(int size) {
  char *new = (char *)malloc(sizeof(char) * (size));
  return new;
}


x86 assembly (clang, -O0):
<CuStrAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CuStrAlloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @CuStrAlloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 1, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @CuStrAlloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}