xunge/DecIR huggingface dataset:
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=19 REPO_URL=r3p2-01rel0 REVISION=r3p2-01rel0 "
         "CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Пн. янв. 14 12:01:25 MSK "
         "2013 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING= "
         "USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=0 "
         "MALI_UPPER_HALF_SCHEDULING=0";
}


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

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

LLVM IR (-O0):
@.str = [340 x i8] c"malidrv: API_VERSION=19 REPO_URL=r3p2-01rel0 REVISION=r3p2-01rel0 CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D0\9F\D0\BD. \D1\8F\D0\BD\D0\B2. 14 12:01:25 MSK 2013 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=0 MALI_UPPER_HALF_SCHEDULING=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [340 x i8] c"malidrv: API_VERSION=19 REPO_URL=r3p2-01rel0 REVISION=r3p2-01rel0 CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D0\9F\D0\BD. \D1\8F\D0\BD\D0\B2. 14 12:01:25 MSK 2013 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=0 MALI_UPPER_HALF_SCHEDULING=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0)
}
double u(double gamma, double C1v, double C2v) {
  double val = 0.0;
  double gsq = gamma * gamma;
  val = ((3.0 + gsq) * C1v + 2.0 * gamma * C2v) / gsq / (1.0 - gsq);
  return (val);
}


x86 assembly (clang, -O0):
<u>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xede(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xec4(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<u>:
movapd %xmm0,%xmm3
mulsd  %xmm0,%xmm3
movsd  0xef0(%rip),%xmm4
addsd  %xmm3,%xmm4
addsd  %xmm0,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm4
addsd  %xmm4,%xmm0
divsd  %xmm3,%xmm0
movsd  0xed8(%rip),%xmm1
subsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @u(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0.000000e+00, double* %7
%9 = load double, double* %4
%10 = load double, double* %4
%11 = fmul double %9, %10
store double %11, double* %8
%12 = load double, double* %8
%13 = fadd double 3.000000e+00, %12
%14 = load double, double* %5
%15 = load double, double* %4
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %6
%18 = fmul double %16, %17
%19 = call double @llvm.fmuladd.f64(double %13, double %14, double %18)
%20 = load double, double* %8
%21 = fdiv double %19, %20
%22 = load double, double* %8
%23 = fsub double 1.000000e+00, %22
%24 = fdiv double %21, %23
store double %24, double* %7
%25 = load double, double* %7
ret double %25
}

LLVM IR (-O2):
define double @u(double %0, double %1, double %2) {
%4 = fmul double %0, %0
%5 = fadd double %4, 3.000000e+00
%6 = fmul double %0, 2.000000e+00
%7 = fmul double %6, %2
%8 = tail call double @llvm.fmuladd.f64(double %5, double %1, double %7)
%9 = fdiv double %8, %4
%10 = fsub double 1.000000e+00, %4
%11 = fdiv double %9, %10
ret double %11
}
void lowlevel_gpio_rst(int id) {}


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

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

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

LLVM IR (-O2):
define void @lowlevel_gpio_rst(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *myitoa(int i) {
  static char str[12] = {0};
  sprintf(str, "%d", i);
  return str;
}


x86 assembly (clang, -O0):
<myitoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f04(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ef1(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myitoa>:
push   %rbx
mov    %edi,%edx
lea    0x2f0f(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@myitoa.str = internal global [12 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @myitoa(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @myitoa.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @myitoa.str, i64 0, i64 0)
}

LLVM IR (-O2):
@myitoa.str = internal global [12 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @myitoa(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @myitoa.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @myitoa.str, i64 0, i64 0)
}
int test_imm_3Fuint16_mem(unsigned short *val) {
  return ((*val) & (-0x3F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Fuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -63
%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_3Fuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -63
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ DIRECTORYSTRING_it;
int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &DIRECTORYSTRING_it);
}


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

x86 assembly (clang, -O2):
<i2d_DIRECTORYSTRING>:
mov    0x2ed9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@DIRECTORYSTRING_it = global i32 0
define i32 @i2d_DIRECTORYSTRING(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @DIRECTORYSTRING_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *nom) {
  printf("Usage : %s <function> <files>\n", nom);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage : %s <function> <files>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage : %s <function> <files>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getScore();
int /*<<< orphan*/ initScore();
int /*<<< orphan*/ printAverage();
int /*<<< orphan*/ removeMinMax();
int main(int argc, const char *argv[]) {
  initScore();
  getScore();
  removeMinMax();
  printAverage();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <initScore@plt>
mov    $0x0,%al
call   1040 <getScore@plt>
mov    $0x0,%al
call   1060 <removeMinMax@plt>
mov    $0x0,%al
call   1050 <printAverage@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initScore@plt>
xor    %eax,%eax
call   1040 <getScore@plt>
xor    %eax,%eax
call   1060 <removeMinMax@plt>
xor    %eax,%eax
call   1050 <printAverage@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @initScore()
%7 = call i32 (...) @getScore()
%8 = call i32 (...) @removeMinMax()
%9 = call i32 (...) @printAverage()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initScore()
%4 = tail call i32 (...) @getScore()
%5 = tail call i32 (...) @removeMinMax()
%6 = tail call i32 (...) @printAverage()
ret i32 0
}
int joy_getinfo(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @joy_getinfo() {
ret i32 0
}
void func2() { return; }


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
}
/* Variables and functions */
int /*<<< orphan*/ __glutFatalError(char *);
int /*<<< orphan*/ __glutWarning(char *);
void menuModificationError(void) {
  __glutWarning("The following is a new check for GLUT 3.0; update your code.");
  __glutFatalError("menu manipulation not allowed while menus in use.");
}


x86 assembly (clang, -O0):
<menuModificationError>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <__glutWarning@plt>
lea    0xf06(%rip),%rdi
call   1030 <__glutFatalError@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menuModificationError>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <__glutWarning@plt>
lea    0xf09(%rip),%rdi
pop    %rax
jmp    1030 <__glutFatalError@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"The following is a new check for GLUT 3.0; update your code.\00"
@.str.1 = [50 x i8] c"menu manipulation not allowed while menus in use.\00"
define void @menuModificationError() {
%1 = call i32 @__glutWarning(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @__glutFatalError(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"The following is a new check for GLUT 3.0; update your code.\00"
@.str.1 = [50 x i8] c"menu manipulation not allowed while menus in use.\00"
define void @menuModificationError() {
%1 = tail call i32 @__glutWarning(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @__glutFatalError(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ argw();
void rop_1w() { argw(); }


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

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

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

LLVM IR (-O2):
define void @rop_1w() {
%1 = tail call i32 (...) @argw()
ret void
}
/* Variables and functions */
char *strsep(char **, char *);
char *next_non_empty(char **line) {
  char *tok;
  while ((tok = strsep(line, " \t\n\r")) && !*tok)
    ;
  return tok;
}


x86 assembly (clang, -O0):
<next_non_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strsep@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1151 <next_non_empty+0x41>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1161 <next_non_empty+0x51>
jmp    1166 <next_non_empty+0x56>
jmp    111c <next_non_empty+0xc>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_non_empty>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strsep@plt>
test   %rax,%rax
je     1135 <next_non_empty+0x25>
cmpb   $0x0,(%rax)
je     1120 <next_non_empty+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c" \09\0A\0D\00"
define i8* @next_non_empty(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
br label %4
4: ; preds = %15, %1
%5 = load i8**, i8*** %2
%6 = call i8* @strsep(i8** %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %8, %4
%14 = phi i1 [ false, %4 ], [ %12, %8 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %4
16: ; preds = %13
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [5 x i8] c" \09\0A\0D\00"
define i8* @next_non_empty(i8** %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i8* @strsep(i8** %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void incorect_param() {
  fprintf(stderr, "You need enter 3 parameters:\n                         \r1. "
                  "shered memory id\n                                         "
                  "\r2. time for timer\n                                       "
                  "    \r3. size of data base\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [201 x i8] c"You need enter 3 parameters:\0A \0D1. shered memory id\0A \0D2. time for timer\0A \0D3. size of data base\0A\00"
@EXIT_FAILURE = global i32 0
define void @incorect_param() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [201 x i8] c"You need enter 3 parameters:\0A \0D1. shered memory id\0A \0D2. time for timer\0A \0D3. size of data base\0A\00"
@EXIT_FAILURE = global i32 0
define void @incorect_param() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void gtk_font_selection_dialog_set_preview_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_font_selection_dialog_set_preview_text() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x3f() {
  Assert_real((isdigit(63) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              320, ("isdigit should be 0 for ?"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x3f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x140,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x3f>:
push   %rax
mov    $0x3f,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x140,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for ?\00"
define void @t_isdigit_0x3f() {
%1 = call i64 @isdigit(i32 63)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for ?\00"
define void @t_isdigit_0x3f() {
%1 = tail call i64 @isdigit(i32 63)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_ldx();
void e_ldx_abs() {
  e_abs();
  e_ldx();
}


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

x86 assembly (clang, -O2):
<e_ldx_abs>:
push   %rax
xor    %eax,%eax
call   1040 <e_abs@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_ldx@plt>

LLVM IR (-O0):
define void @e_ldx_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_ldx()
ret void
}

LLVM IR (-O2):
define void @e_ldx_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_ldx()
ret void
}
int isHex(char c) {
  return (('a' <= c && c <= 'f') || ('A' <= c && c <= 'F') ||
          ('0' <= c && c <= '9'));
}


x86 assembly (clang, -O0):
<isHex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     112d <isHex+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <isHex+0x79>
movsbl -0x1(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1150 <isHex+0x50>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x46,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <isHex+0x79>
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jg     1173 <isHex+0x73>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHex>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x6,%al
setb   %al
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isHex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 97, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 102
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 65, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 70
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 48, %20
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @isHex(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 6
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
void rop3_155_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T | S;
  stk2 = *D & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

x86 assembly (clang, -O2):
<rop3_155_1_1>:
or     %esi,%edx
mov    (%rdi),%al
and    %dl,%al
mov    %eax,%ecx
xor    %sil,%cl
or     %dl,%cl
not    %cl
or     %al,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_155_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = load i8*, i8** %4
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = load i8, i8* %6
%54 = zext i8 %53 to i32
%55 = and i32 %52, %54
%56 = or i32 %49, %55
%57 = trunc i32 %56 to i8
%58 = load i8*, i8** %4
store i8 %57, i8* %58
ret void
}

LLVM IR (-O2):
define void @rop3_155_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = xor i8 %6, %1
%8 = or i8 %7, %4
%9 = xor i8 %8, -1
%10 = or i8 %6, %9
store i8 %10, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int chmod(const char *path __attribute__((unused)),
          mode_t mode __attribute__((unused))) {
  printf("chmod\n");
  errno = ENOSYS;
  return (-1);
}


x86 assembly (clang, -O0):
<chmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chmod>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    0x2eab(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"chmod\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @chmod(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
@str = [6 x i8] c"chmod\00"
define i32 @chmod(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
void tree_sitter_r2cmd_external_scanner_deserialize(void *payload,
                                                    const char *buffer,
                                                    unsigned length) {}


x86 assembly (clang, -O0):
<tree_sitter_r2cmd_external_scanner_deserialize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @tree_sitter_r2cmd_external_scanner_deserialize(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
double log(scalar_t__);
scalar_t__ sqr(double);
scalar_t__ sqrt(scalar_t__);
double asinh(double x) { return log(x + sqrt(1.0 + sqr(x))); }


x86 assembly (clang, -O0):
<asinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sqr@plt>
cvtsi2sd %rax,%xmm1
movsd  0xea2(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <sqrt@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinh>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <sqr@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xeb5(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1040 <log@plt>

LLVM IR (-O0):
define double @asinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call i64 @sqr(double %4)
%6 = sitofp i64 %5 to double
%7 = fadd double 1.000000e+00, %6
%8 = fptosi double %7 to i64
%9 = call i64 @sqrt(i64 %8)
%10 = sitofp i64 %9 to double
%11 = fadd double %3, %10
%12 = fptosi double %11 to i64
%13 = call double @log(i64 %12)
ret double %13
}

LLVM IR (-O2):
define double @asinh(double %0) {
%2 = tail call i64 @sqr(double %0)
%3 = sitofp i64 %2 to double
%4 = fadd double %3, 1.000000e+00
%5 = fptosi double %4 to i64
%6 = tail call i64 @sqrt(i64 %5)
%7 = sitofp i64 %6 to double
%8 = fadd double %7, %0
%9 = fptosi double %8 to i64
%10 = tail call double @log(i64 %9)
ret double %10
}
/* Type definitions */
struct iovec {
  int dummy;
};
typedef scalar_t__ ssize_t;

/* Variables and functions */
int errno;
scalar_t__ writev(int, struct iovec const *, int);
ssize_t __sulong_posix_writev(int fd, const struct iovec *iov, int iovcnt) {
  {
    int native_errno = errno;
    ssize_t result = writev(fd, iov, iovcnt);
    if (result == (ssize_t)-1) {
      result = (ssize_t)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_writev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <writev@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0xffffffffffffffff,-0x20(%rbp)
jne    115d <__sulong_posix_writev+0x4d>
xor    %eax,%eax
mov    0x2e8b(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%ecx
mov    0x2e79(%rip),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_writev>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <writev@plt>
movslq (%rbx),%rcx
neg    %rcx
cmp    $0xffffffffffffffff,%rax
cmove  %rcx,%rax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.iovec = type { i32 }
@errno = global i32 0
define i64 @__sulong_posix_writev(i32 %0, %struct.iovec* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.iovec*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %4
store %struct.iovec* %1, %struct.iovec** %5
store i32 %2, i32* %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load %struct.iovec*, %struct.iovec** %5
%12 = load i32, i32* %6
%13 = call i64 @writev(i32 %10, %struct.iovec* %11, i32 %12)
store i64 %13, i64* %8
%14 = load i64, i64* %8
%15 = icmp eq i64 %14, -1
br i1 %15, label %16, label %20
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
store i64 %19, i64* %8
br label %20
20: ; preds = %16, %3
%21 = load i32, i32* %7
store i32 %21, i32* @errno
%22 = load i64, i64* %8
ret i64 %22
}

LLVM IR (-O2):
%struct.iovec = type { i32 }
@errno = global i32 0
define i64 @__sulong_posix_writev(i32 %0, %struct.iovec* %1, i32 %2) {
%4 = load i32, i32* @errno
%5 = tail call i64 @writev(i32 %0, %struct.iovec* %1, i32 %2)
%6 = icmp eq i64 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = sext i32 %8 to i64
%10 = select i1 %6, i64 %9, i64 %5
store i32 %4, i32* @errno
ret i64 %10
}
/* Variables and functions */
int hello2(int, int);
int hello3(int, int, int);
int hello3if(int, int, int);
void hello() {
  int x;
  x = hello2(4, 5);
  *((volatile int *)0xA0000) = x;
  x = hello3(1, 2, 3);
  *((volatile int *)0xA0004) = x;
  x = hello3if(1, -2, -3);
  *((volatile int *)0xA0008) = x;
}


x86 assembly (clang, -O0):
<hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <hello2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xa0000,%eax
mov    %ecx,(%rax)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1050 <hello3@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xa0004,%eax
mov    %ecx,(%rax)
mov    $0x1,%edi
mov    $0xfffffffe,%esi
mov    $0xfffffffd,%edx
call   1040 <hello3if@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xa0008,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello>:
push   %rax
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <hello2@plt>
mov    %eax,0xa0000
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1050 <hello3@plt>
mov    %eax,0xa0004
mov    $0x1,%edi
mov    $0xfffffffe,%esi
mov    $0xfffffffd,%edx
call   1040 <hello3if@plt>
mov    %eax,0xa0008
pop    %rax
ret

LLVM IR (-O0):
define void @hello() {
%1 = alloca i32
%2 = call i32 @hello2(i32 4, i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
store volatile i32 %3, i32* inttoptr (i64 655360 to i32*)
%4 = call i32 @hello3(i32 1, i32 2, i32 3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
store volatile i32 %5, i32* inttoptr (i64 655364 to i32*)
%6 = call i32 @hello3if(i32 1, i32 -2, i32 -3)
store i32 %6, i32* %1
%7 = load i32, i32* %1
store volatile i32 %7, i32* inttoptr (i64 655368 to i32*)
ret void
}

LLVM IR (-O2):
define void @hello() {
%1 = tail call i32 @hello2(i32 4, i32 5)
store volatile i32 %1, i32* inttoptr (i64 655360 to i32*)
%2 = tail call i32 @hello3(i32 1, i32 2, i32 3)
store volatile i32 %2, i32* inttoptr (i64 655364 to i32*)
%3 = tail call i32 @hello3if(i32 1, i32 -2, i32 -3)
store volatile i32 %3, i32* inttoptr (i64 655368 to i32*)
ret void
}
int test_imm_8Duint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x8D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Duint64_midword_reg>:
test   $0x8d0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Duint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9240576
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup(char const *);
void bsg_ksstring_replace(char **dest, const char *replacement) {
  if (*dest != NULL) {
    free(*dest);
  }
  if (replacement == NULL) {
    *dest = NULL;
  } else {
    *dest = strdup(replacement);
  }
}


x86 assembly (clang, -O0):
<bsg_ksstring_replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114a <bsg_ksstring_replace+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1165 <bsg_ksstring_replace+0x45>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    1178 <bsg_ksstring_replace+0x58>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsg_ksstring_replace>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1137 <bsg_ksstring_replace+0x17>
call   1030 <free@plt>
test   %rbx,%rbx
je     1146 <bsg_ksstring_replace+0x26>
mov    %rbx,%rdi
call   1040 <strdup@plt>
jmp    1148 <bsg_ksstring_replace+0x28>
xor    %eax,%eax
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @bsg_ksstring_replace(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i8* @strdup(i8* %1)
br label %11
11: ; preds = %7, %9
%12 = phi i8* [ %10, %9 ], [ null, %7 ]
store i8* %12, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_mine(int **, int);
int set_mines(int **map, int length, int counts) {
  int i;
  for (i = 0; i < counts; i++) {
    set_mine(map, length);
  }
}


x86 assembly (clang, -O0):
<set_mines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    114f <set_mines+0x3f>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <set_mine@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1129 <set_mines+0x19>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_mines>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    1130 <set_mines+0x20>
mov    %edx,%ebx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rbp,%rdi
mov    %r14d,%esi
call   1030 <set_mine@plt>
add    $0xffffffff,%ebx
jne    1120 <set_mines+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @set_mines(i32** %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %10
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 0, %3 ]
%7 = tail call i32 @set_mine(i32** %0, i32 %1)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %2
br i1 %9, label %10, label %5
10: ; preds = %5, %3
ret i32 undef
}
char foo(int *a, char *b, char *c) {
  __builtin_memmove(c, b, a[b[0]]);
  return c[0] + b[0];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbq (%rcx),%rcx
movslq (%rax,%rcx,4),%rdx
call   1030 <memmove@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
movsbq (%rsi),%rax
movslq (%rdi,%rax,4),%rdx
mov    %r14,%rdi
call   1030 <memmove@plt>
mov    (%rbx),%al
add    (%r14),%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i8 @foo(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %5
%9 = load i32*, i32** %4
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i64
%14 = getelementptr inbounds i32, i32* %9, i64 %13
%15 = load i32, i32* %14
%16 = sext i32 %15 to i64
%17 = load i8*, i8** %6
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = add nsw i32 %20, %24
%26 = trunc i32 %25 to i8
ret i8 %26
}

LLVM IR (-O2):
define signext i8 @foo(i32* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = load i8, i8* %1
%5 = sext i8 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 %1, i64 %8, i1 false)
%9 = load i8, i8* %2
%10 = load i8, i8* %1
%11 = add i8 %10, %9
ret i8 %11
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int main(int argc, char *argv[]) {
  bar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @bar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @bar()
ret i32 0
}
unsigned char e2(unsigned char a) { return (a & 0xe0) >> 5 | (a & 0x1f) << 3; }


x86 assembly (clang, -O0):
<e2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xe0,%eax
sar    $0x5,%eax
movzbl -0x1(%rbp),%ecx
and    $0x1f,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<e2>:
mov    %edi,%eax
rol    $0x3,%al
ret

LLVM IR (-O0):
define zeroext i8 @e2(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 224
%6 = ashr i32 %5, 5
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 31
%10 = shl i32 %9, 3
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @e2(i8 zeroext %0) {
%2 = tail call i8 @llvm.fshl.i8(i8 %0, i8 %0, i8 3)
ret i8 %2
}
/* Variables and functions */
int float_to_int(float);
int pNaNf(float nan) { return 0x3fffff & float_to_int(nan); }


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

x86 assembly (clang, -O2):
<pNaNf>:
push   %rax
call   1030 <float_to_int@plt>
and    $0x3fffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pNaNf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @float_to_int(float %3)
%5 = and i32 4194303, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @pNaNf(float %0) {
%2 = tail call i32 @float_to_int(float %0)
%3 = and i32 %2, 4194303
ret i32 %3
}
int inv_J(int a[][2]) {
  int i, j;
  int det = 0.0;
  for (j = 0; j < 2; ++j)
    det += a[j][0] + a[j][1];
  return det;
}


x86 assembly (clang, -O0):
<inv_J>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    114b <inv_J+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
add    0x4(%rcx,%rdx,8),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <inv_J+0x16>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_J>:
movdqu (%rdi),%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @inv_J([2 x i32]* nocapture %0) {
%2 = bitcast [2 x i32]* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int setxattr(const char *__path, const char *__name, const void *__value,
             size_t __size, int __flags) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<setxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setxattr>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @setxattr(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i32, i32* @ENOSYS
%12 = call i32 @__set_errno(i32 %11)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @setxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32 %4) {
%6 = load i32, i32* @ENOSYS
%7 = tail call i32 @__set_errno(i32 %6)
ret i32 -1
}