xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_lpm6(void) {
  printf("The LPM library is not included in this build\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"The LPM library is not included in this build\0A\00"
define i32 @test_lpm6() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [46 x i8] c"The LPM library is not included in this build\00"
define i32 @test_lpm6() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void set_tweak_in_tweakey(uint8_t *tweakey, uint8_t *tweak) {
  memcpy(tweakey + 32, tweak, 16);
}


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

x86 assembly (clang, -O2):
<set_tweak_in_tweakey>:
sub    $0xffffffffffffff80,%rdi
mov    $0x10,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @set_tweak_in_tweakey(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 32
%7 = load i32*, i32** %4
%8 = call i32 @memcpy(i32* %6, i32* %7, i32 16)
ret void
}

LLVM IR (-O2):
define void @set_tweak_in_tweakey(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 32
%4 = tail call i32 @memcpy(i32* %3, i32* %1, i32 16)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int UINT8_MAX;
uint8_t rotr8(uint8_t x, int n) {
  return ((x >> n) | (x << (8 - n))) & UINT8_MAX;
}


x86 assembly (clang, -O0):
<rotr8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x8,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    0x2eb6(%rip),%rcx
and    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr8>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shl    %cl,%edi
or     %edi,%eax
mov    0x2ec9(%rip),%rcx
and    (%rcx),%eax
ret

LLVM IR (-O0):
@UINT8_MAX = global i32 0
define i32 @rotr8(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 8, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
%13 = load i32, i32* @UINT8_MAX
%14 = and i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
@UINT8_MAX = global i32 0
define i32 @rotr8(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 8, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
%7 = load i32, i32* @UINT8_MAX
%8 = and i32 %7, %6
ret i32 %8
}
void *clrmem3(void *s) { return __builtin_memset(s, 0, 0); }


x86 assembly (clang, -O0):
<clrmem3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x10(%rbp)
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @clrmem3(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int ioctl(int, unsigned long, void *);
int xioctl(int fh, unsigned long int request, void *arg) {
  int r;
  do {
    r = ioctl(fh, request, arg);
  } while (-1 == r && EINTR == errno);
  return r;
}


x86 assembly (clang, -O0):
<xioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    -0x1c(%rbp),%ecx
mov    %al,-0x1d(%rbp)
jne    1163 <xioctl+0x53>
mov    0x2e88(%rip),%rax
mov    (%rax),%rax
mov    0x2e86(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1123 <xioctl+0x13>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xioctl>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb1(%rip),%r15
mov    0x2eb2(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    114b <xioctl+0x3b>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <xioctl+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EINTR = global i64 0
@errno = global i64 0
define i32 @xioctl(i32 %0, i64 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %4
%10 = load i64, i64* %5
%11 = load i8*, i8** %6
%12 = call i32 @ioctl(i32 %9, i64 %10, i8* %11)
store i32 %12, i32* %7
br label %13
13: ; preds = %8
%14 = load i32, i32* %7
%15 = icmp eq i32 -1, %14
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i64, i64* @EINTR
%18 = load i64, i64* @errno
%19 = icmp eq i64 %17, %18
br label %20
20: ; preds = %16, %13
%21 = phi i1 [ false, %13 ], [ %19, %16 ]
br i1 %21, label %8, label %22
22: ; preds = %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
@EINTR = global i64 0
@errno = global i64 0
define i32 @xioctl(i32 %0, i64 %1, i8* %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @ioctl(i32 %0, i64 %1, i8* %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @EINTR
%8 = load i64, i64* @errno
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
/* Variables and functions */
int gs();
int gs2();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ usleep(int);
int main(void) {
  while (1) {
    printf("%d %d\n", gs(), gs2());
    usleep(250000);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <gs@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <gs2@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
jmp    114f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <gs@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <gs2@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @gs()
%4 = call i32 (...) @gs2()
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @usleep(i32 250000)
br label %2
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @gs()
%3 = tail call i32 (...) @gs2()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = tail call i32 @usleep(i32 250000)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ test_link_traversal(int);
int /*<<< orphan*/ test_readlink();
int /*<<< orphan*/ test_realpath();
int /*<<< orphan*/ test_statfs(int);
void run_tests(bool nosymfollow) {
  test_link_traversal(nosymfollow);
  test_readlink();
  test_realpath();
  test_statfs(nosymfollow);
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <test_link_traversal@plt>
mov    $0x0,%al
call   1060 <test_readlink@plt>
mov    $0x0,%al
call   1030 <test_realpath@plt>
mov    -0x4(%rbp),%edi
call   1040 <test_statfs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rbx
mov    %edi,%ebx
call   1050 <test_link_traversal@plt>
xor    %eax,%eax
call   1060 <test_readlink@plt>
xor    %eax,%eax
call   1030 <test_realpath@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <test_statfs@plt>

LLVM IR (-O0):
define void @run_tests(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @test_link_traversal(i32 %3)
%5 = call i32 (...) @test_readlink()
%6 = call i32 (...) @test_realpath()
%7 = load i32, i32* %2
%8 = call i32 @test_statfs(i32 %7)
ret void
}

LLVM IR (-O2):
define void @run_tests(i32 %0) {
%2 = tail call i32 @test_link_traversal(i32 %0)
%3 = tail call i32 (...) @test_readlink()
%4 = tail call i32 (...) @test_realpath()
%5 = tail call i32 @test_statfs(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
void selinux_relabel_path(const char *path, const char *inside_path) {
  assert(path);
  assert(inside_path);
  (void)path;
  (void)inside_path;
}


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

x86 assembly (clang, -O2):
<selinux_relabel_path>:
push   %rbx
mov    %rsi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @selinux_relabel_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @assert(i8* %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @selinux_relabel_path(i8* %0, i8* %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i32 @assert(i8* %1)
ret void
}
void NV12ToRGB24() {}


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

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

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

LLVM IR (-O2):
define void @NV12ToRGB24() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cwd(char *);
void Cdup(char *param) { Cwd(".."); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"..\00"
define void @Cdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Cwd(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"..\00"
define void @Cdup(i8* nocapture readnone %0) {
%2 = tail call i32 @Cwd(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isxdigit(int /*<<< orphan*/);
int IsHexStr(const char *s) {
  while (*s) {
    if (!isxdigit(*s++))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<IsHexStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <IsHexStr+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%eax
jne    1155 <IsHexStr+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1161 <IsHexStr+0x51>
jmp    111c <IsHexStr+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsHexStr>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
test   %edi,%edi
je     1138 <IsHexStr+0x28>
add    $0x1,%rbx
call   1030 <isxdigit@plt>
test   %eax,%eax
jne    1120 <IsHexStr+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @IsHexStr(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = sext i8 %4 to i32
%9 = tail call i32 @isxdigit(i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2, %6
%12 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %12
}
/* Type definitions */
struct rte_json {
  int dummy;
};

/* Variables and functions */
char *print_value(struct rte_json *, int /*<<< orphan*/, int);
char *rte_serialize_json(struct rte_json *json, int fmt) {
  return print_value(json, 0, fmt);
}


x86 assembly (clang, -O0):
<rte_serialize_json>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1030 <print_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_serialize_json>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <print_value@plt>

LLVM IR (-O0):
%struct.rte_json = type { i32 }
define i8* @rte_serialize_json(%struct.rte_json* %0, i32 %1) {
%3 = alloca %struct.rte_json*
%4 = alloca i32
store %struct.rte_json* %0, %struct.rte_json** %3
store i32 %1, i32* %4
%5 = load %struct.rte_json*, %struct.rte_json** %3
%6 = load i32, i32* %4
%7 = call i8* @print_value(%struct.rte_json* %5, i32 0, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.rte_json = type { i32 }
define i8* @rte_serialize_json(%struct.rte_json* %0, i32 %1) {
%3 = tail call i8* @print_value(%struct.rte_json* %0, i32 0, i32 %1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ log10(double);
long double log10l(long double x) { return (long double)log10((double)x); }


x86 assembly (clang, -O0):
<log10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <log10@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10l>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <log10@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @log10(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @log10(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int, int);
int main(int argc, char *argv[]) {
  printf("Result is %d", sum(120, 140));
  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    $0x78,%edi
mov    $0x8c,%esi
call   1040 <sum@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Result is %d\00"
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 @sum(i32 120, i32 140)
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Result is %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sum(i32 120, i32 140)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int PAPI_set_domain(int);
void papif_set_domain_(int *domain, int *check) {
  *check = PAPI_set_domain(*domain);
}


x86 assembly (clang, -O0):
<papif_set_domain_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <PAPI_set_domain@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_set_domain_>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_set_domain@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_set_domain_(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_set_domain(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ imprimir_em_base(int, int);
int main() {
  int n = 4;
  int b = 2;
  imprimir_em_base(n, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x2,%esi
call   1030 <imprimir_em_base@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
store i32 4, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @imprimir_em_base(i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @imprimir_em_base(i32 4, i32 2)
ret i32 0
}
int test_imm_73int16_mem(short *val) {
  return ((*val) & (-0x73 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_73int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -115
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pr_exit(int);
int system(char *);
int main(void) {
  int status;
  if ((status = system("/bin/date")) < 0) {
    err_sys("system() error");
  }
  pr_exit(status);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <system@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1173 <main+0x33>
lea    0xe9c(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x8(%rbp),%edi
call   1050 <pr_exit@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1040 <system@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    115f <main+0x1f>
lea    0xeb0(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%edi
call   1050 <pr_exit@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/date\00"
@.str.1 = [15 x i8] c"system() error\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @err_sys(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %2
%9 = call i32 @pr_exit(i32 %8)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/date\00"
@.str.1 = [15 x i8] c"system() error\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @err_sys(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @pr_exit(i32 %1)
%7 = tail call i32 @exit(i32 0)
unreachable
}
void prefetch(const void *x) {
  __asm__ __volatile__("prefetchnta (%0)\n" ::"r"(x));
}


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

x86 assembly (clang, -O2):
<prefetch>:
prefetchnta (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetch(i8* %0) {
tail call void asm sideeffect "prefetchnta ($0)\0A", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dodir1(int, char **, int /*<<< orphan*/);
void dols(int ac, char **av) { dodir1(ac, av, 0); }


x86 assembly (clang, -O0):
<dols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <dodir1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dols>:
xor    %edx,%edx
jmp    1030 <dodir1@plt>

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

LLVM IR (-O2):
define void @dols(i32 %0, i8** %1) {
%3 = tail call i32 @dodir1(i32 %0, i8** %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ConfigureOscillator();
int /*<<< orphan*/ InitApp();
void main(void) {
  ConfigureOscillator();
  InitApp();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <ConfigureOscillator@plt>
mov    $0x0,%al
call   1030 <InitApp@plt>
jmp    1132 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <ConfigureOscillator@plt>
xor    %eax,%eax
call   1030 <InitApp@plt>
nop
jmp    1130 <main+0x10>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @ConfigureOscillator()
%2 = call i32 (...) @InitApp()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @ConfigureOscillator()
%2 = tail call i32 (...) @InitApp()
br label %3
3: ; preds = %0, %3
br label %3
}
char getDflag(char flags[]) { return flags[8 - 4]; }


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

x86 assembly (clang, -O2):
<getDflag>:
mov    0x4(%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @getDflag(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getDflag(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = load i8, i8* %2
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _error(char const *message, int ret) {
  fputs("utilbox"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"utilbox: \00"
@stderr = global i32 0
define i32 @_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"utilbox: \00"
@stderr = global i32 0
define i32 @_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int);
void *Prims_admit(void *_) {
  do {
    printf("Unimplemented function at %s:%d\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/briangmilnes/vale/refs/heads/master/"
           "tools/Kremlin/kremlib/kremlib.c",
           31);
    exit(254);
  } while (0);
}


x86 assembly (clang, -O0):
<Prims_admit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xecd(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x1f,%edx
call   1030 <printf@plt>
mov    $0xfe,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Prims_admit>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef2(%rip),%rsi
mov    $0x1f,%edx
call   1030 <printf@plt>
mov    $0xfe,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Unimplemented function at %s:%d\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/briangmilnes/vale/refs/heads/master/tools/Kremlin/kremlib/kremlib.c\00"
define i8* @Prims_admit(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 31)
%6 = call i32 @exit(i32 254)
unreachable
7: ; No predecessors!
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [33 x i8] c"Unimplemented function at %s:%d\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/briangmilnes/vale/refs/heads/master/tools/Kremlin/kremlib/kremlib.c\00"
define noalias i8* @Prims_admit(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 31)
%3 = tail call i32 @exit(i32 254)
unreachable
}
void INT_Excep_PERIB_INTB198(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB198() {
ret void
}
int bidir_sal(int value, int offset) {
  if (offset < 0)
    return value >> -offset;
  else
    return value << offset;
}


x86 assembly (clang, -O0):
<bidir_sal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1126 <bidir_sal+0x26>
mov    -0x8(%rbp),%eax
xor    %ecx,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <bidir_sal+0x31>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bidir_sal>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
sar    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
test   %esi,%esi
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bidir_sal(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
%4 = sub nsw i32 0, %1
%5 = ashr i32 %0, %4
%6 = shl i32 %0, %1
%7 = select i1 %3, i32 %5, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ opjumpr(char *, int);
void jumpr(int label) { opjumpr("", label); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @jumpr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @opjumpr(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @jumpr(i32 %0) {
%2 = tail call i32 @opjumpr(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
double roundDouble(double value) {
  int newValue = (int)(value);
  if (value - newValue < .5)
    return newValue;
  else
    return newValue++;
}


x86 assembly (clang, -O0):
<roundDouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xed9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1140 <roundDouble+0x40>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1154 <roundDouble+0x54>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundDouble>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @roundDouble(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
store i32 %6, i32* %4
%7 = load double, double* %3
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fsub double %7, %9
%11 = fcmp olt double %10, 5.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to double
store double %14, double* %2
br label %19
15: ; preds = %1
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
%18 = sitofp i32 %16 to double
store double %18, double* %2
br label %19
19: ; preds = %15, %12
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @roundDouble(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
void gtk_drag_source_unset() {}


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

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

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

LLVM IR (-O2):
define void @gtk_drag_source_unset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ACS_VLINE;
int /*<<< orphan*/ move(int /*<<< orphan*/, int);
int /*<<< orphan*/ vline(int /*<<< orphan*/, int);
void drawnet(void) {
  move(0, 38);
  vline(ACS_VLINE, 25);
}


x86 assembly (clang, -O0):
<drawnet>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x26,%esi
call   1040 <move@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    $0x19,%esi
call   1030 <vline@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawnet>:
push   %rax
xor    %edi,%edi
mov    $0x26,%esi
call   1040 <move@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    $0x19,%esi
pop    %rax
jmp    1030 <vline@plt>

LLVM IR (-O0):
@ACS_VLINE = global i32 0
define void @drawnet() {
%1 = call i32 @move(i32 0, i32 38)
%2 = load i32, i32* @ACS_VLINE
%3 = call i32 @vline(i32 %2, i32 25)
ret void
}

LLVM IR (-O2):
@ACS_VLINE = global i32 0
define void @drawnet() {
%1 = tail call i32 @move(i32 0, i32 38)
%2 = load i32, i32* @ACS_VLINE
%3 = tail call i32 @vline(i32 %2, i32 25)
ret void
}
int roman_digit_value(char digit) {
  switch (digit) {
  case 'I':
    return 1;
  case 'V':
    return 5;
  case 'X':
    return 10;
  case 'L':
    return 50;
  case 'C':
    return 100;
  case 'D':
    return 500;
  case 'M':
    return 1000;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<roman_digit_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     1188 <roman_digit_value+0x88>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0x5,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0xa,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0x32,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0x64,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0x1f4,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0x3e8,-0x4(%rbp)
jmp    118f <roman_digit_value+0x8f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roman_digit_value>:
add    $0xffffffbd,%edi
cmp    $0x15,%edi
ja     1129 <roman_digit_value+0x29>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x64,%eax
ret
mov    $0x1f4,%eax
ret
xor    %eax,%eax
ret
mov    $0x32,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret
mov    $0x3e8,%eax
ret

LLVM IR (-O0):
define i32 @roman_digit_value(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %13 [
i32 73, label %6
i32 86, label %7
i32 88, label %8
i32 76, label %9
i32 67, label %10
i32 68, label %11
i32 77, label %12
]
6: ; preds = %1
store i32 1, i32* %2
br label %14
7: ; preds = %1
store i32 5, i32* %2
br label %14
8: ; preds = %1
store i32 10, i32* %2
br label %14
9: ; preds = %1
store i32 50, i32* %2
br label %14
10: ; preds = %1
store i32 100, i32* %2
br label %14
11: ; preds = %1
store i32 500, i32* %2
br label %14
12: ; preds = %1
store i32 1000, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @roman_digit_value(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 73, label %10
i32 86, label %3
i32 88, label %4
i32 76, label %5
i32 67, label %6
i32 68, label %7
i32 77, label %8
]
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5, %4, %3
%11 = phi i32 [ 0, %9 ], [ 1000, %8 ], [ 500, %7 ], [ 100, %6 ], [ 50, %5 ], [ 10, %4 ], [ 5, %3 ], [ 1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, char const *, int);
int gsmEncode8bit(const char *pSrc, unsigned char *pDst, int nSrcLength) {
  memcpy(pDst, pSrc, nSrcLength);
  return nSrcLength;
}


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

x86 assembly (clang, -O2):
<gsmEncode8bit>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @gsmEncode8bit(i8* %0, i8* %1, i32 returned %2) {
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i32 %2)
ret i32 %2
}
void ARGBMultiplyRow_C() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv16_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness4(unsigned a) {
  int max = ((~0U) & ((~0U) >> 1));
  clang_analyzer_eval(a <= max);
  clang_analyzer_eval((a + 2) <= max);
  clang_analyzer_eval((a + 2U) <= max);
}


x86 assembly (clang, -O0):
<mixedSignedness4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness4>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0xfffffffd,%ebp
sub    %ebx,%ebp
shr    $0x1f,%ebp
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2147483647, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ule i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ule i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ule i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness4(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = sub i32 -3, %0
%6 = lshr i32 %5, 31
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = tail call i32 @clang_analyzer_eval(i32 %6)
ret void
}
int main(void) { ; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned be_uint8_read(const void *ptr) { return *(const unsigned char *)ptr; }


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

x86 assembly (clang, -O2):
<be_uint8_read>:
movzbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @be_uint8_read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @be_uint8_read(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ cpputest_free_location(void *, char *, int);
void freeAllocation(void *memory) {
  cpputest_free_location(
      memory,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/Pindar/common-data-structures-in-c/refs/heads/"
      "master/Code/Mug_tdd/tests/CppUTest/tests/AllocationInCFile.c",
      14);
}


x86 assembly (clang, -O0):
<freeAllocation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0xe,%edx
call   1030 <cpputest_free_location@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeAllocation>:
lea    0xee9(%rip),%rsi
mov    $0xe,%edx
jmp    1030 <cpputest_free_location@plt>

LLVM IR (-O0):
@.str = [197 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Pindar/common-data-structures-in-c/refs/heads/master/Code/Mug_tdd/tests/CppUTest/tests/AllocationInCFile.c\00"
define void @freeAllocation(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @cpputest_free_location(i8* %3, i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}

LLVM IR (-O2):
@.str = [197 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Pindar/common-data-structures-in-c/refs/heads/master/Code/Mug_tdd/tests/CppUTest/tests/AllocationInCFile.c\00"
define void @freeAllocation(i8* %0) {
%2 = tail call i32 @cpputest_free_location(i8* %0, i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}
int memcm(unsigned char *dst, unsigned char *src, unsigned long dwLen) {
  int offset = 0;
  while (offset < dwLen) {
    if (*dst != *src)
      return (offset + 1);
    offset++;
    src++;
    dst++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<memcm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    116f <memcm+0x6f>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
je     1149 <memcm+0x49>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <memcm+0x76>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <memcm+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcm>:
test   %rdx,%rdx
je     1122 <memcm+0x22>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movzbl (%rdi,%rax,1),%ecx
cmp    (%rsi,%rax,1),%cl
jne    1125 <memcm+0x25>
add    $0x1,%rax
cmp    %rax,%rdx
jne    1110 <memcm+0x10>
xor    %eax,%eax
ret
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @memcm(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %20, label %5
5: ; preds = %3, %15
%6 = phi i64 [ %16, %15 ], [ 0, %3 ]
%7 = phi i8* [ %17, %15 ], [ %1, %3 ]
%8 = phi i8* [ %18, %15 ], [ %0, %3 ]
%9 = load i8, i8* %8
%10 = load i8, i8* %7
%11 = icmp eq i8 %9, %10
br i1 %11, label %15, label %12
12: ; preds = %5
%13 = trunc i64 %6 to i32
%14 = add nuw nsw i32 %13, 1
br label %20
15: ; preds = %5
%16 = add nuw i64 %6, 1
%17 = getelementptr inbounds i8, i8* %7, i64 1
%18 = getelementptr inbounds i8, i8* %8, i64 1
%19 = icmp eq i64 %16, %2
br i1 %19, label %20, label %5
20: ; preds = %15, %3, %12
%21 = phi i32 [ %14, %12 ], [ 0, %3 ], [ 0, %15 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ rd_1dim_slice(int *, int, int, int /*<<< orphan*/);
void rd_1dim(int *array, int dim, int shift) {
  rd_1dim_slice(array, dim, shift, 0);
}


x86 assembly (clang, -O0):
<rd_1dim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
xor    %ecx,%ecx
call   1030 <rd_1dim_slice@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_1dim>:
xor    %ecx,%ecx
jmp    1030 <rd_1dim_slice@plt>

LLVM IR (-O0):
define void @rd_1dim(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 @rd_1dim_slice(i32* %7, i32 %8, i32 %9, i32 0)
ret void
}

LLVM IR (-O2):
define void @rd_1dim(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @rd_1dim_slice(i32* %0, i32 %1, i32 %2, i32 0)
ret void
}