xunge/DecIR huggingface dataset:
/* Variables and functions */
char *asciiToBin(char *);
unsigned char *binToChar(char *);
int /*<<< orphan*/ free(char *);
char *strSanitizer(char *);
unsigned char *userInput_to_data(char *userInput) {
  char *userInput_clean = strSanitizer(userInput);
  char *userInput_binary = asciiToBin(userInput_clean);
  unsigned char *userInput_data = binToChar(userInput_binary);
  free(userInput);
  free(userInput_clean);
  free(userInput_binary);
  return userInput_data;
}


x86 assembly (clang, -O0):
<userInput_to_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strSanitizer@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <asciiToBin@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <binToChar@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<userInput_to_data>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
call   1060 <strSanitizer@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   1040 <asciiToBin@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <binToChar@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @userInput_to_data(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @strSanitizer(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i8* @asciiToBin(i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i8* @binToChar(i8* %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %2
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %3
%15 = call i32 @free(i8* %14)
%16 = load i8*, i8** %4
%17 = call i32 @free(i8* %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @userInput_to_data(i8* %0) {
%2 = tail call i8* @strSanitizer(i8* %0)
%3 = tail call i8* @asciiToBin(i8* %2)
%4 = tail call i8* @binToChar(i8* %3)
%5 = tail call i32 @free(i8* %0)
%6 = tail call i32 @free(i8* %2)
%7 = tail call i32 @free(i8* %3)
ret i8* %4
}
/* Variables and functions */
char *strings_trim_imp(char *, int);
char *strings_trim(char *string) { return strings_trim_imp(string, 3); }


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

x86 assembly (clang, -O2):
<strings_trim>:
mov    $0x3,%esi
jmp    1030 <strings_trim_imp@plt>

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

LLVM IR (-O2):
define i8* @strings_trim(i8* %0) {
%2 = tail call i8* @strings_trim_imp(i8* %0, i32 3)
ret i8* %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_mod_uint32_t(uint32_t m) { printf("K:=GF(%u);\n", m); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"K:=GF(%u);\0A\00"
define void @print_mod_uint32_t(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int my_exit(char **args) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @my_exit(i8** nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, World!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ panic_if_greater_than_10(unsigned int);
unsigned add_small_numbers(unsigned a, unsigned b) {
  unsigned c = a + b;
  panic_if_greater_than_10(c);
  return c;
}


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

x86 assembly (clang, -O2):
<add_small_numbers>:
push   %rbx
lea    (%rdi,%rsi,1),%ebx
mov    %ebx,%edi
call   1030 <panic_if_greater_than_10@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @add_small_numbers(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
%7 = load i32, i32* %4
%8 = add i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @panic_if_greater_than_10(i32 %9)
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @add_small_numbers(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = tail call i32 @panic_if_greater_than_10(i32 %3)
ret i32 %3
}
/* Variables and functions */
int DBL_MIN_EXP;
int minexponentdbl_(double x) { return DBL_MIN_EXP; }


x86 assembly (clang, -O0):
<minexponentdbl_>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed8(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@DBL_MIN_EXP = global i32 0
define i32 @minexponentdbl_(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i32, i32* @DBL_MIN_EXP
ret i32 %3
}

LLVM IR (-O2):
@DBL_MIN_EXP = global i32 0
define i32 @minexponentdbl_(double %0) {
%2 = load i32, i32* @DBL_MIN_EXP
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int fork();
int do_fork(void) {
  int status = 0;
  switch (fork()) {
  case 0:
    break;
  case -1:
    status = -1;
    break;
  default:
    _exit(0);
  }
  return status;
}


x86 assembly (clang, -O0):
<do_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0xffffffff,%eax
je     115e <do_fork+0x3e>
jmp    1149 <do_fork+0x29>
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    116a <do_fork+0x4a>
jmp    1159 <do_fork+0x39>
jmp    1171 <do_fork+0x51>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <do_fork+0x51>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_fork>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %eax,%eax
je     1136 <do_fork+0x16>
cmp    $0xffffffff,%eax
jne    1138 <do_fork+0x18>
mov    $0xffffffff,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @do_fork() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fork()
switch i32 %2, label %5 [
i32 0, label %3
i32 -1, label %4
]
3: ; preds = %0
br label %7
4: ; preds = %0
store i32 -1, i32* %1
br label %7
5: ; preds = %0
%6 = call i32 @_exit(i32 0)
unreachable
7: ; preds = %4, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @do_fork() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %3 [
i32 0, label %5
i32 -1, label %2
]
2: ; preds = %0
br label %5
3: ; preds = %0
%4 = tail call i32 @_exit(i32 0)
unreachable
5: ; preds = %2, %0
%6 = phi i32 [ -1, %2 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
float pow(float, double);
float convert_srgb_to_linear_rgb(float x) {
  if (x < 255.0f * 0.04045f) {
    return x * (1.0f / (255.0f * 12.92f));
  } else {
    return pow((x + 255.0f * 0.055) * (1.0 / (255.0f * 1.055f)), 2.4);
  }
}


x86 assembly (clang, -O0):
<convert_srgb_to_linear_rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1146 <convert_srgb_to_linear_rgb+0x36>
movss  0xecd(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117d <convert_srgb_to_linear_rgb+0x6d>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xead(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe95(%rip),%xmm1
call   1030 <pow@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_srgb_to_linear_rgb>:
movss  0xee8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1126 <convert_srgb_to_linear_rgb+0x16>
mulss  0xedf(%rip),%xmm0
ret
cvtss2sd %xmm0,%xmm0
addsd  0xed6(%rip),%xmm0
mulsd  0xed6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @convert_srgb_to_linear_rgb(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0x4024A126E0000000
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %3
%8 = fmul float %7, 0x3F33E45660000000
store float %8, float* %2
br label %16
9: ; preds = %1
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fadd double %11, 1.402500e+01
%13 = fmul double %12, 0x3F6E736139D053D3
%14 = fptrunc double %13 to float
%15 = call float @pow(float %14, double 2.400000e+00)
store float %15, float* %2
br label %16
16: ; preds = %9, %6
%17 = load float, float* %2
ret float %17
}

LLVM IR (-O2):
define float @convert_srgb_to_linear_rgb(float %0) {
%2 = fcmp olt float %0, 0x4024A126E0000000
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = fmul float %0, 0x3F33E45660000000
br label %11
5: ; preds = %1
%6 = fpext float %0 to double
%7 = fadd double %6, 1.402500e+01
%8 = fmul double %7, 0x3F6E736139D053D3
%9 = fptrunc double %8 to float
%10 = tail call float @pow(float %9, double 2.400000e+00)
br label %11
11: ; preds = %5, %3
%12 = phi float [ %4, %3 ], [ %10, %5 ]
ret float %12
}
/* Type definitions */
struct inputfile {
  int dummy;
};

/* Variables and functions */
char const *get_token_white_char(struct inputfile *, char);
const char *get_token_table_end(struct inputfile *inf) {
  return get_token_white_char(inf, '}');
}


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

x86 assembly (clang, -O2):
<get_token_table_end>:
mov    $0x7d,%esi
jmp    1030 <get_token_white_char@plt>

LLVM IR (-O0):
%struct.inputfile = type { i32 }
define i8* @get_token_table_end(%struct.inputfile* %0) {
%2 = alloca %struct.inputfile*
store %struct.inputfile* %0, %struct.inputfile** %2
%3 = load %struct.inputfile*, %struct.inputfile** %2
%4 = call i8* @get_token_white_char(%struct.inputfile* %3, i8 signext 125)
ret i8* %4
}

LLVM IR (-O2):
%struct.inputfile = type { i32 }
define i8* @get_token_table_end(%struct.inputfile* %0) {
%2 = tail call i8* @get_token_white_char(%struct.inputfile* %0, i8 signext 125)
ret i8* %2
}
/* Variables and functions */
int f(int *const);
int main(void) {
  int x = 5;
  int *const p = &x;
  return f(p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = call i32 @f(i32* %1)
ret i32 %3
}
int one_nine() { return 36; }


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

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

LLVM IR (-O0):
define i32 @one_nine() {
ret i32 36
}

LLVM IR (-O2):
define i32 @one_nine() {
ret i32 36
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ printf(char *, char *);
int usage(char **argv) {
  printf("\nUsage:\t%s -q -f config_file program_name [arguments]\n"
         "\t-q makes proxychains quiet - this overrides the config setting\n"
         "\t-f allows one to manually specify a configfile to use\n"
         "\tfor example : proxychains telnet somehost.com\n"
         "More help in README file\n\n",
         argv[0]);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    (%rdi),%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [247 x i8] c"\0AUsage:\09%s -q -f config_file program_name [arguments]\0A\09-q makes proxychains quiet - this overrides the config setting\0A\09-f allows one to manually specify a configfile to use\0A\09for example : proxychains telnet somehost.com\0AMore help in README file\0A\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(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 @printf(i8* getelementptr inbounds ([247 x i8], [247 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
ret i32 %7
}

LLVM IR (-O2):
@.str = [247 x i8] c"\0AUsage:\09%s -q -f config_file program_name [arguments]\0A\09-q makes proxychains quiet - this overrides the config setting\0A\09-f allows one to manually specify a configfile to use\0A\09for example : proxychains telnet somehost.com\0AMore help in README file\0A\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([247 x i8], [247 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __softboundmpx_store_return_metadata(void *, void *);
char *strtok(char *, char const *);
__attribute__((__weak__, __always___)) char *
softboundmpx_strtok(char *str, const char *delim) {
  char *ret_ptr = strtok(str, delim);
  size_t value = 1;
  value = value << 48;
  __softboundmpx_store_return_metadata((void *)0, (void *)(value));
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_strtok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strtok@plt>
mov    %rax,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x30,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_strtok>:
push   %rbx
call   1030 <strtok@plt>
mov    %rax,%rbx
movabs $0x1000000000000,%rsi
xor    %edi,%edi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_strtok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @strtok(i8* %7, i8* %8)
store i8* %9, i8** %5
store i64 1, i64* %6
%10 = load i64, i64* %6
%11 = shl i64 %10, 48
store i64 %11, i64* %6
%12 = load i64, i64* %6
%13 = inttoptr i64 %12 to i8*
%14 = call i32 @__softboundmpx_store_return_metadata(i8* null, i8* %13)
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define weak i8* @softboundmpx_strtok(i8* %0, i8* %1) {
%3 = tail call i8* @strtok(i8* %0, i8* %1)
%4 = tail call i32 @__softboundmpx_store_return_metadata(i8* null, i8* inttoptr (i64 281474976710656 to i8*))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int print_usage();
int /*<<< orphan*/ stderr;
int unknown(char **args) {
  fprintf(stderr, "\n** unknown command '%s' **\n\n", args[0]);
  return print_usage();
}


x86 assembly (clang, -O0):
<unknown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <print_usage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unknown>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xecc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_usage@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"\0A** unknown command '%s' **\0A\0A\00"
define i32 @unknown(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 (...) @print_usage()
ret i32 %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"\0A** unknown command '%s' **\0A\0A\00"
define i32 @unknown(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 (...) @print_usage()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ lp_iconfig(char *);
time_t lp_last_activity() { return (time_t)lp_iconfig("last_act"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"last_act\00"
define i32 @lp_last_activity() {
%1 = tail call i32 @lp_iconfig(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mpga_clear_id(uint8_t *p_mpga) { p_mpga[1] &= ~0x08; }


x86 assembly (clang, -O0):
<mpga_clear_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
and    $0xfffffff7,%ecx
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpga_clear_id>:
andb   $0xf7,0x4(%rdi)
ret

LLVM IR (-O0):
define void @mpga_clear_id(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, -9
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @mpga_clear_id(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = and i32 %3, -9
store i32 %4, i32* %2
ret void
}
/* Type definitions */
struct pstack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pstack *);
void pstack__delete(struct pstack *self) { free(self); }


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

x86 assembly (clang, -O2):
<pstack__delete>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.pstack = type { i32 }
define void @pstack__delete(%struct.pstack* %0) {
%2 = alloca %struct.pstack*
store %struct.pstack* %0, %struct.pstack** %2
%3 = load %struct.pstack*, %struct.pstack** %2
%4 = call i32 @free(%struct.pstack* %3)
ret void
}

LLVM IR (-O2):
%struct.pstack = type { i32 }
define void @pstack__delete(%struct.pstack* nocapture %0) {
%2 = tail call i32 @free(%struct.pstack* %0)
ret void
}
/* Type definitions */
struct json_object {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ json_object_new_int(int);
int /*<<< orphan*/ json_object_path_set(struct json_object *, char const *,
                                        int /*<<< orphan*/);
void json_object_path_set_int(struct json_object *jso, const char *path,
                              int i) {
  json_object_path_set(jso, path, json_object_new_int(i));
}


x86 assembly (clang, -O0):
<json_object_path_set_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <json_object_new_int@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <json_object_path_set@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_object_path_set_int>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%edi
call   1040 <json_object_new_int@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <json_object_path_set@plt>

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

LLVM IR (-O2):
%struct.json_object = type { i32 }
define void @json_object_path_set_int(%struct.json_object* %0, i8* %1, i32 %2) {
%4 = tail call i32 @json_object_new_int(i32 %2)
%5 = tail call i32 @json_object_path_set(%struct.json_object* %0, i8* %1, i32 %4)
ret void
}
int ntp_validate_timex(struct timex *txc) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.timex = type opaque
define i32 @ntp_validate_timex(%struct.timex* nocapture readnone %0) {
ret i32 0
}
extern void libvamphostsdk_v_2_3_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvamphostsdk_v_2_3_present() {
ret void
}
/* Variables and functions */
int pause();
void test(void) {
  int result;
  result = pause();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <pause@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = call i32 (...) @pause()
store i32 %2, i32* %1
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @pause()
ret void
}
void myprintf(const char *a) {}


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

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

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

LLVM IR (-O2):
define void @myprintf(i8* nocapture %0) {
ret void
}
int val_index_pos(int *index, double *val, int n, double compare) {
  int i;
  for (i = 0; i < n; i++) {
    if (compare >= val[index[i]])
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<val_index_pos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115f <val_index_pos+0x5f>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x24(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     114c <val_index_pos+0x4c>
jmp    115f <val_index_pos+0x5f>
jmp    1151 <val_index_pos+0x51>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111b <val_index_pos+0x1b>
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<val_index_pos>:
test   %edx,%edx
jle    1127 <val_index_pos+0x27>
mov    %edx,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movslq (%rdi,%rax,4),%rdx
ucomisd (%rsi,%rdx,8),%xmm0
jae    1126 <val_index_pos+0x26>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <val_index_pos+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @val_index_pos(i32* %0, double* %1, i32 %2, double %3) {
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
store i32* %0, i32** %5
store double* %1, double** %6
store i32 %2, i32* %7
store double %3, double* %8
store i32 0, i32* %9
br label %10
10: ; preds = %28, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %7
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %31
14: ; preds = %10
%15 = load double, double* %8
%16 = load double*, double** %6
%17 = load i32*, i32** %5
%18 = load i32, i32* %9
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %16, i64 %22
%24 = load double, double* %23
%25 = fcmp oge double %15, %24
br i1 %25, label %26, label %27
26: ; preds = %14
br label %31
27: ; preds = %14
br label %28
28: ; preds = %27
%29 = load i32, i32* %9
%30 = add nsw i32 %29, 1
store i32 %30, i32* %9
br label %10
31: ; preds = %26, %10
%32 = load i32, i32* %9
ret i32 %32
}

LLVM IR (-O2):
define i32 @val_index_pos(i32* nocapture %0, double* nocapture %1, i32 %2, double %3) {
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %21
6: ; preds = %4
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %6, %16
%9 = phi i64 [ 0, %6 ], [ %17, %16 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %1, i64 %12
%14 = load double, double* %13
%15 = fcmp ugt double %14, %3
br i1 %15, label %16, label %19
16: ; preds = %8
%17 = add nuw nsw i64 %9, 1
%18 = icmp eq i64 %17, %7
br i1 %18, label %21, label %8
19: ; preds = %8
%20 = trunc i64 %9 to i32
br label %21
21: ; preds = %16, %19, %4
%22 = phi i32 [ 0, %4 ], [ %20, %19 ], [ %2, %16 ]
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage: "
          "sg_chk_asc [--help] [--verbose] [--version] <asc_ascq_file>\n"
          "  where: --help|-h          print out usage message\n"
          "         --verbose|-v       increase verbosity\n"
          "         --version|-V       print version string and exit\n\n"
          "Checks asc/ascq codes in <asc_ascq_file> against the sg3_utils "
          "library.\nThe additional sense code (asc_ascq) can be found at\n"
          "www.t10.org/lists/asc-num.txt .\n");
}


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

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [383 x i8] c"Usage: sg_chk_asc [--help] [--verbose] [--version] <asc_ascq_file>\0A where: --help|-h print out usage message\0A --verbose|-v increase verbosity\0A --version|-V print version string and exit\0A\0AChecks asc/ascq codes in <asc_ascq_file> against the sg3_utils library.\0AThe additional sense code (asc_ascq) can be found at\0Awww.t10.org/lists/asc-num.txt .\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [383 x i8] c"Usage: sg_chk_asc [--help] [--verbose] [--version] <asc_ascq_file>\0A where: --help|-h print out usage message\0A --verbose|-v increase verbosity\0A --version|-V print version string and exit\0A\0AChecks asc/ascq codes in <asc_ascq_file> against the sg3_utils library.\0AThe additional sense code (asc_ascq) can be found at\0Awww.t10.org/lists/asc-num.txt .\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0))
ret void
}
int func4(int (*fn)()) { return fn(); }


x86 assembly (clang, -O0):
<func4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func4>:
xor    %eax,%eax
jmp    *%rdi

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

LLVM IR (-O2):
define i32 @func4(i32 (...)* nocapture %0) {
%2 = tail call i32 (...) %0()
ret i32 %2
}
void success_msg(int result __attribute__((unused)),
                 const char *command __attribute__((unused))) {}


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

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

LLVM IR (-O0):
define void @success_msg(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @success_msg(i32 %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alarm(int);
struct passwd *getpwnam(char *);
int /*<<< orphan*/ printf(char *);
void my_alarm(int signo) {
  struct passwd *rootptr;
  printf("in signal handler!\n");
  if ((rootptr = getpwnam("root")) == NULL) {
    printf("getpwnam(root) error\n");
    alarm(1);
  }
}


x86 assembly (clang, -O0):
<my_alarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1050 <getpwnam@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <my_alarm+0x47>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_alarm>:
push   %rax
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1050 <getpwnam@plt>
test   %rax,%rax
je     1150 <my_alarm+0x20>
pop    %rax
ret
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
%struct.passwd = type { i32 }
@.str = [20 x i8] c"in signal handler!\0A\00"
@.str.1 = [5 x i8] c"root\00"
@.str.2 = [22 x i8] c"getpwnam(root) error\0A\00"
define void @my_alarm(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.passwd*
store i32 %0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store %struct.passwd* %5, %struct.passwd** %3
%6 = icmp eq %struct.passwd* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @alarm(i32 1)
br label %10
10: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@.str.1 = [5 x i8] c"root\00"
@str = [19 x i8] c"in signal handler!\00"
@str.3 = [21 x i8] c"getpwnam(root) error\00"
define void @my_alarm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%3 = tail call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq %struct.passwd* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.3, i64 0, i64 0))
%7 = tail call i32 @alarm(i32 1)
br label %8
8: ; preds = %5, %1
ret void
}
void fade_clear() {}


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

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

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

LLVM IR (-O2):
define void @fade_clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void handler(int signal) {
  while (waitpid(-1, NULL, WNOHANG) > 0)
    ;
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    1141 <handler+0x31>
jmp    111b <handler+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <handler+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @handler(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
int containsForbiddenChars(const unsigned char *p, int len) {
  while (len > 0) {
    if (*p < ' ' || *p >= '\x7f')
      return 1;
    p++;
    len--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<containsForbiddenChars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    115b <containsForbiddenChars+0x5b>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x20,%eax
jl     1135 <containsForbiddenChars+0x35>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x7f,%eax
jl     1141 <containsForbiddenChars+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1162 <containsForbiddenChars+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    110b <containsForbiddenChars+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<containsForbiddenChars>:
xor    %eax,%eax
test   %esi,%esi
jle    1127 <containsForbiddenChars+0x27>
add    $0x1,%esi
nopl   0x0(%rax)
movzbl (%rdi),%ecx
add    $0x81,%cl
cmp    $0xa1,%cl
jb     1128 <containsForbiddenChars+0x28>
add    $0x1,%rdi
add    $0xffffffff,%esi
cmp    $0x1,%esi
jg     1110 <containsForbiddenChars+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @containsForbiddenChars(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i32, i32* %5
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp slt i32 %12, 32
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = icmp sge i32 %17, 127
br i1 %18, label %19, label %20
19: ; preds = %14, %9
store i32 1, i32* %3
br label %26
20: ; preds = %14
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %4
%23 = load i32, i32* %5
%24 = add nsw i32 %23, -1
store i32 %24, i32* %5
br label %6
25: ; preds = %6
store i32 0, i32* %3
br label %26
26: ; preds = %25, %19
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @containsForbiddenChars(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %10
%5 = phi i32 [ %12, %10 ], [ %1, %2 ]
%6 = phi i8* [ %11, %10 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = add i8 %7, -127
%9 = icmp ult i8 %8, -95
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add nsw i32 %5, -1
%13 = icmp sgt i32 %5, 1
br i1 %13, label %4, label %14
14: ; preds = %4, %10, %2
%15 = phi i32 [ 0, %2 ], [ 0, %10 ], [ 1, %4 ]
ret i32 %15
}
void func2() {}


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

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

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

LLVM IR (-O2):
define void @func2() {
ret void
}
void sigusr1_handler(int signo) {}


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

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

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

LLVM IR (-O2):
define void @sigusr1_handler(i32 %0) {
ret void
}
int IcsIsLittleEndianMachine(void) {
  int i = 1;
  char *cptr = (char *)&i;
  return (*cptr == 1);
}


x86 assembly (clang, -O0):
<IcsIsLittleEndianMachine>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @IcsIsLittleEndianMachine() {
%1 = alloca i32
%2 = alloca i8*
store i32 1, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @IcsIsLittleEndianMachine() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ radix_tree_is_internal_node(void *);
int unlikely(int /*<<< orphan*/);
int radix_tree_deref_retry(void *arg) {
  return unlikely(radix_tree_is_internal_node(arg));
}


x86 assembly (clang, -O0):
<radix_tree_deref_retry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <radix_tree_is_internal_node@plt>
mov    %eax,%edi
call   1040 <unlikely@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_tree_deref_retry>:
push   %rax
call   1030 <radix_tree_is_internal_node@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <unlikely@plt>

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

LLVM IR (-O2):
define i32 @radix_tree_deref_retry(i8* %0) {
%2 = tail call i32 @radix_tree_is_internal_node(i8* %0)
%3 = tail call i32 @unlikely(i32 %2)
ret i32 %3
}
/* Variables and functions */
int i_indx(char *, char *, int, int);
int intr_wrap_599(char *s1, char *s2, int l1, int l2) {
  return i_indx(s1, s2, l1, l2);
}


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

x86 assembly (clang, -O2):
<intr_wrap_599>:
jmp    1030 <i_indx@plt>

LLVM IR (-O0):
define i32 @intr_wrap_599(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @i_indx(i8* %9, i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @intr_wrap_599(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @i_indx(i8* %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}
float pspnxController(float input) {
  input = input - 128;
  if (input < 0)
    return input / 128;
  else
    return input / 127;
}


x86 assembly (clang, -O0):
<pspnxController>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1147 <pspnxController+0x47>
movss  -0x8(%rbp),%xmm0
movss  0xec7(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <pspnxController+0x5d>
movss  -0x8(%rbp),%xmm0
movss  0xeb0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pspnxController>:
addss  0xef8(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1119 <pspnxController+0x19>
mulss  0xef0(%rip),%xmm0
ret
divss  0xee3(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @pspnxController(float %0) {
%2 = fadd float %0, -1.280000e+02
%3 = fcmp olt float %2, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = fmul float %2, 7.812500e-03
br label %8
6: ; preds = %1
%7 = fdiv float %2, 1.270000e+02
br label %8
8: ; preds = %6, %4
%9 = phi float [ %5, %4 ], [ %7, %6 ]
ret float %9
}
int fn5(int z) { return z | ~(z | 3); }


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
or     $0x3,%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn5>:
mov    %edi,%eax
or     $0xfffffffc,%eax
ret

LLVM IR (-O0):
define i32 @fn5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = or i32 %4, 3
%6 = xor i32 %5, -1
%7 = or i32 %3, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fn5(i32 %0) {
%2 = or i32 %0, -4
ret i32 %2
}
char toLower(const char c) {
  return (c >= 'A' && c <= 'Z' ? c + 'a' - 'A' : c);
}


x86 assembly (clang, -O0):
<toLower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <toLower+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <toLower+0x36>
movsbl -0x1(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <toLower+0x3d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toLower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @toLower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fio_abs_read_32(int /*<<< orphan*/ *, long, int);
float fio_abs_read_float32(FILE *f, long offset, int is_big_endian) {
  int val;
  void *vp;
  float *p, q;
  val = fio_abs_read_32(f, offset, is_big_endian);
  vp = (void *)(&val);
  p = (float *)(vp);
  q = *p;
  return q;
}


x86 assembly (clang, -O0):
<fio_abs_read_float32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <fio_abs_read_32@plt>
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_abs_read_float32>:
push   %rax
call   1030 <fio_abs_read_32@plt>
movd   %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fio_abs_read_float32(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca float*
%10 = alloca float
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%11 = load i32*, i32** %4
%12 = load i64, i64* %5
%13 = load i32, i32* %6
%14 = call i32 @fio_abs_read_32(i32* %11, i64 %12, i32 %13)
store i32 %14, i32* %7
%15 = bitcast i32* %7 to i8*
store i8* %15, i8** %8
%16 = load i8*, i8** %8
%17 = bitcast i8* %16 to float*
store float* %17, float** %9
%18 = load float*, float** %9
%19 = load float, float* %18
store float %19, float* %10
%20 = load float, float* %10
ret float %20
}

LLVM IR (-O2):
define float @fio_abs_read_float32(i32* %0, i64 %1, i32 %2) {
%4 = tail call i32 @fio_abs_read_32(i32* %0, i64 %1, i32 %2)
%5 = bitcast i32 %4 to float
ret float %5
}
void gtk_radio_menu_item_new_with_label() {}


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

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

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

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