xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, double *);
int main() {
  int number;
  int workedHoursInMonth;
  double salaryPerHour;
  scanf("%d %d %lf", &number, &workedHoursInMonth, &salaryPerHour);
  printf("NUMBER = %d\nSALARY = U$ %.2lf\n", number,
         workedHoursInMonth * salaryPerHour);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %lf\00"
@.str.1 = [31 x i8] c"NUMBER = %d\0ASALARY = U$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, double* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = load double, double* %4
%10 = fmul double %8, %9
%11 = fptosi double %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %lf\00"
@.str.1 = [31 x i8] c"NUMBER = %d\0ASALARY = U$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, double* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = load double, double* %3
%12 = fmul double %11, %10
%13 = fptosi double %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %13)
ret i32 0
}
unsigned long GetCacheViewMaximumThreads(void) { return (1); }


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

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

LLVM IR (-O0):
define i64 @GetCacheViewMaximumThreads() {
ret i64 1
}

LLVM IR (-O2):
define i64 @GetCacheViewMaximumThreads() {
ret i64 1
}
/* Variables and functions */
char *path_by_appending_image(char *);
char *default_image_name(char *orig) {
  char *path = orig;
  char *image_name = path_by_appending_image(path);
  return image_name;
}


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

x86 assembly (clang, -O2):
<default_image_name>:
jmp    1030 <path_by_appending_image@plt>

LLVM IR (-O0):
define i8* @default_image_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @path_by_appending_image(i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
define i8* @default_image_name(i8* %0) {
%2 = tail call i8* @path_by_appending_image(i8* %0)
ret i8* %2
}
int test_imm_BEuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xBE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BEuint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 190
%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_BEuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 190
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ wr_byte(int /*<<< orphan*/);
int /*<<< orphan*/ wr_string(char *);
void wr_ghost(void) {
  int i;
  wr_string("Broken Ghost");
  for (i = 0; i < 60; i++)
    wr_byte(0);
}


x86 assembly (clang, -O0):
<wr_ghost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <wr_string@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x3c,-0x4(%rbp)
jge    115a <wr_ghost+0x3a>
xor    %edi,%edi
call   1040 <wr_byte@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <wr_ghost+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wr_ghost>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <wr_string@plt>
mov    $0x3c,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edi,%edi
call   1040 <wr_byte@plt>
add    $0xffffffff,%ebx
jne    1140 <wr_ghost+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Broken Ghost\00"
define void @wr_ghost() {
%1 = alloca i32
%2 = call i32 @wr_string(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 60
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @wr_byte(i32 0)
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Broken Ghost\00"
define void @wr_ghost() {
%1 = tail call i32 @wr_string(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @wr_byte(i32 0)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 60
br i1 %6, label %7, label %2
7: ; preds = %2
ret void
}
float EMinFloat(float a, float b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<EMinFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <EMinFloat+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <EMinFloat+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMinFloat>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @EMinFloat(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
char cast_ulong_char_fast(unsigned long int x) { return (char)x; }


x86 assembly (clang, -O0):
<cast_ulong_char_fast>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast_ulong_char_fast>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define signext i8 @cast_ulong_char_fast(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @cast_ulong_char_fast(i64 %0) {
%2 = trunc i64 %0 to i8
ret i8 %2
}
/* Variables and functions */
char *sm_request_string(const char *title, const char *text,
                        const char *contents, int secret) {
  return NULL;
}


x86 assembly (clang, -O0):
<sm_request_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @sm_request_string(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @sm_request_string(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i8* null
}
unsigned xrop3_74_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S | D;
  stk2 = T & stk3;
  stk1 = D ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_74_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_74_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
lea    (%rax,%rdi,1),%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
or     $0xff,%eax
and    %edx,%eax
xor    $0xff,%eax
and    %ecx,%eax
not    %edi
and    %esi,%edi
xor    $0xff,%esi
or     %edi,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_74_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = mul nuw nsw i32 %6, 257
%8 = or i32 %4, 255
%9 = and i32 %7, %8
%10 = xor i32 %9, 255
%11 = and i32 %10, %5
%12 = xor i32 %6, 255
%13 = xor i32 %3, -1
%14 = and i32 %13, %6
%15 = or i32 %14, %12
%16 = or i32 %15, %11
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
char *makeDayTxt(int ts, char *txt) {
  strftime(txt, 12, "%d %b %Y", localtime((time_t *)&ts));
  return txt;
}


x86 assembly (clang, -O0):
<makeDayTxt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    $0xc,%esi
lea    0xeae(%rip),%rdx
call   1040 <strftime@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeDayTxt>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xec3(%rip),%rdx
mov    %rbx,%rdi
mov    $0xc,%esi
mov    %eax,%ecx
call   1040 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %b %Y\00"
define i8* @makeDayTxt(i32 %0, i8* returned %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @localtime(i32* %3)
%5 = call i32 @strftime(i8* %1, i32 12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* %1
}
int lib1t31(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @lib1t31() {
ret i32 1
}

LLVM IR (-O2):
define i32 @lib1t31() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_st32_kernel(int, int);
void gen_op_stf32_kernel(int addr, int dest) { gen_op_st32_kernel(addr, dest); }


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

x86 assembly (clang, -O2):
<gen_op_stf32_kernel>:
jmp    1030 <gen_op_st32_kernel@plt>

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

LLVM IR (-O2):
define void @gen_op_stf32_kernel(i32 %0, i32 %1) {
%3 = tail call i32 @gen_op_st32_kernel(i32 %0, i32 %1)
ret void
}
int test_imm_F9uint8_reg(unsigned char val) {
  return ((val) & (0xF9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F9uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xf9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F9uint8_reg>:
test   $0xf9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F9uint8_reg(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, 249
%6 = icmp ne i32 %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_F9uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -7
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void SSMR3GetStruct(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetStruct() {
ret void
}
/* Variables and functions */
int gpiod_simple_get_value_multiple(char const *, char const *, unsigned int *,
                                    int *, int, int);
int gpiod_simple_get_value(const char *consumer, const char *device,
                           unsigned int offset, bool active_low) {
  int value, status;
  status = gpiod_simple_get_value_multiple(consumer, device, &offset, &value, 1,
                                           active_low);
  if (status < 0)
    return status;
  return value;
}


x86 assembly (clang, -O0):
<gpiod_simple_get_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%r9d
lea    -0x1c(%rbp),%rdx
lea    -0x24(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <gpiod_simple_get_value_multiple@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jge    115d <gpiod_simple_get_value+0x4d>
mov    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <gpiod_simple_get_value+0x53>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpiod_simple_get_value>:
push   %rax
mov    %ecx,%r9d
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
mov    $0x1,%r8d
call   1030 <gpiod_simple_get_value_multiple@plt>
test   %eax,%eax
js     1132 <gpiod_simple_get_value+0x22>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gpiod_simple_get_value(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
store i32 %2, i32* %5
%7 = bitcast i32* %6 to i8*
%8 = call i32 @gpiod_simple_get_value_multiple(i8* %0, i8* %1, i32* %5, i32* %6, i32 1, i32 %3)
%9 = icmp slt i32 %8, 0
%10 = load i32, i32* %6
%11 = select i1 %9, i32 %8, i32 %10
ret i32 %11
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ border_width;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
int get_XWindowAttributes_border_width(void *_p) {
  return (int)((XWindowAttributes *)_p)->border_width;
}


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

x86 assembly (clang, -O2):
<get_XWindowAttributes_border_width>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XWindowAttributes_border_width(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XWindowAttributes_border_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *allocate_mem();
int /*<<< orphan*/ free_mem(void *);
int /*<<< orphan*/ touch_mem(void *);
int main() {
  for (unsigned i = 0; i < 0x10000; ++i) {
    void *ptr = allocate_mem();
    free_mem(ptr);
    touch_mem(ptr);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x10000,-0x8(%rbp)
jae    117e <main+0x4e>
mov    $0x0,%al
call   1030 <allocate_mem@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <free_mem@plt>
mov    -0x10(%rbp),%rdi
call   1040 <touch_mem@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x10000,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <allocate_mem@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <free_mem@plt>
mov    %rbx,%rdi
call   1040 <touch_mem@plt>
add    $0xffffffff,%ebp
jne    1140 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 65536
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = call i8* (...) @allocate_mem()
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @free_mem(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @touch_mem(i8* %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %7, %2 ]
%4 = tail call i8* (...) @allocate_mem()
%5 = tail call i32 @free_mem(i8* %4)
%6 = tail call i32 @touch_mem(i8* %4)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 65536
br i1 %8, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ hl_alloc_strbytes(char *);
int /*<<< orphan*/ hl_throw(int /*<<< orphan*/);
int hl_thread_id() {
  hl_throw(
      hl_alloc_strbytes(u"hl_thread_id() not available for this platform"));
  return -1;
}


x86 assembly (clang, -O0):
<hl_thread_id>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <hl_alloc_strbytes@plt>
mov    %eax,%edi
call   1030 <hl_throw@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hl_thread_id>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <hl_alloc_strbytes@plt>
mov    %eax,%edi
call   1030 <hl_throw@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i16] [i16 104, i16 108, i16 95, i16 116, i16 104, i16 114, i16 101, i16 97, i16 100, i16 95, i16 105, i16 100, i16 40, i16 41, i16 32, i16 110, i16 111, i16 116, i16 32, i16 97, i16 118, i16 97, i16 105, i16 108, i16 97, i16 98, i16 108, i16 101, i16 32, i16 102, i16 111, i16 114, i16 32, i16 116, i16 104, i16 105, i16 115, i16 32, i16 112, i16 108, i16 97, i16 116, i16 102, i16 111, i16 114, i16 109, i16 0]
define i32 @hl_thread_id() {
%1 = call i32 @hl_alloc_strbytes(i8* bitcast ([47 x i16]* @.str to i8*))
%2 = call i32 @hl_throw(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@.str = [47 x i16] [i16 104, i16 108, i16 95, i16 116, i16 104, i16 114, i16 101, i16 97, i16 100, i16 95, i16 105, i16 100, i16 40, i16 41, i16 32, i16 110, i16 111, i16 116, i16 32, i16 97, i16 118, i16 97, i16 105, i16 108, i16 97, i16 98, i16 108, i16 101, i16 32, i16 102, i16 111, i16 114, i16 32, i16 116, i16 104, i16 105, i16 115, i16 32, i16 112, i16 108, i16 97, i16 116, i16 102, i16 111, i16 114, i16 109, i16 0]
define i32 @hl_thread_id() {
%1 = tail call i32 @hl_alloc_strbytes(i8* bitcast ([47 x i16]* @.str to i8*))
%2 = tail call i32 @hl_throw(i32 %1)
ret i32 -1
}
void RTProcGetExecutablePath(void) {}


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

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

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

LLVM IR (-O2):
define void @RTProcGetExecutablePath() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void LZ4_copy4(void *dstPtr, const void *srcPtr) { memcpy(dstPtr, srcPtr, 4); }


x86 assembly (clang, -O0):
<LZ4_copy4>:
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    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_copy4>:
mov    $0x4,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @LZ4_copy4(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** %4
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 4)
ret void
}

LLVM IR (-O2):
define void @LZ4_copy4(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: tconf [OPTIONS]\n"
                  "   -c,--config-file FILE  set config file path\n"
                  "   -e,--exports           dump exports\n"
                  "   -m,--mounts            dump /proc/mounts\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [154 x i8] c"Usage: tconf [OPTIONS]\0A -c,--config-file FILE set config file path\0A -e,--exports dump exports\0A -m,--mounts dump /proc/mounts\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [154 x i8] c"Usage: tconf [OPTIONS]\0A -c,--config-file FILE set config file path\0A -e,--exports dump exports\0A -m,--mounts dump /proc/mounts\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int main() {
  int nasza_zmienna = 2;
  printf(" %s = %i\n", "nasza_zmienna", nasza_zmienna);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c" %s = %i\0A\00"
@.str.1 = [14 x i8] c"nasza_zmienna\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank0Low(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ vrc2_4_SetChrROMBank0();
void vrc2_4_setParamsBXX0(uint16_t addr, uint8_t val) {
  __setCHRBank0Low(addr, val);
  vrc2_4_SetChrROMBank0();
}


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

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

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

LLVM IR (-O2):
define void @vrc2_4_setParamsBXX0(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank0Low(i32 %0, i32 %1)
%4 = tail call i32 (...) @vrc2_4_SetChrROMBank0()
ret void
}
void gtk_menu_set_accel_path() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_set_accel_path() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *char_vec_alloc(int n) {
  char *v;
  v = (char *)calloc(n, sizeof(char));
  if (v == NULL) {
    fprintf(stderr, "could not allocate memory");
    exit(EXIT_FAILURE);
  }
  return v;
}


x86 assembly (clang, -O0):
<char_vec_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117a <char_vec_alloc+0x4a>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_vec_alloc>:
push   %rax
mov    $0x1,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1142 <char_vec_alloc+0x12>
pop    %rcx
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"could not allocate memory\00"
@EXIT_FAILURE = global i32 0
define i8* @char_vec_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 1)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"could not allocate memory\00"
@EXIT_FAILURE = global i32 0
define i8* @char_vec_alloc(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %2 to i8*
ret i8* %10
}
execlsh(name, arg0, arg1, arg2) char *name, *arg0, *arg1, *arg2;
{ return (execvsh(name, &arg0)); }


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

x86 assembly (clang, -O2):
<execlsh>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <execvsh@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @execlsh(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execvsh to i32 (i8*, i8**, ...)*)(i8* %9, i8** %6)
ret i32 %10
}

LLVM IR (-O2):
define i32 @execlsh(i8* %0, i8* %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = alloca i8*
store i8* %1, i8** %5
%6 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execvsh to i32 (i8*, i8**, ...)*)(i8* %0, i8** %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int strlen(char const *);
void test_16a(const char *msg) { __analyzer_eval(strlen(msg) == 11); }


x86 assembly (clang, -O0):
<test_16a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_16a>:
push   %rax
call   1040 <strlen@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
pop    %rax
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_16a(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = icmp eq i32 %4, 11
%6 = zext i1 %5 to i32
%7 = call i32 @__analyzer_eval(i32 %6)
ret void
}

LLVM IR (-O2):
define void @test_16a(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 11
%4 = zext i1 %3 to i32
%5 = tail call i32 @__analyzer_eval(i32 %4)
ret void
}
char *removeAllSpaces(char *data) {
  char *in, *out;
  for (in = out = data; *in != '\0'; in++)
    if (*in != ' ')
      *out++ = *in;
  *out = '\0';
  return data;
}


x86 assembly (clang, -O0):
<removeAllSpaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1161 <removeAllSpaces+0x61>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     114b <removeAllSpaces+0x4b>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1150 <removeAllSpaces+0x50>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <removeAllSpaces+0x14>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeAllSpaces>:
mov    %rdi,%rax
mov    %rdi,%rdx
mov    %rdi,%rsi
jmp    1114 <removeAllSpaces+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
movzbl (%rdx),%ecx
cmp    $0x20,%cl
je     1110 <removeAllSpaces+0x10>
test   %cl,%cl
je     1128 <removeAllSpaces+0x28>
mov    %cl,(%rsi)
add    $0x1,%rsi
jmp    1110 <removeAllSpaces+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i8* @removeAllSpaces(i8* returned %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %11
i8 32, label %8
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %5, i8* %4
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
store i8 0, i8* %4
ret i8* %0
}
/* Variables and functions */
__attribute__((visibility("default"))) void *
sd_event_source_set_userdata(void *s, void *userdata) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_event_source_set_userdata(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
double diff_time(struct timespec t0, struct timespec t1) {
  return (t1.tv_sec - t0.tv_sec) * 1e6 + (t1.tv_nsec - t0.tv_nsec) / 1e3;
}


x86 assembly (clang, -O0):
<diff_time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xee0(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xecc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff_time>:
mov    %rsi,%rax
sub    %edi,%esi
shr    $0x20,%rdi
shr    $0x20,%rax
cvtsi2sd %esi,%xmm0
sub    %edi,%eax
cvtsi2sd %eax,%xmm1
divsd  0xee1(%rip),%xmm1
mulsd  0xee1(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define double @diff_time(i64 %0, i64 %1) {
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
%5 = bitcast %struct.timespec* %3 to i64*
store i64 %0, i64* %5
%6 = bitcast %struct.timespec* %4 to i64*
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %8, %10
%12 = sitofp i32 %11 to double
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = sitofp i32 %17 to double
%19 = fdiv double %18, 1.000000e+03
%20 = call double @llvm.fmuladd.f64(double %12, double 1.000000e+06, double %19)
ret double %20
}

LLVM IR (-O2):
define double @diff_time(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = lshr i64 %0, 32
%5 = trunc i64 %4 to i32
%6 = trunc i64 %1 to i32
%7 = lshr i64 %1, 32
%8 = trunc i64 %7 to i32
%9 = sub nsw i32 %6, %3
%10 = sitofp i32 %9 to double
%11 = sub nsw i32 %8, %5
%12 = sitofp i32 %11 to double
%13 = fdiv double %12, 1.000000e+03
%14 = tail call double @llvm.fmuladd.f64(double %10, double 1.000000e+06, double %13)
ret double %14
}
void get_unused_fd_flags(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<get_unused_fd_flags>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_unused_fd_flags>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.get_unused_fd_flags = [20 x i8] c"get_unused_fd_flags\00"
define void @get_unused_fd_flags() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.get_unused_fd_flags, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.get_unused_fd_flags = [20 x i8] c"get_unused_fd_flags\00"
define void @get_unused_fd_flags() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.get_unused_fd_flags, i64 0, i64 0))
ret void
}
int main() {
  int i, j;
  i = 0;
  j = 0;
  while (i < 5) {
    j = 0;
    while (j < 4) {
      j = j + 1;
      if (j == 2)
        i = 1;
      else
        i = 2;
    }
    i = i + 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    116d <main+0x6d>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    115f <main+0x5f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    1153 <main+0x53>
movl   $0x1,-0x8(%rbp)
jmp    115a <main+0x5a>
movl   $0x2,-0x8(%rbp)
jmp    112a <main+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
const char *Type_Description(void) {
  return "The `Type` type is one of the most important types in Cello. It is "
         "the "
         "object which specifies the meta-data associated with a particular "
         "object. "
         "Most importantly this says what classes an object implements and "
         "what "
         "their instances are."
         "\n\n"
         "One can get the type of an object using the `type_of` function."
         "\n\n"
         "To see if an object implements a class `implements` can be used. To "
         "call a member of a class with an object `method` can be used."
         "\n\n"
         "To see if a type implements a class `type_implements` can be used. "
         "To "
         "call a member of a class, implemented `type_method` can be used.";
}


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

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

LLVM IR (-O0):
@.str = [568 x i8] c"The `Type` type is one of the most important types in Cello. It is the object which specifies the meta-data associated with a particular object. Most importantly this says what classes an object implements and what their instances are.\0A\0AOne can get the type of an object using the `type_of` function.\0A\0ATo see if an object implements a class `implements` can be used. To call a member of a class with an object `method` can be used.\0A\0ATo see if a type implements a class `type_implements` can be used. To call a member of a class, implemented `type_method` can be used.\00"
define i8* @Type_Description() {
ret i8* getelementptr inbounds ([568 x i8], [568 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [568 x i8] c"The `Type` type is one of the most important types in Cello. It is the object which specifies the meta-data associated with a particular object. Most importantly this says what classes an object implements and what their instances are.\0A\0AOne can get the type of an object using the `type_of` function.\0A\0ATo see if an object implements a class `implements` can be used. To call a member of a class with an object `method` can be used.\0A\0ATo see if a type implements a class `type_implements` can be used. To call a member of a class, implemented `type_method` can be used.\00"
define i8* @Type_Description() {
ret i8* getelementptr inbounds ([568 x i8], [568 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef size_t uint32_t;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
size_t _bswap64(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_extract_epi64(int /*<<< orphan*/ const, int);
size_t to_index(const __m128i block, uint32_t m_cost) {
  size_t index;
  index = _bswap64(_mm_extract_epi64(block, 1));
  index &= ~(~((size_t)0) << m_cost);
  index *= (((size_t)64) * ((size_t)4));
  return index;
}


x86 assembly (clang, -O0):
<to_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <_mm_extract_epi64@plt>
mov    %eax,%edi
call   1040 <_bswap64@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
xor    $0xffffffffffffffff,%rax
and    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_index>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%esi
call   1030 <_mm_extract_epi64@plt>
mov    %eax,%edi
call   1040 <_bswap64@plt>
mov    $0xffffffffffffffff,%rdx
mov    %ebx,%ecx
shl    %cl,%rdx
not    %rdx
and    %rdx,%rax
shl    $0x8,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @to_index(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = call i32 @_mm_extract_epi64(i32 %6, i32 1)
%8 = call i64 @_bswap64(i32 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %4
%10 = shl i64 -1, %9
%11 = xor i64 %10, -1
%12 = load i64, i64* %5
%13 = and i64 %12, %11
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = mul i64 %14, 256
store i64 %15, i64* %5
%16 = load i64, i64* %5
ret i64 %16
}

LLVM IR (-O2):
define i64 @to_index(i32 %0, i64 %1) {
%3 = tail call i32 @_mm_extract_epi64(i32 %0, i32 1)
%4 = tail call i64 @_bswap64(i32 %3)
%5 = shl nsw i64 -1, %1
%6 = xor i64 %5, -1
%7 = and i64 %4, %6
%8 = shl i64 %7, 8
ret i64 %8
}
int test_imm_F8uint16_reg(unsigned short val) {
  return ((val) & (0xF8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F8uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xf8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F8uint16_reg>:
test   $0xf8,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F8uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 248
%6 = icmp ne i32 %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_F8uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 248
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}