xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ m231SetPrgROMBank(int /*<<< orphan*/);
int /*<<< orphan*/ p16c8init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
void m231_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
               uint32_t prgRAMsizeIn, uint8_t *chrROMin,
               uint32_t chrROMsizeIn) {
  p16c8init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
            chrROMsizeIn);
  m231SetPrgROMBank(0);
}


x86 assembly (clang, -O0):
<m231_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1040 <p16c8init@plt>
xor    %edi,%edi
call   1030 <m231SetPrgROMBank@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m231_init>:
push   %rax
call   1040 <p16c8init@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <m231SetPrgROMBank@plt>

LLVM IR (-O0):
define void @m231_init(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
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @p16c8init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 @m231SetPrgROMBank(i32 0)
ret void
}

LLVM IR (-O2):
define void @m231_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @p16c8init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 @m231SetPrgROMBank(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void sleep(unsigned sec) { usleep(sec * 1000000); }


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0xf4240,-0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
imul   $0xf4240,%edi,%edi
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @sleep(i32 %0) {
%2 = mul i32 %0, 1000000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int bitcount(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
void main() {
  unsigned num;
  printf("\nInput the number:");
  scanf("%u", &num);
  printf("Number of bits:%u\n", bitcount(num));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1040 <bitcount@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <bitcount@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\0AInput the number:\00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [19 x i8] c"Number of bits:%u\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @bitcount(i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"\0AInput the number:\00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [19 x i8] c"Number of bits:%u\0A\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @bitcount(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
void copyString(char **destination, const char *source) {
  *destination = (char *)malloc((strlen(source) + 1) * sizeof(char));
  strcpy(*destination, source);
  (*destination)[strlen(source)] = '\0';
}


x86 assembly (clang, -O0):
<copyString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @copyString(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strlen(i8* %5)
%7 = add i64 %6, 1
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
%12 = load i8**, i8*** %3
store i8* %11, i8** %12
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
%15 = load i8*, i8** %4
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8**, i8*** %3
%18 = load i8*, i8** %17
%19 = load i8*, i8** %4
%20 = call i64 @strlen(i8* %19)
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
ret void
}

LLVM IR (-O2):
define void @copyString(i8** nocapture %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = trunc i64 %3 to i32
%5 = add i32 %4, 1
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %0
%8 = tail call i32 @strcpy(i8* %7, i8* %1)
%9 = load i8*, i8** %0
%10 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8 0, i8* %11
ret void
}
void fa43(void) {
P0A:
  goto P0A;
  ({
    a:
      ({
        P012A:
          goto P012A;
          0;
      });
    p01B:
      goto p01B;
      goto a;
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa43>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa43+0x4>

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

LLVM IR (-O0):
define void @fa43() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %8
br label %10
10: ; preds = %10, %9
br label %10
11: ; preds = %11
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa43() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(unsigned long, unsigned char, int);
int /*<<< orphan*/ GPIOPadConfigSet(unsigned long, unsigned char, int, int);
void GPIOPinTypeCAN(unsigned long ulPort, unsigned char ucPins) {
  ;
  GPIODirModeSet(ulPort, ucPins, 0x00000002);
  GPIOPadConfigSet(ulPort, ucPins, 0x00000004, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeCAN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%edx
movzbl -0x9(%rbp),%esi
call   1040 <GPIODirModeSet@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%edx
mov    $0x8,%ecx
movzbl -0x9(%rbp),%esi
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeCAN>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeCAN(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
%6 = load i8, i8* %4
%7 = call i32 @GPIODirModeSet(i64 %5, i8 zeroext %6, i32 2)
%8 = load i64, i64* %3
%9 = load i8, i8* %4
%10 = call i32 @GPIOPadConfigSet(i64 %8, i8 zeroext %9, i32 4, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeCAN(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @GPIODirModeSet(i64 %0, i8 zeroext %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i64 %0, i8 zeroext %1, i32 4, i32 8)
ret void
}
OP(ed, c2) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
void INI_Char_TYPE() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_Char_TYPE() {
ret void
}
/* Type definitions */
struct useradd_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int useradd_cmdline_parser_required(struct useradd_args_info *args_info,
                                    const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<useradd_cmdline_parser_required>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<useradd_cmdline_parser_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.useradd_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @useradd_cmdline_parser_required(%struct.useradd_args_info* %0, i8* %1) {
%3 = alloca %struct.useradd_args_info*
%4 = alloca i8*
store %struct.useradd_args_info* %0, %struct.useradd_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.useradd_args_info*, %struct.useradd_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.useradd_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @useradd_cmdline_parser_required(%struct.useradd_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
void frac_init() {}


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

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

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

LLVM IR (-O2):
define void @frac_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void callByVal(int x, int y) {
  int t = x;
  x = y;
  y = t;
  printf("From call by value\n");
  printf("x=%d\ty=%d\n", x, y);
}


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

x86 assembly (clang, -O2):
<callByVal>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"From call by value\0A\00"
@.str.1 = [11 x i8] c"x=%d\09y=%d\0A\00"
define void @callByVal(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %5
store i32 %8, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"x=%d\09y=%d\0A\00"
@str = [19 x i8] c"From call by value\00"
define void @callByVal(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
int test_imm_2Eint8_mem(signed char *val) {
  return ((*val) & (0x2E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_2Eint8_mem>:
testb  $0x2e,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Eint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 46
%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_2Eint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 46
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double dmean(double const *, int);
double qnorm(double, int /*<<< orphan*/, int);
double standard_deviation(double const *, int, double);
double boot_ci_norm2(const double *thetas, int n, double theta_hat, double q) {
  double mean = dmean(thetas, n);
  double s = standard_deviation(thetas, n, mean);
  return theta_hat + qnorm(q, 0, 1) * s;
}


x86 assembly (clang, -O0):
<boot_ci_norm2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <dmean@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x28(%rbp),%xmm0
call   1030 <standard_deviation@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <qnorm@plt>
movsd  -0x38(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boot_ci_norm2>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <dmean@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <standard_deviation@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <qnorm@plt>
mulsd  (%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @boot_ci_norm2(double* %0, i32 %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double*, double** %5
%12 = load i32, i32* %6
%13 = call double @dmean(double* %11, i32 %12)
store double %13, double* %9
%14 = load double*, double** %5
%15 = load i32, i32* %6
%16 = load double, double* %9
%17 = call double @standard_deviation(double* %14, i32 %15, double %16)
store double %17, double* %10
%18 = load double, double* %7
%19 = load double, double* %8
%20 = call double @qnorm(double %19, i32 0, i32 1)
%21 = load double, double* %10
%22 = call double @llvm.fmuladd.f64(double %20, double %21, double %18)
ret double %22
}

LLVM IR (-O2):
define double @boot_ci_norm2(double* %0, i32 %1, double %2, double %3) {
%5 = tail call double @dmean(double* %0, i32 %1)
%6 = tail call double @standard_deviation(double* %0, i32 %1, double %5)
%7 = tail call double @qnorm(double %3, i32 0, i32 1)
%8 = tail call double @llvm.fmuladd.f64(double %7, double %6, double %2)
ret double %8
}
/* Variables and functions */
char *strchr(char *, char);
int at_tok_start(char **p_cur) {
  if (*p_cur == NULL)
    return -1;
  *p_cur = strchr(*p_cur, ':');
  if (*p_cur == NULL)
    return -1;
  (*p_cur)++;
  return 0;
}


x86 assembly (clang, -O0):
<at_tok_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1136 <at_tok_start+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <at_tok_start+0x70>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    116b <at_tok_start+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <at_tok_start+0x70>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<at_tok_start>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    $0xffffffff,%ebp
test   %rdi,%rdi
je     113e <at_tok_start+0x2e>
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     113e <at_tok_start+0x2e>
add    $0x1,%rax
mov    %rax,(%rbx)
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @at_tok_start(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %21
8: ; preds = %1
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = call i8* @strchr(i8* %10, i8 signext 58)
%12 = load i8**, i8*** %3
store i8* %11, i8** %12
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %8
store i32 -1, i32* %2
br label %21
17: ; preds = %8
%18 = load i8**, i8*** %3
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
store i32 0, i32* %2
br label %21
21: ; preds = %17, %16, %7
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @at_tok_start(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i8* @strchr(i8* %2, i8 signext 58)
store i8* %5, i8** %0
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %8, i8** %0
br label %9
9: ; preds = %4, %1, %7
%10 = phi i32 [ 0, %7 ], [ -1, %1 ], [ -1, %4 ]
ret i32 %10
}
int do_034() { return 34; }


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

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

LLVM IR (-O0):
define i32 @do_034() {
ret i32 34
}

LLVM IR (-O2):
define i32 @do_034() {
ret i32 34
}
void px_put_long_le(char *cp, long lval) {
  *cp++ = lval & 0xff;
  *cp++ = (lval >> 8) & 0xff;
  *cp++ = (lval >> 16) & 0xff;
  *cp++ = (lval >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<px_put_long_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @px_put_long_le(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 = and i64 %5, 255
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
store i8 %7, i8* %8
%10 = load i64, i64* %4
%11 = ashr i64 %10, 8
%12 = and i64 %11, 255
%13 = trunc i64 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %3
store i8 %13, i8* %14
%16 = load i64, i64* %4
%17 = ashr i64 %16, 16
%18 = and i64 %17, 255
%19 = trunc i64 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
store i8 %19, i8* %20
%22 = load i64, i64* %4
%23 = ashr i64 %22, 24
%24 = and i64 %23, 255
%25 = trunc i64 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %3
store i8 %25, i8* %26
ret void
}

LLVM IR (-O2):
define void @px_put_long_le(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %0
%5 = lshr i64 %1, 8
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %4
%8 = lshr i64 %1, 16
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %9, i8* %7
%11 = lshr i64 %1, 24
%12 = trunc i64 %11 to i8
store i8 %12, i8* %10
ret void
}
void _fini_regions() {}


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

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

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

LLVM IR (-O2):
define void @_fini_regions() {
ret void
}
void av_vbprintf() {}


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

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

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

LLVM IR (-O2):
define void @av_vbprintf() {
ret void
}
int whichPluralForm_zh_cn(int n) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @whichPluralForm_zh_cn(i32 %0) {
ret i32 0
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = input[0UL] + 4284877637U;
    local1 = 0UL;
    while (local1 < 0U) {
      local2 = 0UL;
      while (local2 < 0U) {
        state[local1] = state[0UL] * state[0UL];
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - 935265151U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xff660b45,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jae    1168 <RandomFunc+0x68>
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jae    1159 <RandomFunc+0x59>
mov    -0x14(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %ecx,-0x14(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1132 <RandomFunc+0x32>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1121 <RandomFunc+0x21>
mov    -0x14(%rbp),%ecx
sub    $0x37bf037f,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xc7a707c6,%eax
add    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = add i32 %10, -10089659
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %11, i32* %12
store i32 0, i32* %7
br label %13
13: ; preds = %33, %2
%14 = load i32, i32* %7
%15 = icmp ult i32 %14, 0
br i1 %15, label %16, label %38
16: ; preds = %13
store i32 0, i32* %6
br label %17
17: ; preds = %20, %16
%18 = load i32, i32* %6
%19 = icmp ult i32 %18, 0
br i1 %19, label %20, label %33
20: ; preds = %17
%21 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%22 = load i32, i32* %21
%23 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%24 = load i32, i32* %23
%25 = mul i32 %22, %24
%26 = load i32, i32* %7
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 %27
store i32 %25, i32* %28
%29 = load i32, i32* %6
%30 = zext i32 %29 to i64
%31 = add i64 %30, 2
%32 = trunc i64 %31 to i32
store i32 %32, i32* %6
br label %17
33: ; preds = %17
%34 = load i32, i32* %7
%35 = zext i32 %34 to i64
%36 = add i64 %35, 2
%37 = trunc i64 %36 to i32
store i32 %37, i32* %7
br label %13
38: ; preds = %13
%39 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%40 = load i32, i32* %39
%41 = sub i32 %40, 935265151
%42 = load i32*, i32** %4
%43 = getelementptr inbounds i32, i32* %42, i64 0
store i32 %41, i32* %43
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, -945354810
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int sanders_printf(char const *);
int sanders_print(const char *string) { return sanders_printf(string); }


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

x86 assembly (clang, -O2):
<sanders_print>:
jmp    1030 <sanders_printf@plt>

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

LLVM IR (-O2):
define i32 @sanders_print(i8* %0) {
%2 = tail call i32 @sanders_printf(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mvaddch(int, int, int);
void curses_show_char(int y, int x, int ch) { mvaddch(y, x, ch); }


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

x86 assembly (clang, -O2):
<curses_show_char>:
jmp    1030 <mvaddch@plt>

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

LLVM IR (-O2):
define void @curses_show_char(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mvaddch(i32 %0, i32 %1, i32 %2)
ret void
}
void rcu_quiescent_state(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_quiescent_state() {
ret void
}
/* Type definitions */
struct inode_type {
  int dummy;
};
typedef int int32_t;

/* Variables and functions */
int32_t romfs_destroy_inode(struct inode_type *inode) { return -30; }


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

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

LLVM IR (-O0):
%struct.inode_type = type { i32 }
define i32 @romfs_destroy_inode(%struct.inode_type* %0) {
%2 = alloca %struct.inode_type*
store %struct.inode_type* %0, %struct.inode_type** %2
ret i32 -30
}

LLVM IR (-O2):
%struct.inode_type = type { i32 }
define i32 @romfs_destroy_inode(%struct.inode_type* nocapture readnone %0) {
ret i32 -30
}
int pthread_cond_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_cond_init() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ list;

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int foo(char *list[5]) {
  puts(list[0]);
  puts(list[1]);
  return sizeof(list[6]);
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rdi
call   1030 <puts@plt>
mov    $0x8,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @foo(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @puts(i8* dereferenceable(1) %2)
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ Q_add(char *);
int /*<<< orphan*/ Q_clear();
void *thread2(void *arg) {
  Q_add("data 5");
  Q_add("data 6");
  Q_add("data 7");
  Q_add("data 8");
  Q_add("data 9");
  Q_clear();
  return NULL;
}


x86 assembly (clang, -O0):
<thread2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xec8(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xec3(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xebe(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xeb9(%rip),%rdi
call   1030 <Q_add@plt>
mov    $0x0,%al
call   1040 <Q_clear@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread2>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xed3(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xece(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xec9(%rip),%rdi
call   1030 <Q_add@plt>
lea    0xec4(%rip),%rdi
call   1030 <Q_add@plt>
xor    %eax,%eax
call   1040 <Q_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"data 5\00"
@.str.1 = [7 x i8] c"data 6\00"
@.str.2 = [7 x i8] c"data 7\00"
@.str.3 = [7 x i8] c"data 8\00"
@.str.4 = [7 x i8] c"data 9\00"
define i8* @thread2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 (...) @Q_clear()
ret i8* null
}

LLVM IR (-O2):
@.str = [7 x i8] c"data 5\00"
@.str.1 = [7 x i8] c"data 6\00"
@.str.2 = [7 x i8] c"data 7\00"
@.str.3 = [7 x i8] c"data 8\00"
@.str.4 = [7 x i8] c"data 9\00"
define noalias i8* @thread2(i8* nocapture readnone %0) {
%2 = tail call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @Q_add(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 (...) @Q_clear()
ret i8* null
}
int ispdfws(char encoded) {
  if (encoded == 0x00 || encoded == 0x09 || encoded == 0x0A ||
      encoded == 0x0C || encoded == 0x0D || encoded == 0x20)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<ispdfws>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
je     1158 <ispdfws+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1158 <ispdfws+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1158 <ispdfws+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xc,%eax
je     1158 <ispdfws+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
je     1158 <ispdfws+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1164 <ispdfws+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <ispdfws+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispdfws>:
cmp    $0x20,%dil
ja     1120 <ispdfws+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100003601,%rdx
bt     %rcx,%rdx
jae    1120 <ispdfws+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ispdfws(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 eq i32 %5, 0
br i1 %6, label %27, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %27, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 10
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 12
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 13
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 32
br i1 %26, label %27, label %28
27: ; preds = %23, %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %29
28: ; preds = %23
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @ispdfws(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 13, label %3
i8 12, label %3
i8 10, label %3
i8 9, label %3
i8 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
char *directory_get_lock_prefix(struct _directory *_dir) {
  char *result = "lock_lazy";
  return result;
}


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

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

LLVM IR (-O0):
%struct._directory = type opaque
@.str = [10 x i8] c"lock_lazy\00"
define i8* @directory_get_lock_prefix(%struct._directory* %0) {
%2 = alloca %struct._directory*
%3 = alloca i8*
store %struct._directory* %0, %struct._directory** %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
ret i8* %4
}

LLVM IR (-O2):
%struct._directory = type opaque
@.str = [10 x i8] c"lock_lazy\00"
define i8* @directory_get_lock_prefix(%struct._directory* nocapture readnone %0) {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, int);
int /*<<< orphan*/ uart_wait_to_tx_byte();
int /*<<< orphan*/ uart_wait_until_sent();
void uart_tx_byte(unsigned char data) {
  uart_wait_to_tx_byte();
  outb(data, 0x3f8 + 0x00);
  uart_wait_until_sent();
}


x86 assembly (clang, -O0):
<uart_tx_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <uart_wait_to_tx_byte@plt>
mov    $0x3f8,%esi
movzbl -0x1(%rbp),%edi
call   1030 <outb@plt>
mov    $0x0,%al
call   1040 <uart_wait_until_sent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_tx_byte>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <uart_wait_to_tx_byte@plt>
mov    %ebx,%edi
mov    $0x3f8,%esi
call   1030 <outb@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <uart_wait_until_sent@plt>

LLVM IR (-O0):
define void @uart_tx_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @uart_wait_to_tx_byte()
%4 = load i8, i8* %2
%5 = call i32 @outb(i8 zeroext %4, i32 1016)
%6 = call i32 (...) @uart_wait_until_sent()
ret void
}

LLVM IR (-O2):
define void @uart_tx_byte(i8 zeroext %0) {
%2 = tail call i32 (...) @uart_wait_to_tx_byte()
%3 = tail call i32 @outb(i8 zeroext %0, i32 1016)
%4 = tail call i32 (...) @uart_wait_until_sent()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dectobase(char *, int, int);
int main() {
  char str[100];
  int x = 10245445;
  int base = 16;
  dectobase(str, x, base);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x9c5545,-0x74(%rbp)
movl   $0x10,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x74(%rbp),%esi
mov    -0x78(%rbp),%edx
call   1030 <dectobase@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
mov    %rsp,%rdi
mov    $0x9c5545,%esi
mov    $0x10,%edx
call   1030 <dectobase@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = alloca i32
store i32 10245445, i32* %2
store i32 16, i32* %3
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @dectobase(i8* %4, i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @dectobase(i8* %2, i32 10245445, i32 16)
ret i32 0
}
/* Variables and functions */
void evtag_init(void) {}


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

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

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

LLVM IR (-O2):
define void @evtag_init() {
ret void
}
long set_cursor(string)
char *string[];
{
  long px, py;
  if (sscanf(*string, "%d %d", &px, &py) != 2)
    return (0);
  if (!char_setcursor(px, py))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec6(%rip),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <sscanf@plt>
cmp    $0x2,%eax
je     115f <set_cursor+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    118c <set_cursor+0x6c>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <char_setcursor@plt>
cmp    $0x0,%eax
jne    1184 <set_cursor+0x64>
movq   $0x0,-0x8(%rbp)
jmp    118c <set_cursor+0x6c>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cursor>:
push   %rbx
sub    $0x10,%rsp
mov    (%rdi),%rdi
lea    0xed1(%rip),%rsi
xor    %ebx,%ebx
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
xor    %eax,%eax
call   1030 <sscanf@plt>
cmp    $0x2,%eax
jne    115c <set_cursor+0x3c>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
xor    %eax,%eax
call   1040 <char_setcursor@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i64 @set_cursor(i8** nocapture %0) {
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = load i8*, i8** %0
%7 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i64, i64* %2
%11 = load i64, i64* %3
%12 = call i32 (i64, i64, ...) bitcast (i32 (...)* @char_setcursor to i32 (i64, i64, ...)*)(i64 %10, i64 %11)
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
br label %15
15: ; preds = %9, %1
%16 = phi i64 [ 0, %1 ], [ %14, %9 ]
ret i64 %16
}
/* Type definitions */
struct cmdline_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int cmdline_args_required(struct cmdline_args_info *args_info,
                          const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<cmdline_args_required>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdline_args_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.cmdline_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @cmdline_args_required(%struct.cmdline_args_info* %0, i8* %1) {
%3 = alloca %struct.cmdline_args_info*
%4 = alloca i8*
store %struct.cmdline_args_info* %0, %struct.cmdline_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.cmdline_args_info*, %struct.cmdline_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.cmdline_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @cmdline_args_required(%struct.cmdline_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Josephus(int, int, int);
int main() {
  Josephus(1, 10, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x4,%edx
call   1030 <Josephus@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x4,%edx
call   1030 <Josephus@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @Josephus(i32 1, i32 10, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @Josephus(i32 1, i32 10, i32 4)
ret i32 0
}
int oof(int n) { return n + 1; }


x86 assembly (clang, -O0):
<oof>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oof>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @oof(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int nargv_field_seperator(char seperator) {
  if (seperator <= 32)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<nargv_field_seperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jg     1123 <nargv_field_seperator+0x23>
movl   $0x1,-0x4(%rbp)
jmp    112a <nargv_field_seperator+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nargv_field_seperator>:
xor    %eax,%eax
cmp    $0x21,%dil
setl   %al
ret

LLVM IR (-O0):
define i32 @nargv_field_seperator(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 sle i32 %5, 32
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @nargv_field_seperator(i8 signext %0) {
%2 = icmp slt i8 %0, 33
%3 = zext i1 %2 to i32
ret i32 %3
}