xunge/DecIR huggingface dataset:
int test_imm_DBuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xDB << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_DBuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 219
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int __murmur_fmix(int);
uint32_t __rev_mix(uint32_t data, uint32_t counter) {
  return __murmur_fmix(data) * 7 + __murmur_fmix(counter);
}


x86 assembly (clang, -O0):
<__rev_mix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__murmur_fmix@plt>
imul   $0x7,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <__murmur_fmix@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rev_mix>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <__murmur_fmix@plt>
lea    0x0(,%rax,8),%ebp
sub    %eax,%ebp
mov    %ebx,%edi
call   1030 <__murmur_fmix@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @__rev_mix(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 = call i32 @__murmur_fmix(i32 %5)
%7 = mul nsw i32 %6, 7
%8 = load i32, i32* %4
%9 = call i32 @__murmur_fmix(i32 %8)
%10 = add nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @__rev_mix(i32 %0, i32 %1) {
%3 = tail call i32 @__murmur_fmix(i32 %0)
%4 = mul nsw i32 %3, 7
%5 = tail call i32 @__murmur_fmix(i32 %1)
%6 = add nsw i32 %4, %5
ret i32 %6
}
void _copy(char f[], char t[]) {
  int i = 0;
  while (f[i] != '\0') {
    t[i] = f[i];
    ++i;
  }
}


x86 assembly (clang, -O0):
<_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <_copy+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <_copy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_copy>:
mov    (%rdi),%al
test   %al,%al
je     1120 <_copy+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rsi,%rcx,1)
movzbl 0x1(%rdi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <_copy+0x10>
ret

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

LLVM IR (-O2):
define void @_copy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getstr(char **, size_t *, int /*<<< orphan*/ *, char, int /*<<< orphan*/);
char *fgetln(FILE *stream, size_t *lenp) {
  static char *p = NULL;
  static size_t psize = 0;
  ssize_t len;
  len = getstr(&p, &psize, stream, '\n', 0);
  *lenp = len;
  return len == -1 ? NULL : p;
}


x86 assembly (clang, -O0):
<fgetln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
lea    0x2f05(%rip),%rdi
lea    0x2f06(%rip),%rsi
mov    $0xa,%ecx
xor    %r8d,%r8d
call   1030 <getstr@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1162 <fgetln+0x52>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    116d <fgetln+0x5d>
mov    0x2ec7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetln>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rdx
lea    0x2f0f(%rip),%rdi
lea    0x2f10(%rip),%rsi
xor    %ebx,%ebx
mov    $0xa,%ecx
xor    %r8d,%r8d
call   1030 <getstr@plt>
cltq
mov    %rax,(%r14)
cmp    $0xffffffff,%eax
je     1148 <fgetln+0x38>
mov    0x2ee8(%rip),%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@fgetln.p = internal global i8* null
@fgetln.psize = internal global i64 0
define i8* @fgetln(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
%5 = alloca i32
store i32* %0, i32** %3
store i64* %1, i64** %4
%6 = load i32*, i32** %3
%7 = call i32 @getstr(i8** @fgetln.p, i64* @fgetln.psize, i32* %6, i8 signext 10, i32 0)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = load i64*, i64** %4
store i64 %9, i64* %10
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %2
br label %16
14: ; preds = %2
%15 = load i8*, i8** @fgetln.p
br label %16
16: ; preds = %14, %13
%17 = phi i8* [ null, %13 ], [ %15, %14 ]
ret i8* %17
}

LLVM IR (-O2):
@fgetln.p = internal global i8* null
@fgetln.psize = internal global i64 0
define i8* @fgetln(i32* %0, i64* nocapture writeonly %1) {
%3 = tail call i32 @getstr(i8** @fgetln.p, i64* @fgetln.psize, i32* %0, i8 signext 10, i32 0)
%4 = sext i32 %3 to i64
store i64 %4, i64* %1
%5 = icmp eq i32 %3, -1
%6 = load i8*, i8** @fgetln.p
%7 = select i1 %5, i8* null, i8* %6
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ fibonacci(int);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
int main(void) {
  int i, n = 50;
  for (i = 0; i <= n; i++)
    printf("Fibonacci of %02i is equal to %lld\n", i, fibonacci(i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1176 <main+0x56>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fibonacci@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1040 <fibonacci@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x33,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Fibonacci of %02i is equal to %lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 50, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp sle i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @fibonacci(i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Fibonacci of %02i is equal to %lld\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @fibonacci(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 51
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *ltr_int_my_strcat(char const *, char const *);
char *ltr_int_get_data_path_prefix(const char *data, const char *prefix) {
  char *app_path = ltr_int_my_strcat(prefix, "/../share/linuxtrack/");
  char *data_path = ltr_int_my_strcat(app_path, data);
  free(app_path);
  return data_path;
}


x86 assembly (clang, -O0):
<ltr_int_get_data_path_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <ltr_int_my_strcat@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <ltr_int_my_strcat@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltr_int_get_data_path_prefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    %rax,%rdi
call   1040 <ltr_int_my_strcat@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <ltr_int_my_strcat@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/../share/linuxtrack/\00"
define i8* @ltr_int_get_data_path_prefix(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i8* @ltr_int_my_strcat(i8* %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = call i8* @ltr_int_my_strcat(i8* %9, i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
@.str = [22 x i8] c"/../share/linuxtrack/\00"
define i8* @ltr_int_get_data_path_prefix(i8* %0, i8* %1) {
%3 = tail call i8* @ltr_int_my_strcat(i8* %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @ltr_int_my_strcat(i8* %3, i8* %0)
%5 = tail call i32 @free(i8* %3)
ret i8* %4
}
/* Variables and functions */
int add10(int);
int add15(int);
int add5(int);
int /*<<< orphan*/ printarg(int);
int main(int argc, char *argv[], char *envp[]) {
  int o0;
  o0 = add15(25);
  o0 = add10(o0);
  o0 = add5(o0);
  printarg(o0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x19,%edi
call   1030 <add15@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1050 <add10@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <add5@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1060 <printarg@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x19,%edi
call   1030 <add15@plt>
mov    %eax,%edi
call   1050 <add10@plt>
mov    %eax,%edi
call   1040 <add5@plt>
mov    %eax,%edi
call   1060 <printarg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = call i32 @add15(i32 25)
store i32 %9, i32* %8
%10 = load i32, i32* %8
%11 = call i32 @add10(i32 %10)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = call i32 @add5(i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = call i32 @printarg(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @add15(i32 25)
%5 = tail call i32 @add10(i32 %4)
%6 = tail call i32 @add5(i32 %5)
%7 = tail call i32 @printarg(i32 %6)
ret i32 0
}
/* Variables and functions */
int davinci_rev();
int is_davinci_dm646x(void) { return (davinci_rev() == (0x6467)) ? 1 : 0; }


x86 assembly (clang, -O0):
<is_davinci_dm646x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <davinci_rev@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x6467,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_davinci_dm646x>:
push   %rax
xor    %eax,%eax
call   1030 <davinci_rev@plt>
xor    %ecx,%ecx
cmp    $0x6467,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_davinci_dm646x() {
%1 = call i32 (...) @davinci_rev()
%2 = icmp eq i32 %1, 25703
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 1, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_davinci_dm646x() {
%1 = tail call i32 (...) @davinci_rev()
%2 = icmp eq i32 %1, 25703
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x07() {
  Assert_real((isxdigit(7) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              40, ("isxdigit should be 0 for 0x07"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x07>:
push   %rax
mov    $0x7,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x28,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x07\00"
define void @t_isxdigit_0x07() {
%1 = tail call i64 @isxdigit(i32 7)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 40, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EMACTimestampTargetIntDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000700))) &= ~0x00000010;
}


x86 assembly (clang, -O0):
<EMACTimestampTargetIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x700,%eax
cltq
mov    (%rax),%ecx
and    $0xffffffef,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampTargetIntDisable>:
movslq %edi,%rax
andl   $0xffffffef,0x700(%rax)
ret

LLVM IR (-O0):
define void @EMACTimestampTargetIntDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1792
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -17
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @EMACTimestampTargetIntDisable(i32 %0) {
%2 = add nsw i32 %0, 1792
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -17
store volatile i32 %6, i32* %4
ret void
}
/* Variables and functions */
char *_trim(char *, char const *, int);
char *trim_chars(char *str, const char *rem) { return _trim(str, rem, 1 | 2); }


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

x86 assembly (clang, -O2):
<trim_chars>:
mov    $0x3,%edx
jmp    1030 <_trim@plt>

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

LLVM IR (-O2):
define i8* @trim_chars(i8* %0, i8* %1) {
%3 = tail call i8* @_trim(i8* %0, i8* %1, i32 3)
ret i8* %3
}
void RTAssertMsg2WeakV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAssertMsg2WeakV() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ feastinit_(int *);
void FEASTINIT(int *feastparam) { feastinit_(feastparam); }


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

x86 assembly (clang, -O2):
<FEASTINIT>:
jmp    1030 <feastinit_@plt>

LLVM IR (-O0):
define void @FEASTINIT(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @feastinit_(i32* %3)
ret void
}

LLVM IR (-O2):
define void @FEASTINIT(i32* %0) {
%2 = tail call i32 @feastinit_(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strdupl(char *str) {
  char *point_word;
  point_word = (char *)malloc(strlen(str) + 1);
  if (point_word != NULL)
    strcpy(point_word, str);
  return point_word;
}


x86 assembly (clang, -O0):
<strdupl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <strdupl+0x3d>
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):
<strdupl>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strdupl+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdupl(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 i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %15
15: ; preds = %11, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @strdupl(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void test_fail(const char *test_name) {
  printf("--- FAIL: %s\n", test_name);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"--- FAIL: %s\0A\00"
define void @test_fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"--- FAIL: %s\0A\00"
define void @test_fail(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct server {
  int dummy;
};

/* Variables and functions */
scalar_t__ server_is_running(struct server *);
int /*<<< orphan*/ server_process_events(struct server *);
void process_events(void *data) {
  struct server *s = (struct server *)data;
  while (server_is_running(s)) {
    server_process_events(s);
  }
}


x86 assembly (clang, -O0):
<process_events>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <server_is_running@plt>
cmp    $0x0,%rax
je     1155 <process_events+0x35>
mov    -0x10(%rbp),%rdi
call   1040 <server_process_events@plt>
jmp    1134 <process_events+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_events>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <server_is_running@plt>
test   %rax,%rax
je     1147 <process_events+0x27>
mov    %rbx,%rdi
call   1040 <server_process_events@plt>
mov    %rbx,%rdi
jmp    1130 <process_events+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.server = type { i32 }
define void @process_events(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.server*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.server*
store %struct.server* %5, %struct.server** %3
br label %6
6: ; preds = %10, %1
%7 = load %struct.server*, %struct.server** %3
%8 = call i64 @server_is_running(%struct.server* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load %struct.server*, %struct.server** %3
%12 = call i32 @server_process_events(%struct.server* %11)
br label %6
13: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.server = type { i32 }
define void @process_events(i8* %0) {
%2 = bitcast i8* %0 to %struct.server*
%3 = tail call i64 @server_is_running(%struct.server* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1, %5
%6 = tail call i32 @server_process_events(%struct.server* %2)
%7 = tail call i64 @server_is_running(%struct.server* %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x13() {
  Assert_real((isgraph(19) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              100, ("isgraph should be 0 for 0x13"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x13\00"
define void @t_isgraph_0x13() {
%1 = tail call i64 @isgraph(i32 19)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ log10(int);
int digit_count(int number) { return (int)log10(number) + 1; }


x86 assembly (clang, -O0):
<digit_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log10@plt>
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_count>:
push   %rax
call   1030 <log10@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @digit_count(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @log10(i32 %3)
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @digit_count(i32 %0) {
%2 = tail call i64 @log10(i32 %0)
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ str_reverse(char *);
int main() {
  char str[] = "Yuriy Belyakov";
  str_reverse(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x13(%rbp),%rdi
call   1030 <str_reverse@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x766f6b61796c65,%rax
mov    %rax,0xf(%rsp)
movabs $0x6542207969727559,%rax
20 42 65
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <str_reverse@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [15 x i8] c"Yuriy Belyakov\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
store i32 0, i32* %1
%3 = bitcast [15 x i8]* %2 to i8*
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%5 = call i32 @str_reverse(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [15 x i8] c"Yuriy Belyakov\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i32 @str_reverse(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ runtime_write(int, char *);
int putchar(int c) {
  runtime_write(1, (char *)&c);
  return c;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rsi
mov    $0x1,%edi
call   1030 <runtime_write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
call   1030 <runtime_write@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @runtime_write(i32 1, i8* %3)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @runtime_write(i32 1, i8* %3)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
int /*<<< orphan*/ picenable(int /*<<< orphan*/);
void timerinit(void) {
  outb((0x040 + 3), 0x00 | 0x04 | 0x30);
  outb(0x040, ((1193182 + (10) / 2) / (10)) % 256);
  outb(0x040, ((1193182 + (10) / 2) / (10)) / 256);
  picenable(0);
}


x86 assembly (clang, -O0):
<timerinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x16,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x1d2,%esi
call   1030 <outb@plt>
xor    %edi,%edi
call   1040 <picenable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerinit>:
push   %rax
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x16,%esi
call   1030 <outb@plt>
mov    $0x40,%edi
mov    $0x1d2,%esi
call   1030 <outb@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <picenable@plt>

LLVM IR (-O0):
define void @timerinit() {
%1 = call i32 @outb(i32 67, i32 52)
%2 = call i32 @outb(i32 64, i32 22)
%3 = call i32 @outb(i32 64, i32 466)
%4 = call i32 @picenable(i32 0)
ret void
}

LLVM IR (-O2):
define void @timerinit() {
%1 = tail call i32 @outb(i32 67, i32 52)
%2 = tail call i32 @outb(i32 64, i32 22)
%3 = tail call i32 @outb(i32 64, i32 466)
%4 = tail call i32 @picenable(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  char buf[200];
  printf("%s", argv[1]);
  sprintf(buf, "echo %s", argv[1]);
  system(buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe94(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdx
lea    0xeaa(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"echo %s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %5
%9 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @system(i8* %4)
ret i32 0
}
int test_imm_4Fuint32_reg(unsigned int val) {
  return ((val) & (0x4F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Fuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x4f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_4Fuint32_reg(i32 %0) {
%2 = and i32 %0, 79
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int seedbcn(int);
int seedlcg(int);
void seedCombinedTS(uint64_t count, uint64_t *seed, uint64_t *lcgseed) {
  *seed = seedbcn(count * 53);
  *lcgseed = seedlcg(count);
}


x86 assembly (clang, -O0):
<seedCombinedTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
imul   $0x35,-0x4(%rbp),%edi
call   1030 <seedbcn@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
call   1040 <seedlcg@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seedCombinedTS>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
imul   $0x35,%edi,%edi
call   1030 <seedbcn@plt>
mov    %eax,(%rbx)
mov    %ebp,%edi
call   1040 <seedlcg@plt>
mov    %eax,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @seedCombinedTS(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 = mul nsw i32 %7, 53
%9 = call i32 @seedbcn(i32 %8)
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = call i32 @seedlcg(i32 %11)
%13 = load i32*, i32** %6
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
define void @seedCombinedTS(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = mul nsw i32 %0, 53
%5 = tail call i32 @seedbcn(i32 %4)
store i32 %5, i32* %1
%6 = tail call i32 @seedlcg(i32 %0)
store i32 %6, i32* %2
ret void
}
float catmullrom_w0(float x) { return x * (-0.5f + x * (1.0f - 0.5f * x)); }


x86 assembly (clang, -O0):
<catmullrom_w0>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  0xee0(%rip),%xmm3
mulss  %xmm3,%xmm2
movss  0xed8(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xec4(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<catmullrom_w0>:
movss  0xef8(%rip),%xmm1
movaps %xmm0,%xmm2
mulss  %xmm1,%xmm2
addss  0xeed(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @catmullrom_w0(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = call float @llvm.fmuladd.f32(float -5.000000e-01, float %5, float 1.000000e+00)
%7 = call float @llvm.fmuladd.f32(float %4, float %6, float -5.000000e-01)
%8 = fmul float %3, %7
ret float %8
}

LLVM IR (-O2):
define float @catmullrom_w0(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float -5.000000e-01, float 1.000000e+00)
%3 = tail call float @llvm.fmuladd.f32(float %0, float %2, float -5.000000e-01)
%4 = fmul float %3, %0
ret float %4
}
/* Variables and functions */
int f306(int *);
int f307(int *p) { return f306(p); }


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

x86 assembly (clang, -O2):
<f307>:
jmp    1030 <f306@plt>

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

LLVM IR (-O2):
define i32 @f307(i32* %0) {
%2 = tail call i32 @f306(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_timeval_diff() {
  printf("NOT IMPLEMENTED:"
         "pa_timeval_diff"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_timeval_diff\00"
define i32 @pa_timeval_diff() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
double DBL_EPSILON;
int32_t fltcmp(double x, double y) {
  if (x > y)
    return (x - y < DBL_EPSILON) ? 0 : 1;
  else
    return (y - x < DBL_EPSILON) ? 0 : -1;
}


x86 assembly (clang, -O0):
<fltcmp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1149 <fltcmp+0x49>
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mov    0x2eb9(%rip),%rax
movsd  (%rax),%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    116f <fltcmp+0x6f>
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mov    0x2e8e(%rip),%rax
movsd  (%rax),%xmm0
mov    $0xffffffff,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltcmp>:
ucomisd %xmm1,%xmm0
jbe    111f <fltcmp+0x1f>
subsd  %xmm1,%xmm0
mov    0x2ed7(%rip),%rax
movsd  (%rax),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
ret
subsd  %xmm0,%xmm1
mov    0x2ebe(%rip),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setbe  %al
neg    %eax
ret

LLVM IR (-O0):
@DBL_EPSILON = global double 0.000000e+00
define i32 @fltcmp(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load double, double* %4
%11 = load double, double* %5
%12 = fsub double %10, %11
%13 = load double, double* @DBL_EPSILON
%14 = fcmp olt double %12, %13
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
store i32 %16, i32* %3
br label %25
17: ; preds = %2
%18 = load double, double* %5
%19 = load double, double* %4
%20 = fsub double %18, %19
%21 = load double, double* @DBL_EPSILON
%22 = fcmp olt double %20, %21
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 0, i32 -1
store i32 %24, i32* %3
br label %25
25: ; preds = %17, %9
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
define i32 @fltcmp(double %0, double %1) {
%3 = fcmp ogt double %0, %1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = fsub double %0, %1
%6 = load double, double* @DBL_EPSILON
%7 = fcmp uge double %5, %6
%8 = zext i1 %7 to i32
br label %14
9: ; preds = %2
%10 = fsub double %1, %0
%11 = load double, double* @DBL_EPSILON
%12 = fcmp uge double %10, %11
%13 = sext i1 %12 to i32
br label %14
14: ; preds = %9, %4
%15 = phi i32 [ %8, %4 ], [ %13, %9 ]
ret i32 %15
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ iprintf(char *, scalar_t__, scalar_t__);
int /*<<< orphan*/ u_fail();
void u_eq(uint32_t a, uint32_t b) {
  if (!(a == b)) {
    iprintf("ERROR: %u == %u", a, b);
    u_fail();
  }
}


x86 assembly (clang, -O0):
<u_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1159 <u_eq+0x39>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rdi
call   1040 <iprintf@plt>
mov    $0x0,%al
call   1030 <u_fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_eq>:
mov    %rsi,%rdx
cmp    %rsi,%rdi
jne    1129 <u_eq+0x9>
ret
push   %rax
mov    %rdi,%rsi
lea    0xecc(%rip),%rdi
call   1040 <iprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <u_fail@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"ERROR: %u == %u\00"
define void @u_eq(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @iprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%6 = tail call i32 (...) @u_fail()
br label %7
7: ; preds = %4, %2
ret void
}
int conv1D2Dcol(int row, int rowcol) { return (rowcol - row); }


x86 assembly (clang, -O0):
<conv1D2Dcol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv1D2Dcol>:
mov    %esi,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @conv1D2Dcol(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @conv1D2Dcol(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int Id_SetRESGid(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int Id_SetEGid(gid_t egid) { return Id_SetRESGid((gid_t)-1, egid, (gid_t)-1); }


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

x86 assembly (clang, -O2):
<Id_SetEGid>:
mov    %edi,%esi
mov    $0xffffffff,%edi
mov    $0xffffffff,%edx
jmp    1030 <Id_SetRESGid@plt>

LLVM IR (-O0):
define i32 @Id_SetEGid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @Id_SetRESGid(i32 -1, i32 %3, i32 -1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @Id_SetEGid(i32 %0) {
%2 = tail call i32 @Id_SetRESGid(i32 -1, i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
float quartic_out(float, float, float);
float quartic_f_out(float step, float max_steps, float max_val) {
  return quartic_out(step, max_steps, max_val);
}


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

x86 assembly (clang, -O2):
<quartic_f_out>:
jmp    1030 <quartic_out@plt>

LLVM IR (-O0):
define float @quartic_f_out(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 = call float @quartic_out(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @quartic_f_out(float %0, float %1, float %2) {
%4 = tail call float @quartic_out(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x52() {
  Assert_real((islower(82) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              415, ("islower should be 0 for R"));
}


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

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

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

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