xunge/DecIR huggingface dataset:
unsigned int IFFID(char c1, char c2, char c3, char c4) {
  return (unsigned int)((c1 << 24) | (c2 << 16) | (c3 << 8) | c4);
}


x86 assembly (clang, -O0):
<IFFID>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x18,%eax
movsbl -0x2(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movsbl -0x3(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movsbl -0x4(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IFFID>:
mov    %edx,%eax
shl    $0x18,%edi
shl    $0x10,%esi
or     %edi,%esi
shl    $0x8,%eax
or     %ecx,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @IFFID(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %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 = sext i8 %9 to i32
%11 = shl i32 %10, 24
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = or i32 %11, %14
%16 = load i8, i8* %7
%17 = sext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %15, %18
%20 = load i8, i8* %8
%21 = sext i8 %20 to i32
%22 = or i32 %19, %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @IFFID(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = zext i8 %0 to i32
%6 = shl nuw i32 %5, 24
%7 = sext i8 %1 to i32
%8 = shl nsw i32 %7, 16
%9 = or i32 %8, %6
%10 = sext i8 %2 to i32
%11 = shl nsw i32 %10, 8
%12 = or i32 %9, %11
%13 = sext i8 %3 to i32
%14 = or i32 %12, %13
ret i32 %14
}
signed int Thrd_Get_dmvector(signed int t) {
  unsigned int return_value_Thrd_Get_Bits$2;
  return_value_Thrd_Get_Bits$2 = Thrd_Get_Bits(t, 1);
  if (!(return_value_Thrd_Get_Bits$2 == 0u)) {
    unsigned int return_value_Thrd_Get_Bits$1;
    return_value_Thrd_Get_Bits$1 = Thrd_Get_Bits(t, 1);
    return return_value_Thrd_Get_Bits$1 != 0u ? -1 : 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<Thrd_Get_dmvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <Thrd_Get_Bits@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1164 <Thrd_Get_dmvector+0x54>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <Thrd_Get_Bits@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    116b <Thrd_Get_dmvector+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thrd_Get_dmvector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <Thrd_Get_Bits@plt>
test   %eax,%eax
je     113c <Thrd_Get_dmvector+0x2c>
mov    %ebx,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <Thrd_Get_Bits@plt>
neg    %eax
sbb    %ebp,%ebp
or     $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Thrd_Get_dmvector(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits to i32 (i32, i32, ...)*)(i32 %6, i32 1)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits to i32 (i32, i32, ...)*)(i32 %11, i32 1)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 -1, i32 1
store i32 %16, i32* %2
br label %18
17: ; preds = %1
store i32 0, i32* %2
br label %18
18: ; preds = %17, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @Thrd_Get_dmvector(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits to i32 (i32, i32, ...)*)(i32 %0, i32 1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits to i32 (i32, i32, ...)*)(i32 %0, i32 1)
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 1, i32 -1
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16l1(uint16_t x) { return (x << 1) | (x >> 15); }


x86 assembly (clang, -O0):
<rot16l1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
sar    $0xf,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16l1>:
lea    (%rdi,%rdi,1),%eax
sar    $0xf,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @rot16l1(i32 %0) {
%2 = shl i32 %0, 1
%3 = ashr i32 %0, 15
%4 = or i32 %2, %3
ret i32 %4
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ TIME_UTC;
int /*<<< orphan*/ srand(scalar_t__);
int /*<<< orphan*/ timespec_get(struct timespec *, int /*<<< orphan*/);
void madlib_rand_seed() {
  struct timespec ts;
  timespec_get(&ts, TIME_UTC);
  srand(ts.tv_sec + ts.tv_nsec);
}


x86 assembly (clang, -O0):
<madlib_rand_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdi
call   1030 <timespec_get@plt>
mov    -0x8(%rbp),%rdi
add    -0x10(%rbp),%rdi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<madlib_rand_seed>:
sub    $0x18,%rsp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdi
call   1030 <timespec_get@plt>
mov    0x8(%rsp),%rdi
add    0x10(%rsp),%rdi
call   1040 <srand@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@TIME_UTC = global i32 0
define void @madlib_rand_seed() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @TIME_UTC
%3 = call i32 @timespec_get(%struct.timespec* %1, i32 %2)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %5, %7
%9 = call i32 @srand(i64 %8)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@TIME_UTC = global i32 0
define void @madlib_rand_seed() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @TIME_UTC
%4 = call i32 @timespec_get(%struct.timespec* %1, i32 %3)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %8, %6
%10 = call i32 @srand(i64 %9)
ret void
}
/* Variables and functions */
int iFunAdd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int iTmp1st = 9;
  int iTmp2nd = 6;
  int iRet = iFunAdd(iTmp1st, iTmp2nd);
  printf("9 + 6 = %d\n", iRet);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x9,-0x14(%rbp)
movl   $0x6,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <iFunAdd@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
mov    $0x6,%esi
call   1040 <iFunAdd@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"9 + 6 = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @iFunAdd(i32 9, i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void echo(char *argv[]) {
  while (*++argv)
    printf("%s ", *argv);
  printf("\n");
}


x86 assembly (clang, -O0):
<echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
cmpq   $0x0,0x8(%rax)
je     1150 <echo+0x40>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    111c <echo+0xc>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo>:
push   %r14
push   %rbx
push   %rax
mov    0x8(%rdi),%rsi
test   %rsi,%rsi
je     1156 <echo+0x36>
mov    %rdi,%rbx
add    $0x10,%rbx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1140 <echo+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @echo(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %8, %1
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i32 1
store i8** %5, i8*** %2
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %3
12: ; preds = %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @echo(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i8* [ %10, %5 ], [ %3, %1 ]
%7 = phi i8** [ %9, %5 ], [ %2, %1 ]
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%9 = getelementptr inbounds i8*, i8** %7, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_info(char *);
void log_end(void) { log_info("aborting"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"aborting\00"
define void @log_end() {
%1 = tail call i32 @log_info(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int rtutil_scat_fft_dummy(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rtutil_scat_fft_dummy() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int UINT32_C(int);
uint32_t ini_func1(uint32_t x) { return (x ^ (x >> 27)) * UINT32_C(1664525); }


x86 assembly (clang, -O0):
<ini_func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1b,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x19660d,%edi
call   1030 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_func1>:
push   %rbx
mov    %edi,%ebx
sar    $0x1b,%ebx
xor    %edi,%ebx
mov    $0x19660d,%edi
call   1030 <UINT32_C@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ini_func1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 27
%6 = xor i32 %3, %5
%7 = call i32 @UINT32_C(i32 1664525)
%8 = mul nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ini_func1(i32 %0) {
%2 = ashr i32 %0, 27
%3 = xor i32 %2, %0
%4 = tail call i32 @UINT32_C(i32 1664525)
%5 = mul nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
float ceil(float);
float Float_ceil(float x) { return ceil(x); }


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

x86 assembly (clang, -O2):
<Float_ceil>:
jmp    1030 <ceilf@plt>

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

LLVM IR (-O2):
define float @Float_ceil(float %0) {
%2 = tail call float @llvm.ceil.f32(float %0)
ret float %2
}
unsigned int le_readu16(const void *addr) {
  const unsigned char *p = (const unsigned char *)addr;
  return p[0] | (p[1] << 8);
}


x86 assembly (clang, -O0):
<le_readu16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_readu16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @le_readu16(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @le_readu16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Thermistor_Init(void) { printf("Thermistor data initialized\n"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Thermistor data initialized\0A\00"
define void @Thermistor_Init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Thermistor data initialized\00"
define void @Thermistor_Init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(long *);
int /*<<< orphan*/ munmap(double *, int);
void munmap_data(long *n, double *ptr) {
  munmap(ptr, sizeof(double) * (*n));
  free(n);
}


x86 assembly (clang, -O0):
<munmap_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1040 <munmap@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<munmap_data>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
mov    (%rdi),%esi
shl    $0x3,%esi
mov    %rax,%rdi
call   1040 <munmap@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @munmap_data(i64* %0, double* %1) {
%3 = alloca i64*
%4 = alloca double*
store i64* %0, i64** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = mul i64 8, %7
%9 = trunc i64 %8 to i32
%10 = call i32 @munmap(double* %5, i32 %9)
%11 = load i64*, i64** %3
%12 = call i32 @free(i64* %11)
ret void
}

LLVM IR (-O2):
define void @munmap_data(i64* nocapture %0, double* %1) {
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 3
%6 = tail call i32 @munmap(double* %1, i32 %5)
%7 = tail call i32 @free(i64* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ beolv(char *, int *);
int /*<<< orphan*/ getFal();
int /*<<< orphan*/ kiir(char *, int /*<<< orphan*/);
int /*<<< orphan*/ setFal(int);
int falmenu() {
  int l;
  kiir("A palya oldalan at lehessen menni?(1 - igen, 0 - nem)(Jelenleg %d): ",
       getFal());
  beolv("%d", &l);
  if (l >= 0 && l <= 1) {
    setFal(l);
  }
  return 1;
}


x86 assembly (clang, -O0):
<falmenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getFal@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <kiir@plt>
lea    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <beolv@plt>
cmpl   $0x0,-0x4(%rbp)
jl     1189 <falmenu+0x49>
cmpl   $0x1,-0x4(%rbp)
jg     1189 <falmenu+0x49>
mov    -0x4(%rbp),%edi
call   1050 <setFal@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<falmenu>:
push   %rax
xor    %eax,%eax
call   1040 <getFal@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <kiir@plt>
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <beolv@plt>
mov    0x4(%rsp),%edi
cmp    $0x1,%edi
ja     1175 <falmenu+0x35>
call   1050 <setFal@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [69 x i8] c"A palya oldalan at lehessen menni?(1 - igen, 0 - nem)(Jelenleg %d): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @falmenu() {
%1 = alloca i32
%2 = call i32 (...) @getFal()
%3 = call i32 @kiir(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @beolv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %1
%12 = call i32 @setFal(i32 %11)
br label %13
13: ; preds = %10, %7, %0
ret i32 1
}

LLVM IR (-O2):
@.str = [69 x i8] c"A palya oldalan at lehessen menni?(1 - igen, 0 - nem)(Jelenleg %d): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @falmenu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @getFal()
%4 = tail call i32 @kiir(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @beolv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp ult i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @setFal(i32 %6)
br label %10
10: ; preds = %8, %0
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
void mpu_ll_set_region_rw(uint32_t addr) { abort(); }


x86 assembly (clang, -O0):
<mpu_ll_set_region_rw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<mpu_ll_set_region_rw>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @mpu_ll_set_region_rw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @mpu_ll_set_region_rw(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
void fn_2(int unused) {}


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

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

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

LLVM IR (-O2):
define void @fn_2(i32 %0) {
ret void
}
void ff_hevc_put_hevc_bi_epel_hv48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv48_10_sse4() {
ret void
}
/* Variables and functions */
int my_getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char line[1000];
  int len;
  while ((len = my_getline(line, 1000)) > 0) {
    if (len > 80) {
      printf("%s", line);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <my_getline@plt>
mov    %eax,-0x3f4(%rbp)
cmp    $0x0,%eax
jle    1177 <main+0x57>
cmpl   $0x50,-0x3f4(%rbp)
jle    1172 <main+0x52>
lea    -0x3f0(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <my_getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <my_getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %14, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i32 @my_getline(i8* %5, i32 1000)
store i32 %6, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 80
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @my_getline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
int mock_cache_init(struct da_cloud_cache_cfg *cfg) {
  (void)cfg;
  return (0);
}


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

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

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

LLVM IR (-O2):
%struct.da_cloud_cache_cfg = type opaque
define i32 @mock_cache_init(%struct.da_cloud_cache_cfg* nocapture readnone %0) {
ret i32 0
}
void g_error_matches() {}


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

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

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

LLVM IR (-O2):
define void @g_error_matches() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *realloc(void *ptr, size_t size) {
  void *new = malloc(size);
  memcpy(new, ptr, size);
  free(ptr);
  return new;
}


x86 assembly (clang, -O0):
<realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @memcpy(i8* %8, i8* %9, i64 %10)
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @realloc(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
%5 = tail call i32 @free(i8* %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Writing comments is very useful.\n");
  printf("Good luck c programmer.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Writing comments is very useful.\0A\00"
@.str.1 = [25 x i8] c"Good luck c programmer.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"Writing comments is very useful.\00"
@str.2 = [24 x i8] c"Good luck c programmer.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __io_getchar();
__attribute__((weak)) int _read(int file, char *ptr, int len) {
  int DataIdx;
  for (DataIdx = 0; DataIdx < len; DataIdx++) {
    *ptr++ = __io_getchar();
  }
  return len;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115d <_read+0x4d>
mov    $0x0,%al
call   1030 <__io_getchar@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <_read+0x19>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
test   %edx,%edx
jle    1143 <_read+0x33>
mov    %rsi,%r15
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__io_getchar@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1130 <_read+0x20>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define weak i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %13
5: ; preds = %3, %5
%6 = phi i32 [ %11, %5 ], [ 0, %3 ]
%7 = phi i8* [ %10, %5 ], [ %1, %3 ]
%8 = tail call i32 (...) @__io_getchar()
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %9, i8* %7
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %3
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ back_square(double, double);
int /*<<< orphan*/ hrt(double, double, char *);
int /*<<< orphan*/ print_check(double, double);
void print_one(double x, double y) {
  print_check(x, y);
  print_check(x, y + 0.5);
  back_square(x, y);
  hrt(x, y, "1");
}


x86 assembly (clang, -O0):
<print_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <print_check@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xea2(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
call   1050 <print_check@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <back_square@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xe80(%rip),%rdi
call   1030 <hrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_one>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1050 <print_check@plt>
movsd  0xeb3(%rip),%xmm1
addsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
call   1050 <print_check@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1040 <back_square@plt>
lea    0xe92(%rip),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
add    $0x18,%rsp
jmp    1030 <hrt@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
define void @print_one(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @print_check(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fadd double %9, 5.000000e-01
%11 = call i32 @print_check(double %8, double %10)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @back_square(double %12, double %13)
%15 = load double, double* %3
%16 = load double, double* %4
%17 = call i32 @hrt(double %15, double %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
define void @print_one(double %0, double %1) {
%3 = tail call i32 @print_check(double %0, double %1)
%4 = fadd double %1, 5.000000e-01
%5 = tail call i32 @print_check(double %0, double %4)
%6 = tail call i32 @back_square(double %0, double %1)
%7 = tail call i32 @hrt(double %0, double %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_17int64_highword_reg(long long val) {
  return ((val >> 32) & (0x17 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_17int64_highword_reg>:
movabs $0x1700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_17int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 23
%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_17int64_highword_reg(i64 %0) {
%2 = and i64 %0, 98784247808
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fb_clear();
int /*<<< orphan*/ fb_move_cursor(int);
int /*<<< orphan*/ fb_write(char *, int);
void kmain() {
  fb_clear();
  fb_write("Welcome To dingOS v0.0.1", 24);
  fb_move_cursor(80);
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fb_clear@plt>
lea    0xebe(%rip),%rdi
mov    $0x18,%esi
call   1050 <fb_write@plt>
mov    $0x50,%edi
call   1040 <fb_move_cursor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rax
xor    %eax,%eax
call   1030 <fb_clear@plt>
lea    0xec1(%rip),%rdi
mov    $0x18,%esi
call   1050 <fb_write@plt>
mov    $0x50,%edi
pop    %rax
jmp    1040 <fb_move_cursor@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Welcome To dingOS v0.0.1\00"
define void @kmain() {
%1 = call i32 (...) @fb_clear()
%2 = call i32 @fb_write(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 24)
%3 = call i32 @fb_move_cursor(i32 80)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Welcome To dingOS v0.0.1\00"
define void @kmain() {
%1 = tail call i32 (...) @fb_clear()
%2 = tail call i32 @fb_write(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 24)
%3 = tail call i32 @fb_move_cursor(i32 80)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
float float_from_u8(uint8_t uval) {
  static const float scale = 1. / (float)(1UL << 7);
  return ((int)uval - 128) * scale;
}


x86 assembly (clang, -O0):
<float_from_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x80,%eax
cvtsi2ss %eax,%xmm0
movss  0xee3(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_from_u8>:
add    $0xffffff80,%edi
cvtsi2ss %edi,%xmm0
mulss  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
@float_from_u8.scale = internal constant float 7.812500e-03
define float @float_from_u8(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = sub nsw i32 %4, 128
%6 = sitofp i32 %5 to float
%7 = fmul float %6, 7.812500e-03
ret float %7
}

LLVM IR (-O2):
define float @float_from_u8(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add nsw i32 %2, -128
%4 = sitofp i32 %3 to float
%5 = fmul float %4, 7.812500e-03
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_new_line(void) {
  printf("\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_new_line>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_new_line() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
scalar_t__ __VERIFIER_nondet_int();
int main() {
  int x, y;
  if (__VERIFIER_nondet_int()) {
    x = 0;
    y = 1;
  } else {
    x = 1;
    y = 0;
  }
  __VERIFIER_assert(x + y == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1153 <main+0x33>
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
jmp    1161 <main+0x41>
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 (...) @__VERIFIER_nondet_int()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %2
store i32 1, i32* %3
br label %8
7: ; preds = %0
store i32 1, i32* %2
store i32 0, i32* %3
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
%12 = icmp eq i32 %11, 1
%13 = zext i1 %12 to i32
%14 = call i32 @__VERIFIER_assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Send1(unsigned char, int);
void LCD_X_Write01(unsigned char Data) {
  ;
  Send1(Data, 1);
  ;
}


x86 assembly (clang, -O0):
<LCD_X_Write01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%esi
movzbl -0x1(%rbp),%edi
call   1030 <Send1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_X_Write01>:
mov    $0x1,%esi
jmp    1030 <Send1@plt>

LLVM IR (-O0):
define void @LCD_X_Write01(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @Send1(i8 zeroext %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @LCD_X_Write01(i8 zeroext %0) {
%2 = tail call i32 @Send1(i8 zeroext %0, i32 1)
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *sj_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<sj_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @sj_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ basic_test(int);
int /*<<< orphan*/ cleanup_test();
int /*<<< orphan*/ init_test();
int log_read_start(int);
void read_two_pages_start(void) {
  ssize_t n;
  init_test();
  n = log_read_start(8192);
  basic_test(n == 8192);
  cleanup_test();
}


x86 assembly (clang, -O0):
<read_two_pages_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_test@plt>
mov    $0x2000,%edi
call   1040 <log_read_start@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x2000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <basic_test@plt>
mov    $0x0,%al
call   1050 <cleanup_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_two_pages_start>:
push   %rax
xor    %eax,%eax
call   1060 <init_test@plt>
mov    $0x2000,%edi
call   1040 <log_read_start@plt>
xor    %edi,%edi
cmp    $0x2000,%eax
sete   %dil
call   1030 <basic_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cleanup_test@plt>

LLVM IR (-O0):
define void @read_two_pages_start() {
%1 = alloca i32
%2 = call i32 (...) @init_test()
%3 = call i32 @log_read_start(i32 8192)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 8192
%6 = zext i1 %5 to i32
%7 = call i32 @basic_test(i32 %6)
%8 = call i32 (...) @cleanup_test()
ret void
}

LLVM IR (-O2):
define void @read_two_pages_start() {
%1 = tail call i32 (...) @init_test()
%2 = tail call i32 @log_read_start(i32 8192)
%3 = icmp eq i32 %2, 8192
%4 = zext i1 %3 to i32
%5 = tail call i32 @basic_test(i32 %4)
%6 = tail call i32 (...) @cleanup_test()
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvins_wch(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvins_wch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvins_wch+0x2a>
jmp    1170 <cmd_mvins_wch+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvins_wch>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvins_wch+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvins_wch(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 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvins_wch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
void foo52() {}


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

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

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

LLVM IR (-O2):
define void @foo52() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ options(int, char **, int /*<<< orphan*/ **);
int /*<<< orphan*/ scramble(int /*<<< orphan*/, int /*<<< orphan*/ **);
int /*<<< orphan*/ seed(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  FILE *io_pipes[2];
  seed(NULL);
  scramble(options(argc, argv, io_pipes), io_pipes);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <seed@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <options@plt>
mov    %eax,%edi
lea    -0x20(%rbp),%rsi
call   1030 <scramble@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
call   1050 <seed@plt>
mov    %rsp,%r14
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <options@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <scramble@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @seed(i32* null)
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds [2 x i32*], [2 x i32*]* %6, i64 0, i64 0
%11 = call i32 @options(i32 %8, i8** %9, i32** %10)
%12 = getelementptr inbounds [2 x i32*], [2 x i32*]* %6, i64 0, i64 0
%13 = call i32 @scramble(i32 %11, i32** %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [2 x i32*]
%4 = bitcast [2 x i32*]* %3 to i8*
%5 = tail call i32 @seed(i32* null)
%6 = getelementptr inbounds [2 x i32*], [2 x i32*]* %3, i64 0, i64 0
%7 = call i32 @options(i32 %0, i8** %1, i32** %6)
%8 = call i32 @scramble(i32 %7, i32** %6)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
void ScaleRowDown2Box_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_C() {
ret void
}
int main(void) {
  unsigned int a;
  unsigned char b;
  for (a = 0, b = 2; a > b * 100; a++) {
    ;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movb   $0x2,-0x9(%rbp)
mov    -0x8(%rbp),%eax
movzbl -0x9(%rbp),%ecx
imul   $0x64,%ecx,%ecx
cmp    %ecx,%eax
jbe    113b <main+0x3b>
jmp    112d <main+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1116 <main+0x16>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
store i8 2, i8* %3
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = mul nsw i32 %7, 100
%9 = icmp ugt i32 %5, %8
br i1 %9, label %10, label %14
10: ; preds = %4
br label %11
11: ; preds = %10
%12 = load i32, i32* %2
%13 = add i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int fun354() { return 354; }


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

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

LLVM IR (-O0):
define i32 @fun354() {
ret i32 354
}

LLVM IR (-O2):
define i32 @fun354() {
ret i32 354
}
/* Variables and functions */
int /*<<< orphan*/ display_cleanup();
void done(void) { display_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @done() {
%1 = tail call i32 (...) @display_cleanup()
ret void
}
int shlib_visibility_checkcom() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @shlib_visibility_checkcom() {
ret i32 1
}