xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Usage: ip mroute show [ PREFIX ] [ from PREFIX ] [ iif DEVICE ]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [65 x i8] c"Usage: ip mroute show [ PREFIX ] [ from PREFIX ] [ iif DEVICE ]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [65 x i8] c"Usage: ip mroute show [ PREFIX ] [ from PREFIX ] [ iif DEVICE ]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int input_number;
  int square_root;
  scanf("%d", &input_number);
  square_root = exact_square(input_number);
  if (square_root) {
    printf("1");
  } else {
    printf("0");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1175 <main+0x45>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x51>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @exact_square(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_square(i32 %4)
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 48, i32 49
%8 = call i32 @putchar(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog, char *msg) {
  fprintf(stderr,
          "%s\nUsage:\t%s [options] [<file>]\nOptions:\n\t-256\tGenerate "
          "SHA-256 hash\n\t-384\tGenerate SHA-284 hash\n\t-512\tGenerate "
          "SHA-512 hash\n\t-ALL\tGenerate all three hashes\n\t-q\tQuiet mode - "
          "only output hexadecimal hashes, one per line\n\n",
          msg, prog);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [221 x i8] c"%s\0AUsage:\09%s [options] [<file>]\0AOptions:\0A\09-256\09Generate SHA-256 hash\0A\09-384\09Generate SHA-284 hash\0A\09-512\09Generate SHA-512 hash\0A\09-ALL\09Generate all three hashes\0A\09-q\09Quiet mode - only output hexadecimal hashes, one per line\0A\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [221 x i8] c"%s\0AUsage:\09%s [options] [<file>]\0AOptions:\0A\09-256\09Generate SHA-256 hash\0A\09-384\09Generate SHA-284 hash\0A\09-512\09Generate SHA-512 hash\0A\09-ALL\09Generate all three hashes\0A\09-q\09Quiet mode - only output hexadecimal hashes, one per line\0A\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int nvidia_mcp_gpio_set(int, int);
int nvidia_mcp_gpio0c_raise(void) { return nvidia_mcp_gpio_set(0x0c, 1); }


x86 assembly (clang, -O0):
<nvidia_mcp_gpio0c_raise>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x1,%esi
call   1030 <nvidia_mcp_gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvidia_mcp_gpio0c_raise>:
mov    $0xc,%edi
mov    $0x1,%esi
jmp    1030 <nvidia_mcp_gpio_set@plt>

LLVM IR (-O0):
define i32 @nvidia_mcp_gpio0c_raise() {
%1 = call i32 @nvidia_mcp_gpio_set(i32 12, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @nvidia_mcp_gpio0c_raise() {
%1 = tail call i32 @nvidia_mcp_gpio_set(i32 12, i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_xmlschema_comment_entities() {
  test_parser_verify_entity(
      test_parser_sourcefile("xmlschema", " <!--comment-->"), "comment",
      "<!--comment-->");
}


x86 assembly (clang, -O0):
<test_xmlschema_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xeda(%rip),%rsi
lea    0xec4(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_xmlschema_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xedf(%rip),%rsi
lea    0xec9(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"xmlschema\00"
@.str.1 = [16 x i8] c" <!--comment-->\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [15 x i8] c"<!--comment-->\00"
define void @test_xmlschema_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"xmlschema\00"
@.str.1 = [16 x i8] c" <!--comment-->\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [15 x i8] c"<!--comment-->\00"
define void @test_xmlschema_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *, char);
void prolog(char name) { emitln("PROLOG %c", name); }


x86 assembly (clang, -O0):
<prolog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <emitln@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"PROLOG %c\00"
define void @prolog(i8 signext %0) {
%2 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
double dmin(double a, double b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<dmin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <dmin+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <dmin+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmin>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dmin(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @dmin(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
struct shim_linux_dirent {
  int dummy;
};

/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, unsigned int, struct shim_linux_dirent *,
                unsigned int);
int shim_getdents(unsigned int fd, struct shim_linux_dirent *dirp,
                  unsigned int count) {
  return shim_enosys(0, fd, dirp, count);
}


x86 assembly (clang, -O0):
<shim_getdents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_getdents>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
%struct.shim_linux_dirent = type { i32 }
define i32 @shim_getdents(i32 %0, %struct.shim_linux_dirent* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.shim_linux_dirent*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.shim_linux_dirent* %1, %struct.shim_linux_dirent** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.shim_linux_dirent*, %struct.shim_linux_dirent** %5
%9 = load i32, i32* %6
%10 = call i32 @shim_enosys(i32 0, i32 %7, %struct.shim_linux_dirent* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.shim_linux_dirent = type { i32 }
define i32 @shim_getdents(i32 %0, %struct.shim_linux_dirent* %1, i32 %2) {
%4 = tail call i32 @shim_enosys(i32 0, i32 %0, %struct.shim_linux_dirent* %1, i32 %2)
ret i32 %4
}
pl(str) char *str;
{
  int k;
  k = 0;
  putchar(13);
  while (str[k])
    putchar(str[k++]);
}


x86 assembly (clang, -O0):
<pl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0xd,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1163 <pl+0x53>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
mov    $0x0,%al
call   1030 <putchar@plt>
jmp    112f <pl+0x1f>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl>:
push   %rbx
mov    %rdi,%rbx
mov    $0xd,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    (%rbx),%al
test   %al,%al
je     1145 <pl+0x35>
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <pl+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @pl(i8* nocapture %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 13)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i64 [ %8, %5 ], [ 0, %1 ]
%7 = phi i8 [ %12, %5 ], [ %3, %1 ]
%8 = add nuw i64 %6, 1
%9 = sext i8 %7 to i32
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %9)
%11 = getelementptr inbounds i8, i8* %0, i64 %8
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ferror(int /*<<< orphan*/ *);
int fileError(void *h) {
  FILE *f = (FILE *)h;
  return ferror(f);
}


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

x86 assembly (clang, -O2):
<fileError>:
jmp    1030 <ferror@plt>

LLVM IR (-O0):
define i32 @fileError(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @ferror(i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @fileError(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @ferror(i32* %2)
ret i32 %3
}
unsigned long insert_ras(unsigned long insn, long value,
                         int dialect __attribute__((unused)),
                         const char **errmsg) {
  if (value == 0)
    *errmsg = "invalid register operand when updating";
  return insn | ((value & 0x1f) << 16);
}


x86 assembly (clang, -O0):
<insert_ras>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    112c <insert_ras+0x2c>
mov    -0x20(%rbp),%rax
lea    0xed7(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    $0x10,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_ras>:
mov    %rsi,%rax
test   %rsi,%rsi
jne    1112 <insert_ras+0x12>
lea    0xef1(%rip),%rdx
mov    %rdx,(%rcx)
and    $0x1f,%eax
shl    $0x10,%rax
or     %rdi,%rax
ret

LLVM IR (-O0):
@.str = [39 x i8] c"invalid register operand when updating\00"
define i64 @insert_ras(i64 %0, i64 %1, i32 %2, i8** %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8**
store i64 %0, i64* %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = load i64, i64* %6
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i8**, i8*** %8
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8** %12
br label %13
13: ; preds = %11, %4
%14 = load i64, i64* %5
%15 = load i64, i64* %6
%16 = and i64 %15, 31
%17 = shl i64 %16, 16
%18 = or i64 %14, %17
ret i64 %18
}

LLVM IR (-O2):
@.str = [39 x i8] c"invalid register operand when updating\00"
define i64 @insert_ras(i64 %0, i64 %1, i32 %2, i8** nocapture writeonly %3) {
%5 = icmp eq i64 %1, 0
br i1 %5, label %6, label %7
6: ; preds = %4
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8** %3
br label %7
7: ; preds = %6, %4
%8 = shl i64 %1, 16
%9 = and i64 %8, 2031616
%10 = or i64 %9, %0
ret i64 %10
}
void f1ia_(int a[0] __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @f1ia_(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void Keyboard(unsigned char key, int x, int y) {
  (void)key;
  (void)x;
  (void)y;
  exit(0);
}


x86 assembly (clang, -O0):
<Keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<Keyboard>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @Keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = tail call i32 @exit(i32 0)
unreachable
}
closefifo_(ifd, irtn) long int *irtn, *ifd;
{
  *irtn = close(*ifd);
  if (*irtn < 0)
    perror("closewrite (close)");
}


x86 assembly (clang, -O0):
<closefifo_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <close@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jge    1164 <closefifo_+0x44>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closefifo_>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%rdi
xor    %eax,%eax
call   1030 <close@plt>
cltq
mov    %rax,(%rbx)
test   %eax,%eax
js     1139 <closefifo_+0x19>
pop    %rbx
ret
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1040 <perror@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"closewrite (close)\00"
define i32 @closefifo_(i64* %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
%6 = load i64*, i64** %4
%7 = load i64, i64* %6
%8 = call i32 (i64, ...) bitcast (i32 (...)* @close to i32 (i64, ...)*)(i64 %7)
%9 = sext i32 %8 to i64
%10 = load i64*, i64** %5
store i64 %9, i64* %10
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [19 x i8] c"closewrite (close)\00"
define i32 @closefifo_(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = tail call i32 (i64, ...) bitcast (i32 (...)* @close to i32 (i64, ...)*)(i64 %3)
%5 = sext i32 %4 to i64
store i64 %5, i64* %1
%6 = icmp slt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ xlFmtError(char *);
void checkfzero(double farg) {
  if (farg == 0.0)
    xlFmtError("division by zero");
}


x86 assembly (clang, -O0):
<checkfzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1141 <checkfzero+0x31>
jp     1141 <checkfzero+0x31>
lea    0xec4(%rip),%rdi
call   1030 <xlFmtError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkfzero>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1128 <checkfzero+0x18>
jp     1128 <checkfzero+0x18>
lea    0xedd(%rip),%rdi
jmp    1030 <xlFmtError@plt>
ret

LLVM IR (-O0):
@.str = [17 x i8] c"division by zero\00"
define void @checkfzero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @xlFmtError(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"division by zero\00"
define void @checkfzero(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @xlFmtError(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int output(void) {
  int i = 0;
  while (i < 10) {
    putchar('0' + i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1142 <output+0x32>
mov    -0x4(%rbp),%edi
add    $0x30,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <output+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %rax
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x32,%edi
call   1030 <putchar@plt>
mov    $0x33,%edi
call   1030 <putchar@plt>
mov    $0x34,%edi
call   1030 <putchar@plt>
mov    $0x35,%edi
call   1030 <putchar@plt>
mov    $0x36,%edi
call   1030 <putchar@plt>
mov    $0x37,%edi
call   1030 <putchar@plt>
mov    $0x38,%edi
call   1030 <putchar@plt>
mov    $0x39,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @output() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 48, %6
%8 = call i32 @putchar(i32 %7)
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @output() {
%1 = tail call i32 @putchar(i32 48)
%2 = tail call i32 @putchar(i32 49)
%3 = tail call i32 @putchar(i32 50)
%4 = tail call i32 @putchar(i32 51)
%5 = tail call i32 @putchar(i32 52)
%6 = tail call i32 @putchar(i32 53)
%7 = tail call i32 @putchar(i32 54)
%8 = tail call i32 @putchar(i32 55)
%9 = tail call i32 @putchar(i32 56)
%10 = tail call i32 @putchar(i32 57)
ret i32 0
}
int update_program_status(int aggregated_dump) {}


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

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

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

LLVM IR (-O2):
define i32 @update_program_status(i32 %0) {
ret i32 undef
}
IR0AX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (*p0) = (((int *)11111111)[x1]); }


x86 assembly (clang, -O0):
<IR0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,4),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0AX1>:
movslq %ecx,%rax
mov    0xa98ac7(,%rax,4),%eax
mov    %eax,(%r8)
ret

LLVM IR (-O0):
define i32 @IR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %11
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %12
store i32 %17, i32* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @IR0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %4
ret i32 undef
}
/* Variables and functions */
scalar_t__ isspace(int);
int _read_next_non_space(int (*_read)(void *), void *arg) {
  int c = _read(arg);
  while (isspace(c)) {
    c = _read(arg);
  }
  return c;
}


x86 assembly (clang, -O0):
<_read_next_non_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1151 <_read_next_non_space+0x41>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    %eax,-0x14(%rbp)
jmp    112d <_read_next_non_space+0x1d>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read_next_non_space>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
nopl   (%rax)
call   *%rbx
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1135 <_read_next_non_space+0x25>
mov    %r14,%rdi
jmp    1120 <_read_next_non_space+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_read_next_non_space(i32 (i8*)* nocapture %0, i8* %1) {
%3 = tail call i32 %0(i8* %1)
%4 = tail call i64 @isspace(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2, %6
%7 = tail call i32 %0(i8* %1)
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %6
10: ; preds = %6, %2
%11 = phi i32 [ %3, %2 ], [ %7, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", 1 + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
float ldexpf(float x, int expo) {
  float r;
  float e = expo;
  __asm__ __volatile__("fscale; fst %%st(0)" : "=t"(r) : "0"(x), "u"(e));
  return r;
}


x86 assembly (clang, -O0):
<ldexpf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movss  %xmm1,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
flds   -0x14(%rbp)
flds   -0x18(%rbp)
fxch   %st(1)
fscale
fst    %st(0)
fstp   %st(1)
fstps  -0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexpf>:
cvtsi2ss %edi,%xmm1
movss  %xmm0,-0x4(%rsp)
movss  %xmm1,-0x8(%rsp)
flds   -0x4(%rsp)
flds   -0x8(%rsp)
fxch   %st(1)
fscale
fst    %st(0)
fstp   %st(1)
fstps  -0xc(%rsp)
movss  -0xc(%rsp),%xmm0
ret

LLVM IR (-O0):
define float @ldexpf(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
store float %8, float* %6
%9 = load float, float* %3
%10 = load float, float* %6
%11 = call float asm sideeffect "fscale; fst %st(0)", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(float %9, float %10)
store float %11, float* %5
%12 = load float, float* %5
ret float %12
}

LLVM IR (-O2):
define float @ldexpf(float %0, i32 %1) {
%3 = sitofp i32 %1 to float
%4 = tail call float asm sideeffect "fscale; fst %st(0)", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(float %0, float %3)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\a\b\e\f\n\r\t\v\x61");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\07\08\1B\0C\0A\0D\09\0Ba\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"\07\08\1B\0C\0A\0D\09\0Ba\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read_unixtstamp(char *, int *);
void test_three_decimals() {
  char *str = "1234.001";
  uint64_t dest;
  read_unixtstamp(str, &dest);
  assert((dest / 1000000000) == 1234 && (dest % 1000000000) == 1000000);
}


x86 assembly (clang, -O0):
<test_three_decimals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <read_unixtstamp@plt>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4d2,%ecx
mov    %al,-0xd(%rbp)
jne    1175 <test_three_decimals+0x55>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
cmp    $0xf4240,%edx
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_three_decimals>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <read_unixtstamp@plt>
xor    %edi,%edi
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"1234.001\00"
define void @test_three_decimals() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @read_unixtstamp(i8* %3, i32* %2)
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000000000
%7 = icmp eq i32 %6, 1234
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 1000000000
%11 = icmp eq i32 %10, 1000000
br label %12
12: ; preds = %8, %0
%13 = phi i1 [ false, %0 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"1234.001\00"
define void @test_three_decimals() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @read_unixtstamp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drv_L7_list(void) {
  printf("LPH7508");
  return 0;
}


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

x86 assembly (clang, -O2):
<drv_L7_list>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"LPH7508\00"
define i32 @drv_L7_list() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned int __get_cpsr();
int /*<<< orphan*/ __set_cpsr(unsigned int);
unsigned restoreIRQ(unsigned oldCPSR) {
  unsigned _cpsr;
  _cpsr = __get_cpsr();
  __set_cpsr((_cpsr & ~0x00000080) | (oldCPSR & 0x00000080));
  return _cpsr;
}


x86 assembly (clang, -O0):
<restoreIRQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__get_cpsr@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xffffff7f,%edi
mov    -0x4(%rbp),%eax
and    $0x80,%eax
or     %eax,%edi
call   1030 <__set_cpsr@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restoreIRQ>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <__get_cpsr@plt>
mov    %eax,%ebp
and    $0xffffff7f,%eax
and    $0x80,%ebx
or     %eax,%ebx
mov    %ebx,%edi
call   1030 <__set_cpsr@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @restoreIRQ(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @__get_cpsr()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, -129
%7 = load i32, i32* %2
%8 = and i32 %7, 128
%9 = or i32 %6, %8
%10 = call i32 @__set_cpsr(i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @restoreIRQ(i32 %0) {
%2 = tail call i32 (...) @__get_cpsr()
%3 = and i32 %2, -129
%4 = and i32 %0, 128
%5 = or i32 %3, %4
%6 = tail call i32 @__set_cpsr(i32 %5)
ret i32 %2
}
void voided(void) {}


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

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

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

LLVM IR (-O2):
define void @voided() {
ret void
}
/* Variables and functions */
char *strrchr(char *, int);
char *msvcrt_strrchr(char *str, int c) {
  ;
  if (c == '\\')
    return strrchr(str, '/');
  return strrchr(str, c);
}


x86 assembly (clang, -O0):
<msvcrt_strrchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x5c,-0x14(%rbp)
jne    1140 <msvcrt_strrchr+0x30>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x8(%rbp)
jmp    1150 <msvcrt_strrchr+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strrchr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msvcrt_strrchr>:
cmp    $0x5c,%esi
mov    $0x2f,%eax
cmove  %eax,%esi
jmp    1030 <strrchr@plt>

LLVM IR (-O0):
define i8* @msvcrt_strrchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 92
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i8* @strrchr(i8* %9, i32 47)
store i8* %10, i8** %3
br label %15
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = call i8* @strrchr(i8* %12, i32 %13)
store i8* %14, i8** %3
br label %15
15: ; preds = %11, %8
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @msvcrt_strrchr(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 92
%4 = select i1 %3, i32 47, i32 %1
%5 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 %4)
ret i8* %5
}
/* Variables and functions */
char *ht_alloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *ht_strdup(const char *str) {
  char *rc;
  rc = ht_alloc(strlen(str) + 1);
  strcpy(rc, str);
  return rc;
}


x86 assembly (clang, -O0):
<ht_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <ht_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <ht_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ht_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @ht_alloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @ht_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @ht_alloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_EYE_PLANE 130
#define GL_OBJECT_PLANE 129
#define GL_TEXTURE_GEN_MODE 128
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glTexGendv_size(GLenum e) {
  switch (e) {
  case GL_TEXTURE_GEN_MODE:
    return 1;
  case GL_OBJECT_PLANE:
  case GL_EYE_PLANE:
    return 4;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__glTexGendv_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x80,%eax
je     1133 <__glTexGendv_size+0x33>
jmp    111d <__glTexGendv_size+0x1d>
mov    -0xc(%rbp),%eax
add    $0xffffff7f,%eax
sub    $0x2,%eax
jb     113f <__glTexGendv_size+0x3f>
jmp    114b <__glTexGendv_size+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <__glTexGendv_size+0x52>
movl   $0x4,-0x4(%rbp)
jmp    1152 <__glTexGendv_size+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glTexGendv_size>:
add    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0x2,%edi
ja     1117 <__glTexGendv_size+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define hidden i32 @__glTexGendv_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 128, label %5
i32 129, label %6
i32 130, label %6
]
5: ; preds = %1
store i32 1, i32* %2
br label %8
6: ; preds = %1, %1
store i32 4, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@switch.table.__glTexGendv_size = [3 x i32] [i32 1, i32 4, i32 4]
define hidden i32 @__glTexGendv_size(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 3
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.__glTexGendv_size, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
unsigned char *ripemd320_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_ripemd320(unsigned char *out,
                                     const unsigned char *in, size_t in_len) {
  return ripemd320_buffer(out, in, in_len);
}


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

x86 assembly (clang, -O2):
<hash_buffer_ripemd320>:
jmp    1030 <ripemd320_buffer@plt>

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

LLVM IR (-O2):
define i8* @hash_buffer_ripemd320(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @ripemd320_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
void rop3_36_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk1 = S ^ T;
  stk2 = *D ^ S;
  stk1 = stk1 & stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_36_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_36_1_0>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_36_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %8
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %8
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %7
%28 = load i8, i8* %7
%29 = zext i8 %28 to i32
%30 = load i8, i8* %5
%31 = zext i8 %30 to i32
%32 = xor i32 %31, -1
%33 = and i32 %29, %32
%34 = load i8*, i8** %4
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = load i8, i8* %5
%38 = zext i8 %37 to i32
%39 = and i32 %36, %38
%40 = or i32 %33, %39
%41 = trunc i32 %40 to i8
%42 = load i8*, i8** %4
store i8 %41, i8* %42
ret void
}

LLVM IR (-O2):
define void @rop3_36_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %5, %4
store i8 %6, i8* %0
ret void
}
void ff_hevc_put_hevc_epel_hv12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fxn();
int /*<<< orphan*/ getchar();
main() {
  int i;
  for (i = 0; i < 5; i++) {
    fxn();
  }
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1155 <main+0x35>
mov    $0x0,%al
call   1040 <fxn@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fxn()
%2 = tail call i32 (...) @fxn()
%3 = tail call i32 (...) @fxn()
%4 = tail call i32 (...) @fxn()
%5 = tail call i32 (...) @fxn()
%6 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int ft_cmd_exit(char **argv) {
  (void)argv;
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<ft_cmd_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<ft_cmd_exit>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @ft_cmd_exit(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @ft_cmd_exit(i8** nocapture readnone %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
main() { fprintf(stdout, "This is application %d, executable %d\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [39 x i8] c"This is application %d, executable %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [39 x i8] c"This is application %d, executable %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}