xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ test_wmemchr();
int /*<<< orphan*/ test_wmemcmp();
int /*<<< orphan*/ test_wmemcpy();
int /*<<< orphan*/ test_wmemmove();
int /*<<< orphan*/ test_wmemset();
void run_wchar_lib_tests() {
  printf("\nRunning Test Case: %s\n", "Test POSIX wchar.h functions");
  ;
  test_wmemchr();
  test_wmemcmp();
  test_wmemcpy();
  test_wmemmove();
  test_wmemset();
}


x86 assembly (clang, -O0):
<run_wchar_lib_tests>:
push   %rbp
mov    %rsp,%rbp
lea    0xe95(%rip),%rdi
lea    0xea6(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_wmemchr@plt>
mov    $0x0,%al
call   1030 <test_wmemcmp@plt>
mov    $0x0,%al
call   1060 <test_wmemcpy@plt>
mov    $0x0,%al
call   1070 <test_wmemmove@plt>
mov    $0x0,%al
call   1080 <test_wmemset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_wchar_lib_tests>:
push   %rax
lea    0xe98(%rip),%rdi
lea    0xea9(%rip),%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <test_wmemchr@plt>
xor    %eax,%eax
call   1030 <test_wmemcmp@plt>
xor    %eax,%eax
call   1060 <test_wmemcpy@plt>
xor    %eax,%eax
call   1070 <test_wmemmove@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <test_wmemset@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0ARunning Test Case: %s\0A\00"
@.str.1 = [29 x i8] c"Test POSIX wchar.h functions\00"
define void @run_wchar_lib_tests() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (...) @test_wmemchr()
%3 = call i32 (...) @test_wmemcmp()
%4 = call i32 (...) @test_wmemcpy()
%5 = call i32 (...) @test_wmemmove()
%6 = call i32 (...) @test_wmemset()
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0ARunning Test Case: %s\0A\00"
@.str.1 = [29 x i8] c"Test POSIX wchar.h functions\00"
define void @run_wchar_lib_tests() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @test_wmemchr()
%3 = tail call i32 (...) @test_wmemcmp()
%4 = tail call i32 (...) @test_wmemcpy()
%5 = tail call i32 (...) @test_wmemmove()
%6 = tail call i32 (...) @test_wmemset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *argv0) {
  fprintf(stderr,
          "Syntax: %s [options] <arrayname> <binaryfile> <outname>\n"
          "  -min <n>     check if <binaryfile> is not smaller than <n>KB\n"
          "  -max <n>     check if <binaryfile> is not bigger than <n>KB\n"
          "  -mask <n>    check if size of binaryfile is <n>-aligned\n"
          "  -width <n>   number of bytes per line (default: 16)\n"
          "  -break <n>   break every <n> lines    (default: -1)\n"
          "  -ascii       show ASCII representation of binary as comment\n",
          argv0);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [410 x i8] c"Syntax: %s [options] <arrayname> <binaryfile> <outname>\0A -min <n> check if <binaryfile> is not smaller than <n>KB\0A -max <n> check if <binaryfile> is not bigger than <n>KB\0A -mask <n> check if size of binaryfile is <n>-aligned\0A -width <n> number of bytes per line (default: 16)\0A -break <n> break every <n> lines (default: -1)\0A -ascii show ASCII representation of binary as comment\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([410 x i8], [410 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [410 x i8] c"Syntax: %s [options] <arrayname> <binaryfile> <outname>\0A -min <n> check if <binaryfile> is not smaller than <n>KB\0A -max <n> check if <binaryfile> is not bigger than <n>KB\0A -mask <n> check if size of binaryfile is <n>-aligned\0A -width <n> number of bytes per line (default: 16)\0A -break <n> break every <n> lines (default: -1)\0A -ascii show ASCII representation of binary as comment\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([410 x i8], [410 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printFunction(void *data) { printf("%s\n", (char *)data); }


x86 assembly (clang, -O0):
<printFunction>:
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):
<printFunction>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @printFunction(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LexCleanup();
int /*<<< orphan*/ ParseCleanup();
int /*<<< orphan*/ PlatformCleanup();
int /*<<< orphan*/ TableStrFree();
int /*<<< orphan*/ TypeCleanup();
int /*<<< orphan*/ VariableCleanup();
void Cleanup() {
  PlatformCleanup();
  ParseCleanup();
  LexCleanup();
  VariableCleanup();
  TypeCleanup();
  TableStrFree();
}


x86 assembly (clang, -O0):
<Cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <PlatformCleanup@plt>
mov    $0x0,%al
call   1060 <ParseCleanup@plt>
mov    $0x0,%al
call   1030 <LexCleanup@plt>
mov    $0x0,%al
call   1050 <VariableCleanup@plt>
mov    $0x0,%al
call   1080 <TypeCleanup@plt>
mov    $0x0,%al
call   1070 <TableStrFree@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cleanup>:
push   %rax
xor    %eax,%eax
call   1040 <PlatformCleanup@plt>
xor    %eax,%eax
call   1060 <ParseCleanup@plt>
xor    %eax,%eax
call   1030 <LexCleanup@plt>
xor    %eax,%eax
call   1050 <VariableCleanup@plt>
xor    %eax,%eax
call   1080 <TypeCleanup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <TableStrFree@plt>

LLVM IR (-O0):
define void @Cleanup() {
%1 = call i32 (...) @PlatformCleanup()
%2 = call i32 (...) @ParseCleanup()
%3 = call i32 (...) @LexCleanup()
%4 = call i32 (...) @VariableCleanup()
%5 = call i32 (...) @TypeCleanup()
%6 = call i32 (...) @TableStrFree()
ret void
}

LLVM IR (-O2):
define void @Cleanup() {
%1 = tail call i32 (...) @PlatformCleanup()
%2 = tail call i32 (...) @ParseCleanup()
%3 = tail call i32 (...) @LexCleanup()
%4 = tail call i32 (...) @VariableCleanup()
%5 = tail call i32 (...) @TypeCleanup()
%6 = tail call i32 (...) @TableStrFree()
ret void
}
int do_991() { return 991; }


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

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

LLVM IR (-O0):
define i32 @do_991() {
ret i32 991
}

LLVM IR (-O2):
define i32 @do_991() {
ret i32 991
}
float Clamp(float f) {
  if (f < 0.0f)
    return 0.0f;
  if (f > 1.0f)
    return 1.0f;
  return f;
}


x86 assembly (clang, -O0):
<Clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1123 <Clamp+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1155 <Clamp+0x55>
movss  -0x8(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114b <Clamp+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1155 <Clamp+0x55>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clamp>:
movss  0xef8(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
andnps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Clamp(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %13
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp ogt float %8, 1.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store float 1.000000e+00, float* %2
br label %13
11: ; preds = %7
%12 = load float, float* %3
store float %12, float* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @Clamp(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 1.000000e+00
%4 = select i1 %3, float 1.000000e+00, float %0
%5 = select i1 %2, float 0.000000e+00, float %4
ret float %5
}
/* Variables and functions */
long long count();
int /*<<< orphan*/ printf(char *, long long);
int /*<<< orphan*/ read_file(char *);
int main(int argc, char **argv) {
  read_file(argv[1]);
  long long int c = count();
  printf("%lld\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <read_file@plt>
mov    $0x0,%al
call   1030 <count@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <read_file@plt>
xor    %eax,%eax
call   1030 <count@plt>
lea    0xeb8(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @read_file(i8* %9)
%11 = call i64 (...) @count()
store i64 %11, i64* %6
%12 = load i64, i64* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @read_file(i8* %4)
%6 = tail call i64 (...) @count()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %6)
ret i32 0
}
void ff_hevc_put_hevc_uni_qpel_h8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_h8_12_sse4() {
ret void
}
int do_114() { return 114; }


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

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

LLVM IR (-O0):
define i32 @do_114() {
ret i32 114
}

LLVM IR (-O2):
define i32 @do_114() {
ret i32 114
}
/* Variables and functions */
char *l_do_topipe(char *, char *, int);
char *maclinetopipe(char *arg) { return l_do_topipe(arg, "linetopipe", 1); }


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

x86 assembly (clang, -O2):
<maclinetopipe>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <l_do_topipe@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"linetopipe\00"
define i8* @maclinetopipe(i8* %0) {
%2 = tail call i8* @l_do_topipe(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int /*<<< orphan*/ test5();
int /*<<< orphan*/ test6();
void testTortureExecute(void) {
  test1();
  test2();
  test3();
  test4();
  test5();
  test6();
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test1@plt>
mov    $0x0,%al
call   1080 <test2@plt>
mov    $0x0,%al
call   1040 <test3@plt>
mov    $0x0,%al
call   1070 <test4@plt>
mov    $0x0,%al
call   1030 <test5@plt>
mov    $0x0,%al
call   1060 <test6@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
push   %rax
xor    %eax,%eax
call   1050 <test1@plt>
xor    %eax,%eax
call   1080 <test2@plt>
xor    %eax,%eax
call   1040 <test3@plt>
xor    %eax,%eax
call   1070 <test4@plt>
xor    %eax,%eax
call   1030 <test5@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <test6@plt>

LLVM IR (-O0):
define void @testTortureExecute() {
%1 = call i32 (...) @test1()
%2 = call i32 (...) @test2()
%3 = call i32 (...) @test3()
%4 = call i32 (...) @test4()
%5 = call i32 (...) @test5()
%6 = call i32 (...) @test6()
ret void
}

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
%3 = tail call i32 (...) @test3()
%4 = tail call i32 (...) @test4()
%5 = tail call i32 (...) @test5()
%6 = tail call i32 (...) @test6()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int y_root;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
void set_XButtonEvent_y_root(void *_p, int _v) {
  ((XButtonEvent *)_p)->y_root = (int)_v;
}


x86 assembly (clang, -O0):
<set_XButtonEvent_y_root>:
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_XButtonEvent_y_root>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XButtonEvent_y_root(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_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XButtonEvent_y_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
char f_sub(double *a, const double *b) {
  *a = *a - (*b);
  return (0);
}


x86 assembly (clang, -O0):
<f_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_sub>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @f_sub(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fsub double %6, %8
%10 = load double*, double** %3
store double %9, double* %10
ret i8 0
}

LLVM IR (-O2):
define signext i8 @f_sub(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
store double %5, double* %0
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_AVTransport_Previous(void *);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPAVTransport_Previous(void *upnptoken, unsigned int InstanceID) {
  printf("Invoke: UPnPAVTransport_Previous(%u);\r\n", InstanceID);
  UPnPResponse_AVTransport_Previous(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPAVTransport_Previous>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <UPnPResponse_AVTransport_Previous@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPAVTransport_Previous>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UPnPResponse_AVTransport_Previous@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Invoke: UPnPAVTransport_Previous(%u);\0D\0A\00"
define void @UPnPAVTransport_Previous(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 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_AVTransport_Previous(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Invoke: UPnPAVTransport_Previous(%u);\0D\0A\00"
define void @UPnPAVTransport_Previous(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_AVTransport_Previous(i8* %0)
ret void
}
/* Type definitions */
struct ast_sockaddr {
  int dummy;
};

/* Variables and functions */
char *ast_sockaddr_stringify_fmt(struct ast_sockaddr const *, int);
char *ast_sockaddr_stringify_addr(const struct ast_sockaddr *addr) {
  return ast_sockaddr_stringify_fmt(addr, (1 << 0));
}


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

x86 assembly (clang, -O2):
<ast_sockaddr_stringify_addr>:
mov    $0x1,%esi
jmp    1030 <ast_sockaddr_stringify_fmt@plt>

LLVM IR (-O0):
%struct.ast_sockaddr = type { i32 }
define i8* @ast_sockaddr_stringify_addr(%struct.ast_sockaddr* %0) {
%2 = alloca %struct.ast_sockaddr*
store %struct.ast_sockaddr* %0, %struct.ast_sockaddr** %2
%3 = load %struct.ast_sockaddr*, %struct.ast_sockaddr** %2
%4 = call i8* @ast_sockaddr_stringify_fmt(%struct.ast_sockaddr* %3, i32 1)
ret i8* %4
}

LLVM IR (-O2):
%struct.ast_sockaddr = type { i32 }
define i8* @ast_sockaddr_stringify_addr(%struct.ast_sockaddr* %0) {
%2 = tail call i8* @ast_sockaddr_stringify_fmt(%struct.ast_sockaddr* %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int startBib();
int main() {
  int exitCode = startBib();
  if (exitCode != 0)
    startBib();
  printf("End of program.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <startBib@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115a <main+0x2a>
mov    $0x0,%al
call   1040 <startBib@plt>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <startBib@plt>
test   %eax,%eax
je     1143 <main+0x13>
xor    %eax,%eax
call   1040 <startBib@plt>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"End of program.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @startBib()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @startBib()
br label %8
8: ; preds = %6, %0
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [16 x i8] c"End of program.\00"
define i32 @main() {
%1 = tail call i32 (...) @startBib()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @startBib()
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hello_message(char *);
scalar_t__ init_library();
int /*<<< orphan*/ printf(char *);
int main() {
  if (init_library())
    hello_message("Nick");
  else
    printf("Library was not loaded\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init_library@plt>
cmp    $0x0,%rax
je     1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1040 <hello_message@plt>
jmp    116d <main+0x3d>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_library@plt>
test   %rax,%rax
je     114b <main+0x1b>
lea    0xebc(%rip),%rdi
call   1040 <hello_message@plt>
jmp    1157 <main+0x27>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Nick\00"
@.str.1 = [24 x i8] c"Library was not loaded\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @init_library()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @hello_message(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"Nick\00"
@str = [23 x i8] c"Library was not loaded\00"
define i32 @main() {
%1 = tail call i64 (...) @init_library()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @hello_message(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 0
}
float xrintf(float x) { return x < 0 ? (int)(x - 0.5f) : (int)(x + 0.5f); }


x86 assembly (clang, -O0):
<xrintf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1133 <xrintf+0x33>
movss  -0x4(%rbp),%xmm0
movss  0xedd(%rip),%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <xrintf+0x47>
movss  0xec5(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrintf>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
lea    0xeee(%rip),%rcx
addss  (%rcx,%rax,4),%xmm0
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @xrintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load float, float* %2
%7 = fsub float %6, 5.000000e-01
%8 = fptosi float %7 to i32
br label %13
9: ; preds = %1
%10 = load float, float* %2
%11 = fadd float %10, 5.000000e-01
%12 = fptosi float %11 to i32
br label %13
13: ; preds = %9, %5
%14 = phi i32 [ %8, %5 ], [ %12, %9 ]
%15 = sitofp i32 %14 to float
ret float %15
}

LLVM IR (-O2):
define float @xrintf(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = select i1 %2, float -5.000000e-01, float 5.000000e-01
%4 = fadd float %3, %0
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  int i;
  int xsize = 1;
  float y[xsize];
  for (i = 0; i < xsize; ++i) {
    y[i] = 0;
  }
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117e <main+0x6e>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x44>
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 0, i32* %1
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %4
%9 = alloca float, i64 %7
store i64 %7, i64* %5
store i32 0, i32* %2
br label %10
10: ; preds = %18, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %9, i64 %16
store float 0.000000e+00, float* %17
br label %18
18: ; preds = %14
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %10
21: ; preds = %10
%22 = call i32 @assert(i32 0)
%23 = load i8*, i8** %4
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
int getegid() {}


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

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

LLVM IR (-O0):
define i32 @getegid() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @getegid() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_error_command_pattern() {
  printf("O padrao do comando esta errado.\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"O padrao do comando esta errado.\0A\00"
define void @show_error_command_pattern() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"O padrao do comando esta errado.\00"
define void @show_error_command_pattern() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
const char *utf8proc_version(void) {
  return "2"
         "."
         "1"
         "."
         "0"
         "";
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"2.1.0\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"2.1.0\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void irq_remap(void) {
  outb(0x20, 0x11);
  outb(0xA0, 0x11);
  outb(0x21, 0x20);
  outb(0xA1, 0x28);
  outb(0x21, 0x04);
  outb(0xA1, 0x02);
  outb(0x21, 0x01);
  outb(0xA1, 0x01);
  outb(0x21, 0x0);
  outb(0xA1, 0x0);
}


x86 assembly (clang, -O0):
<irq_remap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_remap>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @irq_remap() {
%1 = call i32 @outb(i32 32, i32 17)
%2 = call i32 @outb(i32 160, i32 17)
%3 = call i32 @outb(i32 33, i32 32)
%4 = call i32 @outb(i32 161, i32 40)
%5 = call i32 @outb(i32 33, i32 4)
%6 = call i32 @outb(i32 161, i32 2)
%7 = call i32 @outb(i32 33, i32 1)
%8 = call i32 @outb(i32 161, i32 1)
%9 = call i32 @outb(i32 33, i32 0)
%10 = call i32 @outb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @irq_remap() {
%1 = tail call i32 @outb(i32 32, i32 17)
%2 = tail call i32 @outb(i32 160, i32 17)
%3 = tail call i32 @outb(i32 33, i32 32)
%4 = tail call i32 @outb(i32 161, i32 40)
%5 = tail call i32 @outb(i32 33, i32 4)
%6 = tail call i32 @outb(i32 161, i32 2)
%7 = tail call i32 @outb(i32 33, i32 1)
%8 = tail call i32 @outb(i32 161, i32 1)
%9 = tail call i32 @outb(i32 33, i32 0)
%10 = tail call i32 @outb(i32 161, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(long double *, int /*<<< orphan*/, int);
void ClearLDoublesMatrix(long double **Q, int size, char name[]) {
  memset(*Q, 0, size * sizeof(long double));
}


x86 assembly (clang, -O0):
<ClearLDoublesMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
movslq -0xc(%rbp),%rax
shl    $0x4,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearLDoublesMatrix>:
mov    %esi,%edx
mov    (%rdi),%rdi
shl    $0x4,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @ClearLDoublesMatrix(x86_fp80** %0, i32 %1, i8* %2) {
%4 = alloca x86_fp80**
%5 = alloca i32
%6 = alloca i8*
store x86_fp80** %0, x86_fp80*** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load x86_fp80**, x86_fp80*** %4
%8 = load x86_fp80*, x86_fp80** %7
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 16
%12 = trunc i64 %11 to i32
%13 = call i32 @memset(x86_fp80* %8, i32 0, i32 %12)
ret void
}

LLVM IR (-O2):
define void @ClearLDoublesMatrix(x86_fp80** nocapture %0, i32 %1, i8* nocapture readnone %2) {
%4 = load x86_fp80*, x86_fp80** %0
%5 = shl i32 %1, 4
%6 = tail call i32 @memset(x86_fp80* %4, i32 0, i32 %5)
ret void
}
void kol_board_puts(char *s) {
  unsigned i;
  i = 0;
  while (*(s + i)) {
    asm("int $0x40" ::"a"(63), "b"(1), "c"(*(s + i)));
    i++;
  }
}


x86 assembly (clang, -O0):
<kol_board_puts>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1145 <kol_board_puts+0x45>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,1),%cl
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1110 <kol_board_puts+0x10>
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_board_puts>:
push   %rbx
mov    (%rdi),%cl
test   %cl,%cl
je     1134 <kol_board_puts+0x34>
mov    $0x1,%edx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3f,%eax
int    $0x40
mov    %edx,%eax
movzbl (%rdi,%rax,1),%ecx
add    $0x1,%edx
test   %cl,%cl
jne    1120 <kol_board_puts+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_board_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i32 [ %7, %4 ], [ 0, %1 ]
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 63, i32 1, i8 %5)
%7 = add i32 %6, 1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void gtk_im_context_set_surrounding() {}


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

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

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

LLVM IR (-O2):
define void @gtk_im_context_set_surrounding() {
ret void
}
/* Type definitions */
struct DSHashMap {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ds_hashmap_put(struct DSHashMap *, void *,
                                  int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int);
void ds_hashmap_put_int(struct DSHashMap *hash, int32_t key, void *data) {
  ds_hashmap_put(hash, data, NULL, key, 1);
}


x86 assembly (clang, -O0):
<ds_hashmap_put_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%r8d
call   1030 <ds_hashmap_put@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds_hashmap_put_int>:
mov    %esi,%ecx
mov    %rdx,%rsi
xor    %edx,%edx
mov    $0x1,%r8d
jmp    1030 <ds_hashmap_put@plt>

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

LLVM IR (-O2):
%struct.DSHashMap = type { i32 }
define void @ds_hashmap_put_int(%struct.DSHashMap* %0, i32 %1, i8* %2) {
%4 = tail call i32 @ds_hashmap_put(%struct.DSHashMap* %0, i8* %2, i32* null, i32 %1, i32 1)
ret void
}
/* Variables and functions */
unsigned int UARTRegConfigModeEnable(unsigned int, int);
unsigned int UARTRxErrorGet(unsigned int baseAdd) {
  unsigned int lcrRegValue = 0;
  unsigned int retVal = 0;
  lcrRegValue = UARTRegConfigModeEnable(baseAdd, (0x007F));
  retVal = ((*((volatile unsigned int *)(baseAdd + (0x14)))) &
            ((0x00000080u) | (0x00000010u) | (0x00000008u) | (0x00000004u) |
             (0x00000002u)));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) = lcrRegValue;
  return retVal;
}


x86 assembly (clang, -O0):
<UARTRxErrorGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7f,%esi
call   1030 <UARTRegConfigModeEnable@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x9e,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTRxErrorGet>:
push   %rbx
mov    %edi,%ebx
mov    $0x7f,%esi
call   1030 <UARTRegConfigModeEnable@plt>
lea    0x14(%rbx),%edx
mov    $0x9e,%ecx
and    (%rdx),%ecx
add    $0xc,%ebx
mov    %eax,(%rbx)
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @UARTRxErrorGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = call i32 @UARTRegConfigModeEnable(i32 %5, i32 127)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = add i32 %7, 20
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, 158
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = add i32 %14, 12
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store volatile i32 %13, i32* %17
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @UARTRxErrorGet(i32 %0) {
%2 = tail call i32 @UARTRegConfigModeEnable(i32 %0, i32 127)
%3 = add i32 %0, 20
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 158
%8 = add i32 %0, 12
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %2, i32* %10
ret i32 %7
}
int avpriv_atomic_int_add_and_fetch(volatile int *ptr, int inc) {
  *ptr += inc;
  return *ptr;
}


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

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

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

LLVM IR (-O2):
define i32 @avpriv_atomic_int_add_and_fetch(i32* %0, i32 %1) {
%3 = load volatile i32, i32* %0
%4 = add nsw i32 %3, %1
store volatile i32 %4, i32* %0
%5 = load volatile i32, i32* %0
ret i32 %5
}
void iret() { __asm__("iret"); }


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

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

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

LLVM IR (-O2):
define void @iret() {
tail call void asm sideeffect "iret", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
double sgnum(x, y)
double x, y;
{
  if (y < 0.0)
    return (-fabs(x));
  else
    return (fabs(x));
}


x86 assembly (clang, -O0):
<sgnum>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    114d <sgnum+0x4d>
movsd  -0x10(%rbp),%xmm0
movaps 0xed8(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1162 <sgnum+0x62>
movsd  -0x10(%rbp),%xmm0
movaps 0xea7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgnum>:
movapd 0xef8(%rip),%xmm2
andpd  %xmm0,%xmm2
orpd   0xefc(%rip),%xmm0
xorpd  %xmm3,%xmm3
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sgnum(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load double, double* %4
%10 = call double @llvm.fabs.f64(double %9)
%11 = fneg double %10
store double %11, double* %3
br label %15
12: ; preds = %2
%13 = load double, double* %4
%14 = call double @llvm.fabs.f64(double %13)
store double %14, double* %3
br label %15
15: ; preds = %12, %8
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @sgnum(double %0, double %1) {
%3 = fcmp olt double %1, 0.000000e+00
%4 = tail call double @llvm.fabs.f64(double %0)
%5 = fneg double %4
%6 = select i1 %3, double %5, double %4
ret double %6
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t num, size_t size) {
  void *buf = malloc(num * size);
  if (buf)
    memset(buf, 0, num * size);
  return buf;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1161 <calloc+0x41>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_version() {
  char *ver = "0.5.4";
  ;
  printf("tir (tEXT-iNSERTEr)\n");
  printf("  version : %s\n", ver);
  printf("  github  : https://github.com/lilca/tEXT-iNSERTEr\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xed2(%rip),%rdi
lea    0xec5(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"0.5.4\00"
@.str.1 = [21 x i8] c"tir (tEXT-iNSERTEr)\0A\00"
@.str.2 = [16 x i8] c" version : %s\0A\00"
@.str.3 = [52 x i8] c" github : https://github.com/lilca/tEXT-iNSERTEr\0A\00"
define void @print_version() {
%1 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = load i8*, i8** %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.5.4\00"
@.str.2 = [16 x i8] c" version : %s\0A\00"
@str = [20 x i8] c"tir (tEXT-iNSERTEr)\00"
@str.4 = [51 x i8] c" github : https://github.com/lilca/tEXT-iNSERTEr\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.4, i64 0, i64 0))
ret void
}
int test_imm_CDint16_reg(short val) {
  return ((val) & (-0xCD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CDint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff33,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CDint16_reg>:
test   $0xff33,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CDint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -205
%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_CDint16_reg(i16 signext %0) {
%2 = and i16 %0, -205
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mkfifos();
int main() { mkfifos(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @mkfifos()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mkfifos()
ret i32 0
}