xunge/DecIR huggingface dataset:
/* Variables and functions */
int checkSO();
int /*<<< orphan*/ system(char *);
void limparTela() {
  int SO;
  SO = checkSO();
  if (SO == 0)
    system("clear");
  else
    system("cls");
  return;
}


x86 assembly (clang, -O0):
<limparTela>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <checkSO@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114d <limparTela+0x2d>
lea    0xebd(%rip),%rdi
call   1030 <system@plt>
jmp    1159 <limparTela+0x39>
lea    0xeb2(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limparTela>:
push   %rax
xor    %eax,%eax
call   1040 <checkSO@plt>
test   %eax,%eax
lea    0xecf(%rip),%rax
lea    0xece(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [4 x i8] c"cls\00"
define void @limparTela() {
%1 = alloca i32
%2 = call i32 (...) @checkSO()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [4 x i8] c"cls\00"
define void @limparTela() {
%1 = tail call i32 (...) @checkSO()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @system(i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigjmp_buf;

/* Variables and functions */
scalar_t__ sigsetjmp(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  sigjmp_buf entry;
  if (sigsetjmp(entry, 0) != 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <sigsetjmp@plt>
cmp    $0x0,%rax
je     113f <main+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <main+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %esi,%esi
call   1030 <sigsetjmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @sigsetjmp(i32 undef, i32 0)
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void foobar() { double d = 1.0; }


x86 assembly (clang, -O0):
<foobar>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foobar() {
%1 = alloca double
store double 1.000000e+00, double* %1
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ KAPI_save_as_header_int(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void KAPI_save_as_header_int_list(FILE *fp, int i) {
  FILE *fpTmp = fp;
  KAPI_save_as_header_int(fp, i);
  fwrite(",", sizeof(char), 1, fpTmp);
}


x86 assembly (clang, -O0):
<KAPI_save_as_header_int_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <KAPI_save_as_header_int@plt>
mov    -0x18(%rbp),%rcx
lea    0xeb2(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KAPI_save_as_header_int_list>:
push   %rbx
mov    %rdi,%rbx
call   1040 <KAPI_save_as_header_int@plt>
mov    $0x2c,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define void @KAPI_save_as_header_int_list(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
store i32* %6, i32** %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = call i32 @KAPI_save_as_header_int(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32* %10)
ret void
}

LLVM IR (-O2):
define void @KAPI_save_as_header_int_list(i32* %0, i32 %1) {
%3 = tail call i32 @KAPI_save_as_header_int(i32* %0, i32 %1)
%4 = tail call i32 @fputc(i32 44, i32* %0)
ret void
}
/* Type definitions */
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
char *getusername(void) {
  char *username = NULL;
  struct passwd *password = getpwuid(getuid());
  if (password) {
    username = password->pw_name;
  }
  return username;
}


x86 assembly (clang, -O0):
<getusername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1158 <getusername+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getusername>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
test   %rax,%rax
je     1139 <getusername+0x19>
mov    (%rax),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @getusername() {
%1 = alloca i8*
%2 = alloca %struct.passwd*
store i8* null, i8** %1
%3 = call i32 (...) @getuid()
%4 = call %struct.passwd* @getpwuid(i32 %3)
store %struct.passwd* %4, %struct.passwd** %2
%5 = load %struct.passwd*, %struct.passwd** %2
%6 = icmp ne %struct.passwd* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load %struct.passwd*, %struct.passwd** %2
%9 = getelementptr inbounds %struct.passwd, %struct.passwd* %8, i32 0, i32 0
%10 = load i8*, i8** %9
store i8* %10, i8** %1
br label %11
11: ; preds = %7, %0
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @getusername() {
%1 = tail call i32 (...) @getuid()
%2 = tail call %struct.passwd* @getpwuid(i32 %1)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %0
%8 = phi i8* [ %6, %4 ], [ null, %0 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ nosmime();
int cverify(void *vp) {
  nosmime();
  return 1;
}


x86 assembly (clang, -O0):
<cverify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <nosmime@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cverify>:
push   %rax
xor    %eax,%eax
call   1030 <nosmime@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cverify(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @nosmime()
ret i32 1
}

LLVM IR (-O2):
define i32 @cverify(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @nosmime()
ret i32 1
}
void I_NoAppServicesLobbyCleanUp(void) {}


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

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

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

LLVM IR (-O2):
define void @I_NoAppServicesLobbyCleanUp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int pthread_cancel(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
void sighandler_getIoEvent(int x) {
  printf("cancel thread getIoEvent. result: %d\n",
         pthread_cancel(pthread_self()));
}


x86 assembly (clang, -O0):
<sighandler_getIoEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%edi
call   1050 <pthread_cancel@plt>
mov    %eax,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler_getIoEvent>:
push   %rax
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %eax,%edi
call   1050 <pthread_cancel@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"cancel thread getIoEvent. result: %d\0A\00"
define void @sighandler_getIoEvent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @pthread_self()
%4 = call i32 @pthread_cancel(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"cancel thread getIoEvent. result: %d\0A\00"
define void @sighandler_getIoEvent(i32 %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @pthread_cancel(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XErrorEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XErrorEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XErrorEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XErrorEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XErrorEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XErrorEvent>:
test   %rdi,%rdi
je     112a <free_XErrorEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XErrorEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XErrorEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
void _max(int *a, int b) {
  if (*a < b)
    *a = b;
}


x86 assembly (clang, -O0):
<_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jge    1123 <_max+0x23>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_max>:
cmp    %esi,(%rdi)
jge    1106 <_max+0x6>
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @_max(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* %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32*, i32** %3
store i32 %10, i32* %11
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @_max(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 %1, i32* %0
br label %6
6: ; preds = %5, %2
ret void
}
void bp() {
  static int i = 0;
  i++;
}


x86 assembly (clang, -O0):
<bp>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f11(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp>:
addl   $0x1,0x2f1d(%rip)
ret

LLVM IR (-O0):
@bp.i = internal global i32 0
define void @bp() {
%1 = load i32, i32* @bp.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @bp.i
ret void
}

LLVM IR (-O2):
@bp.i = internal unnamed_addr global i32 0
define void @bp() {
%1 = load i32, i32* @bp.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @bp.i
ret void
}
/* Variables and functions */
int random_main(int, int, char **);
int random_hex_main(int argc, char **argv) {
  return random_main(1, argc, argv);
}


x86 assembly (clang, -O0):
<random_hex_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
call   1030 <random_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_hex_main>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <random_main@plt>

LLVM IR (-O0):
define i32 @random_hex_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @random_main(i32 1, i32 %5, i8** %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @random_hex_main(i32 %0, i8** %1) {
%3 = tail call i32 @random_main(i32 1, i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void help(char *s) {
  fprintf(stderr,
          "\t usage: %s out.ply heights.tif rpc.xml "
          "[colors.png] [-h \"h1 ... h9\"] [--utm-zone ZONE] "
          "[--offset_x x0] [--offset_y y0] [--with-normals] "
          "[--lon-m l0] [--lon-M lf] [--lat-m l0] [--lat-M lf] "
          "[--lonlat-clip polygon.kml] [--max-memory MB]\n",
          s);
}


x86 assembly (clang, -O0):
<help>:
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>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [236 x i8] c"\09 usage: %s out.ply heights.tif rpc.xml [colors.png] [-h \22h1 ... h9\22] [--utm-zone ZONE] [--offset_x x0] [--offset_y y0] [--with-normals] [--lon-m l0] [--lon-M lf] [--lat-m l0] [--lat-M lf] [--lonlat-clip polygon.kml] [--max-memory MB]\0A\00"
define void @help(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 ([236 x i8], [236 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [236 x i8] c"\09 usage: %s out.ply heights.tif rpc.xml [colors.png] [-h \22h1 ... h9\22] [--utm-zone ZONE] [--offset_x x0] [--offset_y y0] [--with-normals] [--lon-m l0] [--lon-M lf] [--lat-m l0] [--lat-M lf] [--lonlat-clip polygon.kml] [--max-memory MB]\0A\00"
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void gensync() {}


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

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

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

LLVM IR (-O2):
define void @gensync() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ wctype_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswctype(int /*<<< orphan*/, int /*<<< orphan*/);
int __iswctype_l(wint_t c, wctype_t t, locale_t l) { return iswctype(c, t); }


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

x86 assembly (clang, -O2):
<__iswctype_l>:
jmp    1030 <iswctype@plt>

LLVM IR (-O0):
define i32 @__iswctype_l(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @iswctype(i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @__iswctype_l(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @iswctype(i32 %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
float coshf(float);
float __ocl_cosh_float(float src) { return coshf(src); }


x86 assembly (clang, -O0):
<__ocl_cosh_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <coshf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_cosh_float>:
jmp    1030 <coshf@plt>

LLVM IR (-O0):
define float @__ocl_cosh_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @coshf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__ocl_cosh_float(float %0) {
%2 = tail call float @coshf(float %0)
ret float %2
}
int cmp(void *a, void *b) {
  int a_, b_;
  a_ = *(int *)a;
  b_ = *(int *)b;
  if (a_ == b_)
    return 0;
  if (a_ > b_)
    return 1;
  if (a_ < b_)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <cmp+0x36>
movl   $0x0,-0x4(%rbp)
jmp    116d <cmp+0x6d>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <cmp+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    116d <cmp+0x6d>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1166 <cmp+0x66>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <cmp+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%ecx
mov    (%rsi),%edx
xor    %eax,%eax
cmp    %edx,%ecx
je     1119 <cmp+0x19>
mov    $0x1,%eax
jg     1119 <cmp+0x19>
setl   %al
movzbl %al,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = icmp sgt i32 %4, %6
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = icmp slt i32 %4, %6
%12 = sext i1 %11 to i32
br label %13
13: ; preds = %10, %8, %2
%14 = phi i32 [ 0, %2 ], [ 1, %8 ], [ %12, %10 ]
ret i32 %14
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ random_bytes(int *, int);
void eth_addr_random(uint8_t ea[6]) {
  random_bytes(ea, 6);
  ea[0] &= ~1;
  ea[0] |= 2;
}


x86 assembly (clang, -O0):
<eth_addr_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1030 <random_bytes@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eth_addr_random>:
push   %rbx
mov    %rdi,%rbx
mov    $0x6,%esi
call   1030 <random_bytes@plt>
mov    (%rbx),%eax
and    $0xfffffffc,%eax
or     $0x2,%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @eth_addr_random(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @random_bytes(i32* %3, i32 6)
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, -2
store i32 %8, i32* %6
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = or i32 %11, 2
store i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @eth_addr_random(i32* %0) {
%2 = tail call i32 @random_bytes(i32* %0, i32 6)
%3 = load i32, i32* %0
%4 = and i32 %3, -4
%5 = or i32 %4, 2
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay();
int /*<<< orphan*/ led_off();
int /*<<< orphan*/ led_on();
void led_show(void) {
  led_on();
  delay();
  led_off();
}


x86 assembly (clang, -O0):
<led_show>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <led_on@plt>
mov    $0x0,%al
call   1040 <delay@plt>
mov    $0x0,%al
call   1030 <led_off@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_show>:
push   %rax
xor    %eax,%eax
call   1050 <led_on@plt>
xor    %eax,%eax
call   1040 <delay@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <led_off@plt>

LLVM IR (-O0):
define void @led_show() {
%1 = call i32 (...) @led_on()
%2 = call i32 (...) @delay()
%3 = call i32 (...) @led_off()
ret void
}

LLVM IR (-O2):
define void @led_show() {
%1 = tail call i32 (...) @led_on()
%2 = tail call i32 (...) @delay()
%3 = tail call i32 (...) @led_off()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ASSERT(void (*)());
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void MPUIntRegister(void (*pfnHandler)(void)) {
  ASSERT(pfnHandler);
  IntRegister(4, pfnHandler);
  IntEnable(4);
}


x86 assembly (clang, -O0):
<MPUIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <ASSERT@plt>
mov    -0x8(%rbp),%rsi
mov    $0x4,%edi
call   1040 <IntRegister@plt>
mov    $0x4,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPUIntRegister>:
push   %rbx
mov    %rdi,%rbx
call   1050 <ASSERT@plt>
mov    $0x4,%edi
mov    %rbx,%rsi
call   1040 <IntRegister@plt>
mov    $0x4,%edi
pop    %rbx
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @MPUIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @ASSERT(void (...)* %4)
%6 = load void ()*, void ()** %2
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @IntRegister(i32 4, void (...)* %7)
%9 = call i32 @IntEnable(i32 4)
ret void
}

LLVM IR (-O2):
define void @MPUIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @ASSERT(void (...)* %2)
%4 = tail call i32 @IntRegister(i32 4, void (...)* %2)
%5 = tail call i32 @IntEnable(i32 4)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int quaddobl_witness_set_to_Laurent_system_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(809, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_witness_set_to_Laurent_system_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x329,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_witness_set_to_Laurent_system_container>:
mov    $0x329,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @quaddobl_witness_set_to_Laurent_system_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 809, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @quaddobl_witness_set_to_Laurent_system_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 809, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
char *strndup(char const *, size_t);
char *toy_strndup(const char *s, size_t n) {
  char *p = strndup(s, n);
  return p;
}


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

x86 assembly (clang, -O2):
<toy_strndup>:
jmp    1030 <strndup@plt>

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

LLVM IR (-O2):
define noalias i8* @toy_strndup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @strndup(i8* %0, i64 %1)
ret i8* %3
}
char getValue(char c) {
  return (c >= '0' && c <= '9') ? c - '0' : c - 'A' + 10;
}


x86 assembly (clang, -O0):
<getValue>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <getValue+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <getValue+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <getValue+0x40>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getValue>:
lea    -0x30(%rdi),%eax
add    $0xc9,%dil
cmp    $0xa,%al
movzbl %al,%ecx
movzbl %dil,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i8 @getValue(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = add i8 %0, -55
%5 = select i1 %3, i8 %2, i8 %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ _IO(unsigned char, int);
int ioctl(int, int /*<<< orphan*/);
int get_log_id(int fd_spec) { return ioctl(fd_spec, _IO('u', 5)); }


x86 assembly (clang, -O0):
<get_log_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x75,%edi
mov    $0x5,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_log_id>:
push   %rbx
mov    %edi,%ebx
mov    $0x75,%edi
mov    $0x5,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @get_log_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i8 zeroext 117, i32 5)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_log_id(i32 %0) {
%2 = tail call i32 @_IO(i8 zeroext 117, i32 5)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
void __attribute__((constructor)) my_init(void) {}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @my_init, i8* null }]
define void @my_init() {
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
define void @my_init() {
ret void
}
void capturing2startCapturing_rv_endCapturing() {}


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

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

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

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

/* Variables and functions */
int gap_event_advertising_report_get_data_length(const uint8_t *event) {
  return event[11];
}


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

x86 assembly (clang, -O2):
<gap_event_advertising_report_get_data_length>:
mov    0x2c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @gap_event_advertising_report_get_data_length(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 11
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @gap_event_advertising_report_get_data_length(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 11
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ doubleindirect();
void doubleindirect2(void) { doubleindirect(); }


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

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

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

LLVM IR (-O2):
define void @doubleindirect2() {
%1 = tail call i32 (...) @doubleindirect()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ early_puts(char *);
void virtio_stop(void) {
  while (1)
    early_puts("stop\n");
}


x86 assembly (clang, -O0):
<virtio_stop>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <virtio_stop+0x9>
lea    0xee0(%rip),%rdi
call   1030 <early_puts@plt>
jmp    1119 <virtio_stop+0x9>

x86 assembly (clang, -O2):
<virtio_stop>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <early_puts@plt>
jmp    1120 <virtio_stop+0x10>

LLVM IR (-O0):
@.str = [6 x i8] c"stop\0A\00"
define void @virtio_stop() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @early_puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %1
}

LLVM IR (-O2):
@.str = [6 x i8] c"stop\0A\00"
define void @virtio_stop() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @early_puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %1
}
int test_imm_26uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x26 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_26uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x26,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_26uint64_highword_reg>:
movabs $0x2600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_26uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 38
%6 = icmp ne i64 %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_26uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 163208757248
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
void glmAdd3fv_(float x[3], const float y[3]) {
  for (size_t i = 0; i < 3; ++i)
    x[i] += y[i];
}


x86 assembly (clang, -O0):
<glmAdd3fv_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    114f <glmAdd3fv_+0x4f>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <glmAdd3fv_+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmAdd3fv_>:
movss  (%rsi),%xmm0
addss  (%rdi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
addss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
addss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmAdd3fv_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i64
store float* %0, float** %3
store float* %1, float** %4
store i64 0, i64* %5
br label %6
6: ; preds = %19, %2
%7 = load i64, i64* %5
%8 = icmp ult i64 %7, 3
br i1 %8, label %9, label %22
9: ; preds = %6
%10 = load float*, float** %4
%11 = load i64, i64* %5
%12 = getelementptr inbounds float, float* %10, i64 %11
%13 = load float, float* %12
%14 = load float*, float** %3
%15 = load i64, i64* %5
%16 = getelementptr inbounds float, float* %14, i64 %15
%17 = load float, float* %16
%18 = fadd float %17, %13
store float %18, float* %16
br label %19
19: ; preds = %9
%20 = load i64, i64* %5
%21 = add i64 %20, 1
store i64 %21, i64* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @glmAdd3fv_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = load float, float* %0
%5 = fadd float %3, %4
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = fadd float %7, %9
store float %10, float* %8
%11 = getelementptr inbounds float, float* %1, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %0, i64 2
%14 = load float, float* %13
%15 = fadd float %12, %14
store float %15, float* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_ws(char const);
const char *skip_notws(const char *p) {
  if (p) {
    while (*p && !is_ws(*p))
      p++;
  }
  return p;
}


x86 assembly (clang, -O0):
<skip_notws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117e <skip_notws+0x6e>
jmp    112c <skip_notws+0x1c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1158 <skip_notws+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_ws@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1168 <skip_notws+0x58>
jmp    1179 <skip_notws+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <skip_notws+0x1c>
jmp    117e <skip_notws+0x6e>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_notws>:
push   %rbx
test   %rdi,%rdi
je     113a <skip_notws+0x2a>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     113c <skip_notws+0x2c>
nop
movsbl %al,%edi
call   1030 <is_ws@plt>
test   %eax,%eax
jne    113c <skip_notws+0x2c>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_notws+0x10>
jmp    113c <skip_notws+0x2c>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_notws(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %11
%7 = phi i8 [ %13, %11 ], [ %4, %3 ]
%8 = phi i8* [ %12, %11 ], [ %0, %3 ]
%9 = tail call i32 @is_ws(i8 signext %7)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %6, %3, %1
%16 = phi i8* [ null, %1 ], [ %0, %3 ], [ %12, %11 ], [ %8, %6 ]
ret i8* %16
}
/* Variables and functions */
int foo(unsigned int *, int);
void bar(unsigned *p) { foo(p, foo(p, 1)); }


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

x86 assembly (clang, -O2):
<bar>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <foo@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @bar(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @foo(i32* %4, i32 1)
%6 = call i32 @foo(i32* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @bar(i32* %0) {
%2 = tail call i32 @foo(i32* %0, i32 1)
%3 = tail call i32 @foo(i32* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *s) {
  fprintf(stderr, "Error: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void private_hal_exception_hal_exception_arch_init() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @av_get_codec_tag_string() {
ret void
}
/* Variables and functions */
int random();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
long myrandom(int begin, int end) {
  int gap = end - begin + 1;
  int ret = 0;
  srand((unsigned)time(0));
  ret = random() % gap + begin;
  return ret;
}


x86 assembly (clang, -O0):
<myrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <random@plt>
cltd
idivl  -0xc(%rbp)
add    -0x4(%rbp),%edx
mov    %edx,-0x10(%rbp)
movslq -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrandom>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
sub    %edi,%ebx
add    $0x1,%ebx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <random@plt>
cltd
idiv   %ebx
add    %ebp,%edx
movslq %edx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @myrandom(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %5
store i32 0, i32* %6
%11 = call i64 @time(i32 0)
%12 = trunc i64 %11 to i32
%13 = call i32 @srand(i32 %12)
%14 = call i32 (...) @random()
%15 = load i32, i32* %5
%16 = srem i32 %14, %15
%17 = load i32, i32* %3
%18 = add nsw i32 %16, %17
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
ret i64 %20
}

LLVM IR (-O2):
define i64 @myrandom(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 @time(i32 0)
%6 = trunc i64 %5 to i32
%7 = tail call i32 @srand(i32 %6)
%8 = tail call i32 (...) @random()
%9 = srem i32 %8, %4
%10 = add nsw i32 %9, %0
%11 = sext i32 %10 to i64
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ comparisonOpsdd();
int /*<<< orphan*/ comparisonOpsdf();
int /*<<< orphan*/ comparisonOpsdi();
int /*<<< orphan*/ comparisonOpsff();
int /*<<< orphan*/ comparisonOpsid();
void comparisonOps() {
  comparisonOpsdd();
  comparisonOpsdf();
  comparisonOpsff();
  comparisonOpsid();
  comparisonOpsdi();
}


x86 assembly (clang, -O0):
<comparisonOps>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <comparisonOpsdd@plt>
mov    $0x0,%al
call   1030 <comparisonOpsdf@plt>
mov    $0x0,%al
call   1070 <comparisonOpsff@plt>
mov    $0x0,%al
call   1060 <comparisonOpsid@plt>
mov    $0x0,%al
call   1050 <comparisonOpsdi@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparisonOps>:
push   %rax
xor    %eax,%eax
call   1040 <comparisonOpsdd@plt>
xor    %eax,%eax
call   1030 <comparisonOpsdf@plt>
xor    %eax,%eax
call   1070 <comparisonOpsff@plt>
xor    %eax,%eax
call   1060 <comparisonOpsid@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <comparisonOpsdi@plt>

LLVM IR (-O0):
define void @comparisonOps() {
%1 = call i32 (...) @comparisonOpsdd()
%2 = call i32 (...) @comparisonOpsdf()
%3 = call i32 (...) @comparisonOpsff()
%4 = call i32 (...) @comparisonOpsid()
%5 = call i32 (...) @comparisonOpsdi()
ret void
}

LLVM IR (-O2):
define void @comparisonOps() {
%1 = tail call i32 (...) @comparisonOpsdd()
%2 = tail call i32 (...) @comparisonOpsdf()
%3 = tail call i32 (...) @comparisonOpsff()
%4 = tail call i32 (...) @comparisonOpsid()
%5 = tail call i32 (...) @comparisonOpsdi()
ret void
}
int smemory_usage(const int nzlmax, const int nzumax, const int nzlumax,
                  const int n) {
  register int iword, dword;
  iword = sizeof(int);
  dword = sizeof(float);
  return (10 * n * iword + nzlmax * iword + nzumax * (iword + dword) +
          nzlumax * dword);
}


x86 assembly (clang, -O0):
<smemory_usage>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
imul   $0xa,-0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
mov    -0x14(%rbp),%edx
add    -0x18(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smemory_usage>:
lea    (%rcx,%rcx,4),%eax
shl    $0x3,%esi
add    %edx,%edi
lea    (%rsi,%rax,8),%eax
lea    (%rax,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @smemory_usage(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 4, i32* %9
store i32 4, i32* %10
%11 = load i32, i32* %8
%12 = mul nsw i32 10, %11
%13 = load i32, i32* %9
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = load i32, i32* %9
%17 = mul nsw i32 %15, %16
%18 = add nsw i32 %14, %17
%19 = load i32, i32* %6
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = add nsw i32 %20, %21
%23 = mul nsw i32 %19, %22
%24 = add nsw i32 %18, %23
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = mul nsw i32 %25, %26
%28 = add nsw i32 %24, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @smemory_usage(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul i32 %3, 40
%6 = shl nsw i32 %1, 3
%7 = add i32 %2, %0
%8 = shl i32 %7, 2
%9 = add i32 %5, %6
%10 = add i32 %9, %8
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
size_t strxfrm(char *dest, const char *src, size_t n) {
  size_t n2 = strlen(src);
  if (n > n2)
    strcpy(dest, src);
  return n2;
}


x86 assembly (clang, -O0):
<strxfrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    115c <strxfrm+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxfrm>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
cmp    %r12,%rax
jae    114c <strxfrm+0x2c>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @strxfrm(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ult i64 %4, %2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @strcpy(i8* %0, i8* %1)
br label %8
8: ; preds = %6, %3
ret i64 %4
}