xunge/DecIR huggingface dataset:
void sdb_init_shsql(void) { ; }


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

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

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

LLVM IR (-O2):
define void @sdb_init_shsql() {
ret void
}
int test_imm_0Duint16_mem(unsigned short *val) {
  return ((*val) & (-0x0D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Duint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xfffffff3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Duint16_mem>:
movzwl (%rdi),%eax
test   $0xfff3,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Duint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -13
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char *langRomTypeNationalFdc() { return "National Disk Controller"; }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"National Disk Controller\00"
define i8* @langRomTypeNationalFdc() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [25 x i8] c"National Disk Controller\00"
define i8* @langRomTypeNationalFdc() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ss2spt(int);
void ss2spt_(int *projtype) { ss2spt(*projtype); }


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

x86 assembly (clang, -O2):
<ss2spt_>:
mov    (%rdi),%edi
jmp    1030 <ss2spt@plt>

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

LLVM IR (-O2):
define void @ss2spt_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @ss2spt(i32 %2)
ret void
}
void foo545(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo545(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_msg();
char getch();
int /*<<< orphan*/ print_msg(char *);
int prompt_yn(char *m) {
  print_msg(m);
  if (getch() == 'y') {
    clear_msg();
    return 1;
  } else {
    clear_msg();
    return 0;
  }
}


x86 assembly (clang, -O0):
<prompt_yn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_msg@plt>
mov    $0x0,%al
call   1040 <getch@plt>
movsbl %al,%eax
cmp    $0x79,%eax
jne    116b <prompt_yn+0x3b>
mov    $0x0,%al
call   1050 <clear_msg@plt>
movl   $0x1,-0x4(%rbp)
jmp    1179 <prompt_yn+0x49>
mov    $0x0,%al
call   1050 <clear_msg@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_yn>:
push   %rbx
call   1030 <print_msg@plt>
xor    %eax,%eax
call   1040 <getch@plt>
xor    %ebx,%ebx
cmp    $0x79,%al
sete   %bl
xor    %eax,%eax
call   1050 <clear_msg@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @prompt_yn(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @print_msg(i8* %4)
%6 = call signext i8 (...) @getch()
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 121
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (...) @clear_msg()
store i32 1, i32* %2
br label %13
11: ; preds = %1
%12 = call i32 (...) @clear_msg()
store i32 0, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @prompt_yn(i8* %0) {
%2 = tail call i32 @print_msg(i8* %0)
%3 = tail call signext i8 (...) @getch()
%4 = icmp eq i8 %3, 121
%5 = tail call i32 (...) @clear_msg()
%6 = zext i1 %4 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *argv0) {
  fprintf(stderr,
          "Syntax: %s [options] <arrayname> <binaryfile> <outname>\n"
          "  -min <n>     check if <binaryfile> is not smaller than <n>KB\n"
          "  -max <n>     check if <binaryfile> is not bigger than <n>KB\n"
          "  -mask <n>    check if size of binaryfile is <n>-aligned\n"
          "  -width <n>   number of bytes per line (default: 16)\n"
          "  -break <n>   break every <n> lines    (default: -1)\n"
          "  -ascii       show ASCII representation of binary as comment\n"
          "  -export      emit DECLEXPORT\n"
          "  --append     append to the output file (default: truncate)\n",
          argv0);
  return 1;
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [502 x i8] c"Syntax: %s [options] <arrayname> <binaryfile> <outname>\0A -min <n> check if <binaryfile> is not smaller than <n>KB\0A -max <n> check if <binaryfile> is not bigger than <n>KB\0A -mask <n> check if size of binaryfile is <n>-aligned\0A -width <n> number of bytes per line (default: 16)\0A -break <n> break every <n> lines (default: -1)\0A -ascii show ASCII representation of binary as comment\0A -export emit DECLEXPORT\0A --append append to the output file (default: truncate)\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([502 x i8], [502 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
main(argc, argv) int argc;
char *argv[];
{
  printf("argv[0] = %d\n", argv[0]);
  printf("== done ==\n");
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"argv[0] = %d\0A\00"
@str = [11 x i8] c"== done ==\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
pid_t __attribute__((section("libgloss_epiphany"))) _fork(void) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_fork>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fork>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_fork() section "libgloss_epiphany" {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_fork() section "libgloss_epiphany" {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}
/* Variables and functions */
size_t old_bzero(char *block, size_t len) {
  while (len--) {
    *block++ = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<old_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     113c <old_bzero+0x3c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    110c <old_bzero+0xc>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<old_bzero>:
test   %rsi,%rsi
je     1124 <old_bzero+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @old_bzero(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %9, %2
%6 = load i64, i64* %4
%7 = add i64 %6, -1
store i64 %7, i64* %4
%8 = icmp ne i64 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8 0, i8* %10
br label %5
12: ; preds = %5
ret i64 0
}

LLVM IR (-O2):
define i64 @old_bzero(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ imprimeIN();
void imprimeOUT() { imprimeIN(); }


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

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

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

LLVM IR (-O2):
define void @imprimeOUT() {
%1 = tail call i32 (...) @imprimeIN()
ret void
}
/* Variables and functions */
int execve(char *, char **, char **);
int main(int argc, char *argv[]) {
  if (argc < 1)
    return 1;
  char *envp = NULL;
  return execve(argv[1], argv + 1, &envp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1160 <main+0x50>
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
lea    -0x18(%rbp),%rdx
call   1030 <execve@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
jle    1132 <main+0x22>
push   %rax
movq   $0x0,(%rsp)
mov    0x8(%rsi),%rdi
add    $0x8,%rsi
mov    %rsp,%rdx
call   1030 <execve@plt>
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = icmp slt i32 %0, 1
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @execve(i8* %8, i8** %7, i8** %3)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ 1, %2 ]
ret i32 %11
}
void g_list_prepend() {}


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

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

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

LLVM IR (-O2):
define void @g_list_prepend() {
ret void
}
char is_sensor(char *SERVERRETURN) {
  char *str, value[9], *re;
  str = strstr(SERVERRETURN, "value\":");
  strncpy(value, str, 8);
  re = value[7];
  return value[7];
}


x86 assembly (clang, -O0):
<is_sensor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x10(%rbp)
lea    -0x19(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movsbq -0x12(%rbp),%rax
mov    %rax,-0x28(%rbp)
movsbl -0x12(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sensor>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rsi
call   1040 <strstr@plt>
lea    0xf(%rsp),%rdi
mov    $0x8,%edx
mov    %rax,%rsi
call   1030 <strncpy@plt>
mov    0x16(%rsp),%al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"value\22:\00"
define signext i8 @is_sensor(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [9 x i8]
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strstr(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %3
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = call i8* @strncpy(i8* %8, i8* %9, i64 8)
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 7
%12 = load i8, i8* %11
%13 = sext i8 %12 to i64
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %5
%15 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 7
%16 = load i8, i8* %15
ret i8 %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"value\22:\00"
define signext i8 @is_sensor(i8* %0) {
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%4 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i8* @strncpy(i8* %3, i8* dereferenceable(1) %4, i64 8)
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 7
%7 = load i8, i8* %6
ret i8 %7
}
unsigned long long _COM_CONVd64u(double a) { return (unsigned long long)a; }


x86 assembly (clang, -O0):
<_COM_CONVd64u>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm2
movaps %xmm0,%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rcx
cvttsd2si %xmm0,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
and    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_COM_CONVd64u>:
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xeec(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @_COM_CONVd64u(double %0) {
%2 = fptoui double %0 to i64
ret i64 %2
}
int letterscore(char letter) {
  if (letter >= 'A' && letter <= 'Z') {
    return (int)letter - 64;
  } else if (letter >= 'a' && letter <= 'z') {
    return (int)letter - 96;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<letterscore>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <letterscore+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <letterscore+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <letterscore+0x63>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     115c <letterscore+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     115c <letterscore+0x5c>
movsbl -0x5(%rbp),%eax
sub    $0x60,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <letterscore+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<letterscore>:
mov    %edi,%eax
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110e <letterscore+0xe>
add    $0xffffffc0,%eax
ret
lea    -0x61(%rax),%ecx
add    $0xffffffa0,%eax
xor    %edx,%edx
cmp    $0x1a,%cl
cmovb  %eax,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @letterscore(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 64
store i32 %14, i32* %2
br label %28
15: ; preds = %7, %1
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 97
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sle i32 %21, 122
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = sub nsw i32 %25, 96
store i32 %26, i32* %2
br label %28
27: ; preds = %19, %15
store i32 0, i32* %2
br label %28
28: ; preds = %27, %23, %11
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @letterscore(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -65
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -64
br label %12
7: ; preds = %1
%8 = add i8 %0, -97
%9 = icmp ult i8 %8, 26
%10 = add nsw i32 %2, -96
%11 = select i1 %9, i32 %10, i32 0
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_read_dobldobl_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(550, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_read_dobldobl_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x226,%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):
<syscon_read_dobldobl_Laurent_system>:
mov    $0x226,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @syscon_read_dobldobl_Laurent_system() {
%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 550, 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 @syscon_read_dobldobl_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 550, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
regx0imm1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[x0]) = 33; }


x86 assembly (clang, -O0):
<regx0imm1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  0xebf(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0imm1_set>:
movslq %edi,%rax
movl   $0x42040000,(%rdx,%rax,4)
ret

LLVM IR (-O0):
define i32 @regx0imm1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %12
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
store float 3.300000e+01, float* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @regx0imm1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds float, float* %4, i64 %7
store float 3.300000e+01, float* %8
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;
typedef int mpfr_rnd_t;

/* Variables and functions */
int /*<<< orphan*/ mpfr_mul_d(int /*<<< orphan*/, int /*<<< orphan*/, double,
                              int);
void mpfrmuld(mpfr_t r2, mpfr_t r1, double *d, mpfr_rnd_t *irnd) {
  double d1;
  int n1;
  d1 = *d;
  n1 = *irnd;
  mpfr_mul_d(r2, r1, d1, n1);
}


x86 assembly (clang, -O0):
<mpfrmuld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
mov    -0x24(%rbp),%edx
call   1030 <mpfr_mul_d@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpfrmuld>:
movsd  (%rdx),%xmm0
mov    (%rcx),%edx
jmp    1030 <mpfr_mul_d@plt>

LLVM IR (-O0):
define void @mpfrmuld(i32 %0, i32 %1, double* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32*
%9 = alloca double
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store i32* %3, i32** %8
%11 = load double*, double** %7
%12 = load double, double* %11
store double %12, double* %9
%13 = load i32*, i32** %8
%14 = load i32, i32* %13
store i32 %14, i32* %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load double, double* %9
%18 = load i32, i32* %10
%19 = call i32 @mpfr_mul_d(i32 %15, i32 %16, double %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @mpfrmuld(i32 %0, i32 %1, double* nocapture %2, i32* nocapture %3) {
%5 = load double, double* %2
%6 = load i32, i32* %3
%7 = tail call i32 @mpfr_mul_d(i32 %0, i32 %1, double %5, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ finite(float);
int fvec_all_finite(float *v, long n) {
  while (n--)
    if (!finite(v[n]))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<fvec_all_finite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1165 <fvec_all_finite+0x55>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <finite@plt>
cmp    $0x0,%eax
jne    1160 <fvec_all_finite+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116c <fvec_all_finite+0x5c>
jmp    1120 <fvec_all_finite+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fvec_all_finite>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
sub    $0x1,%rbx
jb     1139 <fvec_all_finite+0x29>
movss  (%r14,%rbx,4),%xmm0
call   1030 <finite@plt>
test   %eax,%eax
jne    1120 <fvec_all_finite+0x10>
xor    %eax,%eax
jmp    113e <fvec_all_finite+0x2e>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @fvec_all_finite(float* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %5, %7 ]
%5 = add nsw i64 %4, -1
%6 = icmp eq i64 %4, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = getelementptr inbounds float, float* %0, i64 %5
%9 = load float, float* %8
%10 = tail call i32 @finite(float %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3, %7
%13 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %13
}
/* Variables and functions */
void *malloc(size_t);
void *system_alloc(void *allocator_data, size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<system_alloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @system_alloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned int bar();
int main() {
  unsigned int nStyle = bar();
  if (nStyle & 32768)
    nStyle |= 65536;
  if (nStyle != (32768 | 65536))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <bar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     1155 <main+0x35>
mov    -0x8(%rbp),%eax
or     $0x10000,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x18000,-0x8(%rbp)
je     1169 <main+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
lea    (%rax,%rax,1),%ecx
and    $0x10000,%ecx
or     %eax,%ecx
cmp    $0x18000,%ecx
jne    113f <main+0x1f>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @bar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 32768
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = or i32 %8, 65536
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %0
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 98304
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = shl i32 %1, 1
%3 = and i32 %2, 65536
%4 = or i32 %3, %1
%5 = icmp eq i32 %4, 98304
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
/* Variables and functions */
char *EncodeURLX(char const *, int /*<<< orphan*/);
char *EncodeURL(const char *text) { return EncodeURLX(text, 0); }


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

x86 assembly (clang, -O2):
<EncodeURL>:
xor    %esi,%esi
jmp    1030 <EncodeURLX@plt>

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

LLVM IR (-O2):
define i8* @EncodeURL(i8* %0) {
%2 = tail call i8* @EncodeURLX(i8* %0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ strncat(char *, char const *, size_t);
void strlcat(char *dest, const char *src, size_t n) {
  strncat(dest, src, n - 1);
  dest[n - 1] = '\0';
}


x86 assembly (clang, -O0):
<strlcat>:
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
sub    $0x1,%rdx
call   1030 <strncat@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcat>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdx
call   1030 <strncat@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @strlcat(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 = sub i64 %9, 1
%11 = call i32 @strncat(i8* %7, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = sub i64 %13, 1
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @strlcat(i8* %0, i8* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @strncat(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
void main() {
  int b;
  b = 1 || 2 || 3 || 4;
  if (~b)
    print("b 25");
  printid(b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     114a <main+0x2a>
lea    0xebb(%rip),%rdi
call   1030 <print@plt>
mov    -0x4(%rbp),%edi
call   1040 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <printid@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"b 25\00"
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = xor i32 %2, -1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
%9 = call i32 @printid(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"b 25\00"
define void @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 1)
ret void
}
__attribute__((visibility("default"))) void
callback_with_n_frames(void (*func)(void), unsigned n) {
  if (n <= 1) {
    func();
  } else {
    callback_with_n_frames(func, n - 1);
  }
}


x86 assembly (clang, -O0):
<callback_with_n_frames>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
ja     1131 <callback_with_n_frames+0x21>
call   *-0x8(%rbp)
jmp    1140 <callback_with_n_frames+0x30>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <callback_with_n_frames@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback_with_n_frames>:
jmp    *%rdi

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

LLVM IR (-O2):
define void @callback_with_n_frames(void ()* nocapture %0, i32 %1) {
tail call void %0()
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BrzSequenceOptimised_ackdown(struct comp *, int);
void BrzSequence_ackdown(struct comp *comp, int port) {
  BrzSequenceOptimised_ackdown(comp, port);
}


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

x86 assembly (clang, -O2):
<BrzSequence_ackdown>:
jmp    1030 <BrzSequenceOptimised_ackdown@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
define void @BrzSequence_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%5 = load %struct.comp*, %struct.comp** %3
%6 = load i32, i32* %4
%7 = call i32 @BrzSequenceOptimised_ackdown(%struct.comp* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzSequence_ackdown(%struct.comp* %0, i32 %1) {
%3 = tail call i32 @BrzSequenceOptimised_ackdown(%struct.comp* %0, i32 %1)
ret void
}
void __attribute__((weak)) otg_hs_ep1_out_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<otg_hs_ep1_out_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<otg_hs_ep1_out_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.otg_hs_ep1_out_isr = [19 x i8] c"otg_hs_ep1_out_isr\00"
define weak void @otg_hs_ep1_out_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.otg_hs_ep1_out_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.otg_hs_ep1_out_isr = [19 x i8] c"otg_hs_ep1_out_isr\00"
define weak void @otg_hs_ep1_out_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.otg_hs_ep1_out_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_x11_del_prop() {
  printf("NOT IMPLEMENTED:"
         "pa_x11_del_prop"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_x11_del_prop\00"
define i32 @pa_x11_del_prop() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void gtk_spin_button_update_policy_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_update_policy_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nullify(int *);
void test2(int x) {
  int *s2 = NULL;
  nullify(s2);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <nullify@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
xor    %edi,%edi
jmp    1030 <nullify@plt>

LLVM IR (-O0):
define void @test2(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
store i32* null, i32** %3
%4 = load i32*, i32** %3
%5 = call i32 @nullify(i32* %4)
ret void
}

LLVM IR (-O2):
define void @test2(i32 %0) {
%2 = tail call i32 @nullify(i32* null)
ret void
}
const unsigned short **__ctype_b_loc(void) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  static const unsigned short *ctypes[384];
  return &ctypes[128];
}


x86 assembly (clang, -O0):
<__ctype_b_loc>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
lea    0x2edf(%rip),%rax
add    $0x400,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ctype_b_loc>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
lea    0x32e2(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.__ctype_b_loc = [14 x i8] c"__ctype_b_loc\00"
@.str.1 = [4 x i8] c"()\0A\00"
@__ctype_b_loc.ctypes = internal global [384 x i16*] zeroinitializer
define i16** @__ctype_b_loc() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.__ctype_b_loc, i64 0, i64 0))
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i16** getelementptr inbounds ([384 x i16*], [384 x i16*]* @__ctype_b_loc.ctypes, i64 0, i64 128)
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.__ctype_b_loc = [14 x i8] c"__ctype_b_loc\00"
@.str.1 = [4 x i8] c"()\0A\00"
@__ctype_b_loc.ctypes = internal global [384 x i16*] zeroinitializer
define i16** @__ctype_b_loc() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.__ctype_b_loc, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i16** getelementptr inbounds ([384 x i16*], [384 x i16*]* @__ctype_b_loc.ctypes, i64 0, i64 128)
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int low_load_function(unsigned long long addrHigh, unsigned int period) {
  int nap;
  nap = period / 100;
  while (*((unsigned long long *)addrHigh) == 0)
    usleep(nap);
  return 0;
}


x86 assembly (clang, -O0):
<low_load_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1149 <low_load_function+0x39>
mov    -0x10(%rbp),%edi
call   1030 <usleep@plt>
jmp    112e <low_load_function+0x1e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<low_load_function>:
push   %r14
push   %rbx
push   %rax
cmpq   $0x0,(%rdi)
jne    113d <low_load_function+0x2d>
mov    %rdi,%r14
mov    %esi,%eax
imul   $0x51eb851f,%rax,%rbx
shr    $0x25,%rbx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <usleep@plt>
cmpq   $0x0,(%r14)
je     1130 <low_load_function+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @low_load_function(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = udiv i32 %6, 100
store i32 %7, i32* %5
br label %8
8: ; preds = %13, %2
%9 = load i64, i64* %3
%10 = inttoptr i64 %9 to i64*
%11 = load i64, i64* %10
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %5
%15 = call i32 @usleep(i32 %14)
br label %8
16: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @low_load_function(i64 %0, i32 %1) {
%3 = udiv i32 %1, 100
%4 = inttoptr i64 %0 to i64*
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2, %7
%8 = tail call i32 @usleep(i32 %3)
%9 = load i64, i64* %4
%10 = icmp eq i64 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %2
ret i32 0
}
unsigned int kd_library_initialize(void *data) { return (data != 0); }


x86 assembly (clang, -O0):
<kd_library_initialize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kd_library_initialize>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @kd_library_initialize(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @kd_library_initialize(i8* readnone %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
union tree_node *TYPE_NAME(union tree_node *t) {}


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

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

LLVM IR (-O0):
%union.tree_node = type opaque
define %union.tree_node* @TYPE_NAME(%union.tree_node* %0) {
%2 = alloca %union.tree_node*
%3 = alloca %union.tree_node*
store %union.tree_node* %0, %union.tree_node** %3
%4 = load %union.tree_node*, %union.tree_node** %2
ret %union.tree_node* %4
}

LLVM IR (-O2):
%union.tree_node = type opaque
define noalias %union.tree_node* @TYPE_NAME(%union.tree_node* nocapture readnone %0) {
ret %union.tree_node* undef
}
unsigned GetFieldW4(unsigned int *A, register unsigned int index) {
  register unsigned int i = index / 8, j = (index & 0x7) << 2;
  return (A[i] << (28 - j)) >> (28);
}


x86 assembly (clang, -O0):
<GetFieldW4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
shl    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    $0x1c,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%eax
shr    $0x1c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetFieldW4>:
lea    0x0(,%rsi,4),%ecx
shr    $0x3,%esi
mov    (%rdi,%rsi,4),%eax
not    %cl
and    $0x1c,%cl
shl    %cl,%eax
shr    $0x1c,%eax
ret

LLVM IR (-O0):
define i32 @GetFieldW4(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 = udiv i32 %7, 8
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 7
%11 = shl i32 %10, 2
store i32 %11, i32* %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = sub i32 28, %17
%19 = shl i32 %16, %18
%20 = lshr i32 %19, 28
ret i32 %20
}

LLVM IR (-O2):
define i32 @GetFieldW4(i32* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 3
%4 = shl i32 %1, 2
%5 = zext i32 %3 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %4, 28
%9 = xor i32 %8, 28
%10 = shl i32 %7, %9
%11 = lshr i32 %10, 28
ret i32 %11
}
void fd41(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    p012A:
      goto p012A;
      goto a;
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd41>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd41+0x7>

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

LLVM IR (-O0):
define void @fd41(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
br label %17
17: ; preds = %17, %14
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd41(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}