xunge/DecIR huggingface dataset:
unsigned long xSysTickValueGet(void) {
  return ((*((volatile unsigned long *)(0xE000E018))));
}


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

x86 assembly (clang, -O2):
<xSysTickValueGet>:
mov    $0xe000e018,%eax
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i64 @xSysTickValueGet() {
%1 = load volatile i64, i64* inttoptr (i64 3758153752 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @xSysTickValueGet() {
%1 = load volatile i64, i64* inttoptr (i64 3758153752 to i64*)
ret i64 %1
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int sendto(int, char *, int, int, struct sockaddr const *, int);
int INET_sendto(int socket, char *message_addr, int length, int flags,
                struct sockaddr_in *dest_addr, int dest_len) {
  return sendto(socket, message_addr, length, flags,
                (const struct sockaddr *)dest_addr, dest_len);
}


x86 assembly (clang, -O0):
<INET_sendto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
call   1030 <sendto@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INET_sendto>:
jmp    1030 <sendto@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @INET_sendto(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr_in* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.sockaddr_in*
%12 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store %struct.sockaddr_in* %4, %struct.sockaddr_in** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr_in*, %struct.sockaddr_in** %11
%18 = bitcast %struct.sockaddr_in* %17 to %struct.sockaddr*
%19 = load i32, i32* %12
%20 = call i32 @sendto(i32 %13, i8* %14, i32 %15, i32 %16, %struct.sockaddr* %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @INET_sendto(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr_in* %4, i32 %5) {
%7 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%8 = tail call i32 @sendto(i32 %0, i8* %1, i32 %2, i32 %3, %struct.sockaddr* %7, i32 %5)
ret i32 %8
}
/* Variables and functions */
int pow(int, int);
double volume(int diameter) {
  return (double)((4 / 3) * 3.14159265358979323846 * pow((diameter / 2), 3));
}


x86 assembly (clang, -O0):
<volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    $0x3,%esi
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec2(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<volume>:
push   %rax
mov    %edi,%eax
shr    $0x1f,%eax
add    %eax,%edi
sar    %edi
mov    $0x3,%esi
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xed0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @volume(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 2
%5 = call i32 @pow(i32 %4, i32 3)
%6 = sitofp i32 %5 to double
%7 = fmul double 0x400921FB54442D18, %6
ret double %7
}

LLVM IR (-O2):
define double @volume(i32 %0) {
%2 = sdiv i32 %0, 2
%3 = tail call i32 @pow(i32 %2, i32 3)
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 0x400921FB54442D18
ret double %5
}
void jmm_test_cell_s(unsigned int ptr) {
  *(unsigned short *)ptr = 0x5678;
  *(unsigned short *)(ptr + 2) = 0x1234;
}


x86 assembly (clang, -O0):
<jmm_test_cell_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movw   $0x5678,(%rax)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,%eax
movw   $0x1234,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jmm_test_cell_s>:
mov    %edi,%eax
movw   $0x5678,(%rax)
add    $0x2,%edi
movw   $0x1234,(%rdi)
ret

LLVM IR (-O0):
define void @jmm_test_cell_s(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i16*
store i16 22136, i16* %5
%6 = load i32, i32* %2
%7 = add i32 %6, 2
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i16*
store i16 4660, i16* %9
ret void
}

LLVM IR (-O2):
define void @jmm_test_cell_s(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i16*
store i16 22136, i16* %3
%4 = add i32 %0, 2
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i16*
store i16 4660, i16* %6
ret void
}
void ASN1_template_i2d(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_template_i2d() {
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) const char *
sd_bus_message_get_destination(void *m) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_bus_message_get_destination(i8* nocapture readnone %0) {
ret i8* null
}
int dbg_debugfs_init_fs(struct ubifs_info *c) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define i32 @dbg_debugfs_init_fs(%struct.ubifs_info* nocapture readnone %0) {
ret i32 0
}
int mapcel_svc_seek(void *fp, long offset, int whence) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mapcel_svc_seek(i8* nocapture readnone %0, i64 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
bool ishsurrogate(uint16_t c) { return (c >= 0xd800 && c <= 0xdbff); }


x86 assembly (clang, -O0):
<ishsurrogate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xd800,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <ishsurrogate+0x26>
cmpl   $0xdbff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ishsurrogate>:
and    $0xfffffc00,%edi
xor    %eax,%eax
cmp    $0xd800,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @ishsurrogate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 55296
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 56319
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ishsurrogate(i32 %0) {
%2 = and i32 %0, -1024
%3 = icmp eq i32 %2, 55296
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ alloc1();
int /*<<< orphan*/ free1(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  free1(alloc1());
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @alloc1()
%4 = tail call i32 @free1(i32 %3)
ret i32 0
}
int test_imm_26int16_reg(short val) {
  return ((val) & (-0x26 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_26int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -38
%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_26int16_reg(i16 signext %0) {
%2 = and i16 %0, -38
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printb(int);
int /*<<< orphan*/ printd(int);
void rightp(int a, int b) {
  int *p;
  printb(a);
  print(" >>= ");
  printd(b);
  print(" -> ");
  p = &a;
  *p >>= b;
  printb(*p);
  print("\r\n");
}


x86 assembly (clang, -O0):
<rightp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <printb@plt>
lea    0xeb3(%rip),%rdi
call   1050 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printd@plt>
lea    0xea5(%rip),%rdi
call   1050 <print@plt>
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
sar    %cl,%edx
mov    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <printb@plt>
lea    0xe7c(%rip),%rdi
call   1050 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightp>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <printb@plt>
lea    0xebd(%rip),%rdi
call   1050 <print@plt>
mov    %ebx,%edi
call   1040 <printd@plt>
lea    0xeb0(%rip),%rdi
call   1050 <print@plt>
mov    %ebx,%ecx
sar    %cl,%ebp
mov    %ebp,%edi
call   1030 <printb@plt>
lea    0xe9e(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <print@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" >>= \00"
@.str.1 = [5 x i8] c" -> \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @rightp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @printb(i32 %6)
%8 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = call i32 @printd(i32 %9)
%11 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %5
%12 = load i32, i32* %4
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = ashr i32 %14, %12
store i32 %15, i32* %13
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = call i32 @printb(i32 %17)
%19 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" >>= \00"
@.str.1 = [5 x i8] c" -> \00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @rightp(i32 %0, i32 %1) {
%3 = tail call i32 @printb(i32 %0)
%4 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printd(i32 %1)
%6 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = ashr i32 %0, %1
%8 = tail call i32 @printb(i32 %7)
%9 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int abs(int);
int path_distance(int x0, int y0, int x1, int y1) {
  int dx, dy;
  dx = abs(x0 - x1);
  dy = abs(y0 - y1);
  return (dx > dy) ? dx : dy;
}


x86 assembly (clang, -O0):
<path_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1157 <path_distance+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    115d <path_distance+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_distance>:
sub    %edx,%edi
mov    %edi,%edx
neg    %edx
cmovs  %edi,%edx
sub    %ecx,%esi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
cmp    %eax,%edx
cmova  %edx,%eax
ret

LLVM IR (-O0):
define i32 @path_distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = sub nsw i32 %11, %12
%14 = call i32 @abs(i32 %13)
store i32 %14, i32* %9
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = sub nsw i32 %15, %16
%18 = call i32 @abs(i32 %17)
store i32 %18, i32* %10
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %4
%23 = load i32, i32* %9
br label %26
24: ; preds = %4
%25 = load i32, i32* %10
br label %26
26: ; preds = %24, %22
%27 = phi i32 [ %23, %22 ], [ %25, %24 ]
ret i32 %27
}

LLVM IR (-O2):
define i32 @path_distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = tail call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = sub nsw i32 %1, %3
%8 = tail call i32 @llvm.abs.i32(i32 %7, i1 true)
%9 = icmp ugt i32 %6, %8
%10 = select i1 %9, i32 %6, i32 %8
ret i32 %10
}
/* Variables and functions */
int do_test(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int status;
  status = 0;
  fprintf(stderr, "Arguments: %d %s %s\n", argc, argv[0], argv[1]);
  status = do_test(argv[1]);
  return status;
}


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   $0x0,-0x14(%rbp)
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%r8
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <do_test@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%edx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rcx
mov    0x8(%rsi),%r8
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x8(%rbx),%rdi
pop    %rbx
jmp    1040 <do_test@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Arguments: %d %s %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %11, i8* %14)
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @do_test(i8* %18)
store i32 %19, i32* %6
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Arguments: %d %s %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %4, i8* %6)
%8 = load i8*, i8** %5
%9 = tail call i32 @do_test(i8* %8)
ret i32 %9
}
void free_firmware_cache(struct echoaudio *chip) {}


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

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

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

LLVM IR (-O2):
%struct.echoaudio = type opaque
define void @free_firmware_cache(%struct.echoaudio* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
void output_values_length_metric(double main_out_value, double sec_out_value) {
  printf("Your converted value is %g meters, %g centimeters\n\n",
         main_out_value, sec_out_value);
}


x86 assembly (clang, -O0):
<output_values_length_metric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [52 x i8] c"Your converted value is %g meters, %g centimeters\0A\0A\00"
define void @output_values_length_metric(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 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %5, double %6)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Your converted value is %g meters, %g centimeters\0A\0A\00"
define void @output_values_length_metric(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %0, double %1)
ret void
}
/* Variables and functions */
char *save_calloc(char *, char *, int, scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *gmx_strdup(const char *src) {
  char *dest;
  (dest) = save_calloc("dest",
                       "/scratch/repos/new/home/jordi_armengol_estape/"
                       "c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/"
                       "cere/refs/heads/master/tests/test_07/string2.c",
                       227, (strlen(src) + 1), sizeof(*(dest)));
  strcpy(dest, src);
  return dest;
}


x86 assembly (clang, -O0):
<gmx_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rcx
add    $0x1,%rcx
lea    0xead(%rip),%rdi
lea    0xeab(%rip),%rsi
mov    $0xe3,%edx
mov    $0x1,%r8d
call   1040 <save_calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
lea    0x1(%rax),%rcx
lea    0xeb9(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0xe3,%edx
mov    $0x1,%r8d
call   1040 <save_calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"dest\00"
@.str.1 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/string2.c\00"
define i8* @gmx_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @save_calloc(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 227, i64 %6, i32 1)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"dest\00"
@.str.1 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/string2.c\00"
define i8* @gmx_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @save_calloc(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 227, i64 %3, i32 1)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
void kfunc_p(const char *i __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @kfunc_p(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  time_t now;
  struct tm *ts;
  char buf[80];
  now = time(NULL);
  ts = localtime(&now);
  strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S %Z", ts);
  puts(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x50,%esi
lea    0xe84(%rip),%rdx
call   1060 <strftime@plt>
lea    -0x60(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xe9f(%rip),%rdx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [24 x i8] c"%a %Y-%m-%d %H:%M:%S %Z\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.tm*
%4 = alloca [80 x i8]
store i32 0, i32* %1
%5 = call i32 @time(i32* null)
store i32 %5, i32* %2
%6 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %6, %struct.tm** %3
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%8 = load %struct.tm*, %struct.tm** %3
%9 = call i32 @strftime(i8* %7, i32 80, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [24 x i8] c"%a %Y-%m-%d %H:%M:%S %Z\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %1
%6 = call %struct.tm* @localtime(i32* %1)
%7 = call i32 @strftime(i8* %4, i32 80, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%8 = call i32 @puts(i8* %4)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
void byteorder_htobebufs(uint8_t *buf, uint16_t val) {
  buf[0] = (uint8_t)(val >> 8);
  buf[1] = (uint8_t)(val >> 0);
}


x86 assembly (clang, -O0):
<byteorder_htobebufs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteorder_htobebufs>:
movslq %esi,%rax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,(%rdi)
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @byteorder_htobebufs(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 0
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %3
%14 = getelementptr inbounds i64, i64* %13, i64 1
store i64 %12, i64* %14
ret void
}

LLVM IR (-O2):
define void @byteorder_htobebufs(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %5, i64* %6
ret void
}
unsigned __divu5(unsigned int n) {
  unsigned int q, r;
  q = (n >> 3) + (n >> 4);
  q = q + (q >> 4);
  q = q + (q >> 8);
  q = q + (q >> 16);
  r = n - q * 5;
  return q + (13 * r >> 6);
}


x86 assembly (clang, -O0):
<__divu5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x3,%eax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x5,-0x8(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   $0xd,-0xc(%rbp),%ecx
shr    $0x6,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__divu5>:
mov    %edi,%eax
shr    $0x3,%eax
mov    %edi,%ecx
shr    $0x4,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x10,%edx
add    %ecx,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%edi
lea    (%rdi,%rdi,2),%eax
lea    (%rdi,%rax,4),%eax
shr    $0x6,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @__divu5(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 3
%7 = load i32, i32* %2
%8 = lshr i32 %7, 4
%9 = add i32 %6, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = lshr i32 %11, 4
%13 = add i32 %10, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = lshr i32 %15, 8
%17 = add i32 %14, %16
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = load i32, i32* %3
%20 = lshr i32 %19, 16
%21 = add i32 %18, %20
store i32 %21, i32* %3
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = mul i32 %23, 5
%25 = sub i32 %22, %24
store i32 %25, i32* %4
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = mul i32 13, %27
%29 = lshr i32 %28, 6
%30 = add i32 %26, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @__divu5(i32 %0) {
%2 = lshr i32 %0, 3
%3 = lshr i32 %0, 4
%4 = add nuw nsw i32 %2, %3
%5 = lshr i32 %4, 4
%6 = add nuw nsw i32 %5, %4
%7 = lshr i32 %6, 8
%8 = add nuw nsw i32 %7, %6
%9 = lshr i32 %8, 16
%10 = add nuw nsw i32 %9, %8
%11 = mul i32 %10, -5
%12 = add i32 %11, %0
%13 = mul i32 %12, 13
%14 = lshr i32 %13, 6
%15 = add nuw nsw i32 %14, %10
ret i32 %15
}
float builtin_fmaf(float b, float c, float d) {
  return __builtin_fmaf(b, c, -d);
}


x86 assembly (clang, -O0):
<builtin_fmaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <fmaf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_fmaf>:
xorps  0xee9(%rip),%xmm2
jmp    1030 <fmaf@plt>

LLVM IR (-O0):
define float @builtin_fmaf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fneg float %9
%11 = call float @llvm.fma.f32(float %7, float %8, float %10)
ret float %11
}

LLVM IR (-O2):
define float @builtin_fmaf(float %0, float %1, float %2) {
%4 = fneg float %2
%5 = tail call float @llvm.fma.f32(float %0, float %1, float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ *getenv(char *);
unsigned int rtlsdr_rpc_is_enabled(void) {
  static unsigned int is_enabled = (unsigned int)-1;
  if (is_enabled == (unsigned int)-1)
    is_enabled = (getenv("RTLSDR_RPC_IS_ENABLED") != NULL);
  return is_enabled;
}


x86 assembly (clang, -O0):
<rtlsdr_rpc_is_enabled>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0xffffffff,0x2f0d(%rip)
jne    113f <rtlsdr_rpc_is_enabled+0x2f>
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,0x2ee9(%rip)
mov    0x2ee3(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtlsdr_rpc_is_enabled>:
push   %rax
mov    0x2f11(%rip),%eax
cmp    $0xffffffff,%eax
je     111e <rtlsdr_rpc_is_enabled+0xe>
pop    %rcx
ret
lea    0xedb(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
mov    %eax,0x2eed(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@rtlsdr_rpc_is_enabled.is_enabled = internal global i32 -1
@.str = [22 x i8] c"RTLSDR_RPC_IS_ENABLED\00"
define i32 @rtlsdr_rpc_is_enabled() {
%1 = load i32, i32* @rtlsdr_rpc_is_enabled.is_enabled
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32* @getenv(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
store i32 %6, i32* @rtlsdr_rpc_is_enabled.is_enabled
br label %7
7: ; preds = %3, %0
%8 = load i32, i32* @rtlsdr_rpc_is_enabled.is_enabled
ret i32 %8
}

LLVM IR (-O2):
@rtlsdr_rpc_is_enabled.is_enabled = internal unnamed_addr global i32 -1
@.str = [22 x i8] c"RTLSDR_RPC_IS_ENABLED\00"
define i32 @rtlsdr_rpc_is_enabled() {
%1 = load i32, i32* @rtlsdr_rpc_is_enabled.is_enabled
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32* @getenv(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
store i32 %6, i32* @rtlsdr_rpc_is_enabled.is_enabled
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ %6, %3 ], [ %1, %0 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ yuvPlanartouyvy_C(int /*<<< orphan*/ const *,
                                     int /*<<< orphan*/ const *,
                                     int /*<<< orphan*/ const *,
                                     int /*<<< orphan*/ *, unsigned int,
                                     unsigned int, int, int, int, int);
void yv12touyvy_C(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,
                  uint8_t *dst, unsigned int width, unsigned int height,
                  int lumStride, int chromStride, int dstStride) {
  yuvPlanartouyvy_C(ysrc, usrc, vsrc, dst, width, height, lumStride,
                    chromStride, dstStride, 2);
}


x86 assembly (clang, -O0):
<yv12touyvy_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x2,0x18(%rsp)
call   1030 <yuvPlanartouyvy_C@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yv12touyvy_C>:
push   %rax
mov    0x10(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x20(%rsp),%eax
push   $0x2
push   %rax
push   %r11
push   %r10
call   1030 <yuvPlanartouyvy_C@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @yv12touyvy_C(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32*, i32** %10
%20 = load i32*, i32** %11
%21 = load i32*, i32** %12
%22 = load i32*, i32** %13
%23 = load i32, i32* %14
%24 = load i32, i32* %15
%25 = load i32, i32* %16
%26 = load i32, i32* %17
%27 = load i32, i32* %18
%28 = call i32 @yuvPlanartouyvy_C(i32* %19, i32* %20, i32* %21, i32* %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 2)
ret void
}

LLVM IR (-O2):
define void @yv12touyvy_C(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = tail call i32 @yuvPlanartouyvy_C(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 2)
ret void
}
/* Type definitions */
struct passwd {
  unsigned long pw_uid;
};

/* Variables and functions */
unsigned long _parse_ul(char *, char const *);
struct passwd *getpwnam(char const *);
unsigned long _uid(const char *user) {
  struct passwd *pw = getpwnam(user);
  if (pw != NULL) {
    return pw->pw_uid;
  } else {
    return _parse_ul("user", user);
  }
}


x86 assembly (clang, -O0):
<_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getpwnam@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1154 <_uid+0x34>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <_uid+0x48>
mov    -0x10(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1030 <_parse_ul@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_uid>:
push   %rbx
mov    %rdi,%rbx
call   1040 <getpwnam@plt>
test   %rax,%rax
je     1133 <_uid+0x13>
mov    (%rax),%rax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <_parse_ul@plt>

LLVM IR (-O0):
%struct.passwd = type { i64 }
@.str = [5 x i8] c"user\00"
define i64 @_uid(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca %struct.passwd*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call %struct.passwd* @getpwnam(i8* %5)
store %struct.passwd* %6, %struct.passwd** %4
%7 = load %struct.passwd*, %struct.passwd** %4
%8 = icmp ne %struct.passwd* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load %struct.passwd*, %struct.passwd** %4
%11 = getelementptr inbounds %struct.passwd, %struct.passwd* %10, i32 0, i32 0
%12 = load i64, i64* %11
store i64 %12, i64* %2
br label %16
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i64 @_parse_ul(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %14)
store i64 %15, i64* %2
br label %16
16: ; preds = %13, %9
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
%struct.passwd = type { i64 }
@.str = [5 x i8] c"user\00"
define i64 @_uid(i8* %0) {
%2 = tail call %struct.passwd* @getpwnam(i8* %0)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i64, i64* %5
br label %9
7: ; preds = %1
%8 = tail call i64 @_parse_ul(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %4
%10 = phi i64 [ %6, %4 ], [ %8, %7 ]
ret i64 %10
}
int get_parent(int index) {
  if (index == 1 || index == 0 || index == 2)
    return 0;
  if (index % 2 == 0)
    return index / 2 - 1;
  else
    return index / 2;
}


x86 assembly (clang, -O0):
<get_parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1125 <get_parent+0x25>
cmpl   $0x0,-0x8(%rbp)
je     1125 <get_parent+0x25>
cmpl   $0x2,-0x8(%rbp)
jne    1131 <get_parent+0x31>
movl   $0x0,-0x4(%rbp)
jmp    1169 <get_parent+0x69>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115b <get_parent+0x5b>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <get_parent+0x69>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_parent>:
xor    %eax,%eax
cmp    $0x3,%edi
jb     111a <get_parent+0x1a>
mov    %edi,%eax
and    $0x1,%eax
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
add    %ecx,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @get_parent(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = sdiv i32 %0, 2
%6 = add nsw i32 %4, -1
%7 = add nsw i32 %5, %6
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
void hal_system_reset(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<hal_system_reset>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <hal_system_reset+0x9>
jmp    1109 <hal_system_reset+0x9>

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

LLVM IR (-O0):
define void @hal_system_reset() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @hal_system_reset() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int socket(int, int, int);
int _socket(int domain, int type, int protocol) {
  return socket(domain, type, protocol);
}


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

x86 assembly (clang, -O2):
<_socket>:
jmp    1030 <socket@plt>

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

LLVM IR (-O2):
define i32 @_socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void testLogicalOr() { printf("%d || %d = %d\n", 10, 4, 10 || 4); }


x86 assembly (clang, -O0):
<testLogicalOr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLogicalOr>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%d || %d = %d\0A\00"
define void @testLogicalOr() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 10, i32 4, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main() {
  f();
#pragma omp taskwait
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main(void) {
  char c = 'Q';
  char *char_pointer = &c;
  printf("%c %c\n", c, *char_pointer);
  c = '/';
  printf("%c %c\n", c, *char_pointer);
  c = '(';
  printf("%c %c\n", c, *char_pointer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x51,-0x5(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
lea    0xec7(%rip),%rdi
movsbl %cl,%esi
movsbl (%rax),%edx
call   1030 <printf@plt>
movb   $0x2f,-0x5(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
lea    0xeaa(%rip),%rdi
movsbl %cl,%esi
movsbl (%rax),%edx
call   1030 <printf@plt>
movb   $0x28,-0x5(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
lea    0xe8d(%rip),%rdi
movsbl %cl,%esi
movsbl (%rax),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x51,%esi
mov    $0x51,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
mov    $0x2f,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x28,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 81, i8 signext 81)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 47, i8 signext 47)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 40, i8 signext 40)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0) {
    while (y > 0) {
      y = y - 1;
    }
    x = x - 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>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1168 <main+0x58>
jmp    1142 <main+0x32>
cmpl   $0x0,-0xc(%rbp)
jle    115a <main+0x4a>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <main+0x32>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
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>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@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 i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6
br label %10
10: ; preds = %13, %9
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %10
16: ; preds = %10
%17 = load i32, i32* %2
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %2
br label %6
19: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void CloseSubseqLayerInfo() {}


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

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

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

LLVM IR (-O2):
define void @CloseSubseqLayerInfo() {
ret void
}
/* Variables and functions */
int pop();
int /*<<< orphan*/ push(int);
void apply_add(void) {
  int arg2 = pop();
  int arg1 = pop();
  push(arg1 + arg2);
}


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

x86 assembly (clang, -O2):
<apply_add>:
push   %rbx
xor    %eax,%eax
call   1030 <pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <pop@plt>
add    %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @apply_add() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @pop()
store i32 %3, i32* %1
%4 = call i32 (...) @pop()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %1
%7 = add nsw i32 %5, %6
%8 = call i32 @push(i32 %7)
ret void
}

LLVM IR (-O2):
define void @apply_add() {
%1 = tail call i32 (...) @pop()
%2 = tail call i32 (...) @pop()
%3 = add nsw i32 %2, %1
%4 = tail call i32 @push(i32 %3)
ret void
}
void BN_pseudo_rand_range(void) {}


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

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

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

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