xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strrchr(char *, char);
void _sanitizeInputStr(char *input) {
  char *ptr = strrchr(input, '#');
  if (ptr)
    *ptr = '\0';
  else {
    if ((ptr = strrchr(input, '\n')))
      *ptr = '\0';
  }
}


x86 assembly (clang, -O0):
<_sanitizeInputStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x23,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1145 <_sanitizeInputStr+0x35>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    116d <_sanitizeInputStr+0x5d>
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1168 <_sanitizeInputStr+0x58>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    116d <_sanitizeInputStr+0x5d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sanitizeInputStr>:
push   %rbx
mov    %rdi,%rbx
mov    $0x23,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
jne    1135 <_sanitizeInputStr+0x25>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1138 <_sanitizeInputStr+0x28>
movb   $0x0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @_sanitizeInputStr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 35)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %17
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i8* @strrchr(i8* %11, i8 signext 10)
store i8* %12, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i8*, i8** %3
store i8 0, i8* %15
br label %16
16: ; preds = %14, %10
br label %17
17: ; preds = %16, %8
ret void
}

LLVM IR (-O2):
define void @_sanitizeInputStr(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 35)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 10)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4, %1
%8 = phi i8* [ %2, %1 ], [ %5, %4 ]
store i8 0, i8* %8
br label %9
9: ; preds = %7, %4
ret void
}
/* Type definitions */
struct pollfd {
  int /*<<< orphan*/ events;
  int /*<<< orphan*/ fd;
};

/* Variables and functions */
int /*<<< orphan*/ POLLIN;
int /*<<< orphan*/ STDIN_FILENO;
int poll(struct pollfd *, int, int);
int waitch(int tdelay) {
  struct pollfd set[1];
  set[0].fd = STDIN_FILENO;
  set[0].events = POLLIN;
  return (poll(set, 1, tdelay));
}


x86 assembly (clang, -O0):
<waitch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    $0x1,%esi
call   1030 <poll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitch>:
push   %rax
mov    %edi,%edx
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <poll@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.pollfd = type { i32, i32 }
@STDIN_FILENO = global i32 0
@POLLIN = global i32 0
define i32 @waitch(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x %struct.pollfd]
store i32 %0, i32* %2
%4 = load i32, i32* @STDIN_FILENO
%5 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %3, i64 0, i64 0
%6 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %5, i32 0, i32 1
store i32 %4, i32* %6
%7 = load i32, i32* @POLLIN
%8 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %3, i64 0, i64 0
%9 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %8, i32 0, i32 0
store i32 %7, i32* %9
%10 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @poll(%struct.pollfd* %10, i32 1, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.pollfd = type { i32, i32 }
@STDIN_FILENO = global i32 0
@POLLIN = global i32 0
define i32 @waitch(i32 %0) {
%2 = alloca [1 x %struct.pollfd]
%3 = bitcast [1 x %struct.pollfd]* %2 to i8*
%4 = load i32, i32* @STDIN_FILENO
%5 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %2, i64 0, i64 0
%6 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %2, i64 0, i64 0, i32 1
store i32 %4, i32* %6
%7 = load i32, i32* @POLLIN
%8 = getelementptr inbounds [1 x %struct.pollfd], [1 x %struct.pollfd]* %2, i64 0, i64 0, i32 0
store i32 %7, i32* %8
%9 = call i32 @poll(%struct.pollfd* %5, i32 1, i32 %0)
ret i32 %9
}
char *stpcpy(char *_dest, const char *_src) {
  if (!_dest || !_src)
    return 0;
  while ((*_dest++ = *_src++))
    ;
  return --_dest;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1122 <stpcpy+0x22>
cmpq   $0x0,-0x18(%rbp)
jne    112f <stpcpy+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1173 <stpcpy+0x73>
jmp    1134 <stpcpy+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1163 <stpcpy+0x63>
jmp    1134 <stpcpy+0x34>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
xor    %eax,%eax
test   %rdi,%rdi
je     1132 <stpcpy+0x32>
test   %rsi,%rsi
je     1132 <stpcpy+0x32>
add    $0xffffffffffffffff,%rdi
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1120 <stpcpy+0x20>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i8* [ %11, %6 ], [ %0, %2 ]
%8 = phi i8* [ %9, %6 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
%12 = icmp eq i8 %10, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = phi i8* [ null, %2 ], [ %7, %6 ]
ret i8* %14
}
void parse_quote(char *str) {
  char *pquote, *pstr = str;
  while (*pstr) {
    if (*pstr == '"') {
      pquote = pstr;
      while (*pquote) {
        *pquote = *(pquote + 1);
        pquote++;
      }
    }
    pstr++;
  }
}


x86 assembly (clang, -O0):
<parse_quote>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1176 <parse_quote+0x76>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1165 <parse_quote+0x65>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <parse_quote+0x60>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1135 <parse_quote+0x35>
jmp    1165 <parse_quote+0x65>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <parse_quote+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_quote>:
lea    0x1(%rdi),%rax
jmp    111c <parse_quote+0x1c>
cs nopw 0x0(%rax,%rax,1)
test   %cl,%cl
je     1140 <parse_quote+0x40>
add    $0x1,%rdi
add    $0x1,%rax
mov    (%rdi),%cl
cmp    $0x22,%cl
jne    1110 <parse_quote+0x10>
mov    %rax,%rcx
cs nopw 0x0(%rax,%rax,1)
movzbl (%rcx),%edx
mov    %dl,-0x1(%rcx)
add    $0x1,%rcx
test   %dl,%dl
jne    1130 <parse_quote+0x30>
jmp    1114 <parse_quote+0x14>
ret

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

LLVM IR (-O2):
define void @parse_quote(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %11, %10 ]
%4 = load i8, i8* %3
switch i8 %4, label %10 [
i8 0, label %12
i8 34, label %5
]
5: ; preds = %2, %5
%6 = phi i8* [ %7, %5 ], [ %3, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
store i8 %8, i8* %6
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %2
ret void
}
__float128 from_sign_long(long a) { return (__float128)a; }


x86 assembly (clang, -O0):
<from_sign_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1120 <__floatditf>
add    $0x10,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<from_sign_long>:
push   %rax
call   1110 <__floatditf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_sign_long(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to fp128
ret fp128 %4
}

LLVM IR (-O2):
define fp128 @from_sign_long(i64 %0) {
%2 = sitofp i64 %0 to fp128
ret fp128 %2
}
/* Variables and functions */
scalar_t__ strtoll(char const *, char **, int);
const char *gu_str2ptr(const char *str, void **ptr) {
  char *ret;
  *ptr = (void *)(intptr_t)strtoll(str, &ret, 16);
  return ret;
}


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

x86 assembly (clang, -O2):
<gu_str2ptr>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
mov    $0x10,%edx
call   1030 <strtoll@plt>
mov    %rax,(%rbx)
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @gu_str2ptr(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8*
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = load i8*, i8** %3
%7 = call i64 @strtoll(i8* %6, i8** %5, i32 16)
%8 = inttoptr i64 %7 to i8*
%9 = load i8**, i8*** %4
store i8* %8, i8** %9
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define i8* @gu_str2ptr(i8* %0, i8** nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @strtoll(i8* %0, i8** %3, i32 16)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %1
%7 = load i8*, i8** %3
ret i8* %7
}
void genbnel_idle() {}


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

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

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

LLVM IR (-O2):
define void @genbnel_idle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void print_exit(const char *msg) {
  printf("%s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<print_exit>:
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):
<print_exit>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print_exit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Dynamic_Resolution_Shadow_Set_MMatrix(float const *);
void Dynamic_Resolution_Shadow_Set_MMatrixFloat(const float mMatrix[16]) {
  Dynamic_Resolution_Shadow_Set_MMatrix(mMatrix);
}


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

x86 assembly (clang, -O2):
<Dynamic_Resolution_Shadow_Set_MMatrixFloat>:
jmp    1030 <Dynamic_Resolution_Shadow_Set_MMatrix@plt>

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

LLVM IR (-O2):
define void @Dynamic_Resolution_Shadow_Set_MMatrixFloat(float* %0) {
%2 = tail call i32 @Dynamic_Resolution_Shadow_Set_MMatrix(float* %0)
ret void
}
/* Type definitions */
struct s_test {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clientReceiveLocal();
int /*<<< orphan*/ unSerialiseTLock(struct s_test *);
int getLockTest(struct s_test *tLock) {
  clientReceiveLocal();
  unSerialiseTLock(tLock);
  return 0;
}


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

x86 assembly (clang, -O2):
<getLockTest>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <clientReceiveLocal@plt>
mov    %rbx,%rdi
call   1030 <unSerialiseTLock@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.s_test = type { i32 }
define i32 @getLockTest(%struct.s_test* %0) {
%2 = alloca %struct.s_test*
store %struct.s_test* %0, %struct.s_test** %2
%3 = call i32 (...) @clientReceiveLocal()
%4 = load %struct.s_test*, %struct.s_test** %2
%5 = call i32 @unSerialiseTLock(%struct.s_test* %4)
ret i32 0
}

LLVM IR (-O2):
%struct.s_test = type { i32 }
define i32 @getLockTest(%struct.s_test* %0) {
%2 = tail call i32 (...) @clientReceiveLocal()
%3 = tail call i32 @unSerialiseTLock(%struct.s_test* %0)
ret i32 0
}
void Fun_s5_Print_TRANSITION(void) {}


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

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

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

LLVM IR (-O2):
define void @Fun_s5_Print_TRANSITION() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x46() {
  Assert_real((isupper(70)),
              "/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_isupper.c",
              355, ("isupper should be 1 for F"));
}


x86 assembly (clang, -O0):
<t_isupper_0x46>:
push   %rbp
mov    %rsp,%rbp
mov    $0x46,%edi
call   1030 <isupper@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x163,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x46>:
push   %rax
mov    $0x46,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x163,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for F\00"
define void @t_isupper_0x46() {
%1 = call i32 @isupper(i32 70)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 355, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for F\00"
define void @t_isupper_0x46() {
%1 = tail call i32 @isupper(i32 70)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 355, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int op_lddd(void) { return (4); }


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

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

LLVM IR (-O0):
define i32 @op_lddd() {
ret i32 4
}

LLVM IR (-O2):
define i32 @op_lddd() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ UART0_LON_DriverIRQHandler();
__attribute__((weak)) void UART0_LON_IRQHandler(void) {
  UART0_LON_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @UART0_LON_IRQHandler() {
%1 = call i32 (...) @UART0_LON_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @UART0_LON_IRQHandler() {
%1 = tail call i32 (...) @UART0_LON_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ halt3();
int /*<<< orphan*/ unknown();
int test26() { 0 ? halt3() : unknown(); }


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

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

LLVM IR (-O0):
define i32 @test26() {
%1 = alloca i32
%2 = call i32 (...) @unknown()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @test26() {
%1 = tail call i32 (...) @unknown()
ret i32 undef
}
/* Type definitions */
typedef int uint16_t;
typedef long int16_t;

/* Variables and functions */
int16_t as_signed(uint16_t n) { return (n & 0x8000) ? (long)n - 0x10000L : n; }


x86 assembly (clang, -O0):
<as_signed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     112b <as_signed+0x2b>
movslq -0x4(%rbp),%rax
sub    $0x10000,%rax
mov    %rax,-0x10(%rbp)
jmp    1133 <as_signed+0x33>
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<as_signed>:
movslq %edi,%rcx
lea    -0x10000(%rcx),%rax
test   $0x8000,%ecx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @as_signed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 32768
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = sub nsw i64 %8, 65536
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
br label %13
13: ; preds = %10, %6
%14 = phi i64 [ %9, %6 ], [ %12, %10 ]
ret i64 %14
}

LLVM IR (-O2):
define i64 @as_signed(i32 %0) {
%2 = and i32 %0, 32768
%3 = icmp eq i32 %2, 0
%4 = sext i32 %0 to i64
%5 = add nsw i64 %4, -65536
%6 = select i1 %3, i64 %4, i64 %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printFunction(char *leader, void *data) {
  struct userData {
    unsigned long domainId;
    unsigned long signalId;
    char *name;
  };
  if (data == NULL) {
    printf("%s(nil)\n", leader);
    return;
  }
  return;
}


x86 assembly (clang, -O0):
<printFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1140 <printFunction+0x30>
mov    -0x8(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    1145 <printFunction+0x35>
jmp    1145 <printFunction+0x35>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFunction>:
test   %rsi,%rsi
je     1116 <printFunction+0x6>
ret
mov    %rdi,%rax
lea    0xee0(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s(nil)\0A\00"
define void @printFunction(i8* %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pal_intf_unlock();
void val_intf_unlock(void) { pal_intf_unlock(); }


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

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

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

LLVM IR (-O2):
define void @val_intf_unlock() {
%1 = tail call i32 (...) @pal_intf_unlock()
ret void
}
int type_mode_per_thread(struct pobj_bench *bench_priv, int worker_idx,
                         int op_idx) {
  return worker_idx;
}


x86 assembly (clang, -O0):
<type_mode_per_thread>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pobj_bench = type opaque
define i32 @type_mode_per_thread(%struct.pobj_bench* %0, i32 %1, i32 %2) {
%4 = alloca %struct.pobj_bench*
%5 = alloca i32
%6 = alloca i32
store %struct.pobj_bench* %0, %struct.pobj_bench** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
ret i32 %7
}

LLVM IR (-O2):
%struct.pobj_bench = type opaque
define i32 @type_mode_per_thread(%struct.pobj_bench* nocapture readnone %0, i32 returned %1, i32 %2) {
ret i32 %1
}
/* Type definitions */
typedef size_t uint64_t;

/* Variables and functions */
size_t timer_slot(size_t wheel, uint64_t expire) {
  return ((1 << 5) - 1) & (expire >> (wheel * 5));
}


x86 assembly (clang, -O0):
<timer_slot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x5,-0x8(%rbp),%rcx
shr    %cl,%rax
and    $0x1f,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_slot>:
mov    %rsi,%rax
lea    (%rdi,%rdi,4),%ecx
shr    %cl,%rax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i64 @timer_slot(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = mul i64 %6, 5
%8 = lshr i64 %5, %7
%9 = and i64 31, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @timer_slot(i64 %0, i64 %1) {
%3 = mul i64 %0, 5
%4 = lshr i64 %1, %3
%5 = and i64 %4, 31
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void easycharts_output_y_minimum_integer(FILE *destination,
                                         int y_minimum_integer) {
  fprintf(destination, "<param name=lowerRange value=\"%d\">\n",
          y_minimum_integer);
}


x86 assembly (clang, -O0):
<easycharts_output_y_minimum_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<easycharts_output_y_minimum_integer>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"<param name=lowerRange value=\22%d\22>\0A\00"
define void @easycharts_output_y_minimum_integer(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"<param name=lowerRange value=\22%d\22>\0A\00"
define void @easycharts_output_y_minimum_integer(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *malloc(size_t);
void *xmalloc(size_t sz) {
  void *p = malloc(sz);
  assert(p || !sz);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jne    1156 <xmalloc+0x36>
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
setne  %al
test   %rbx,%rbx
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ true, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = icmp eq i64 %0, 0
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret i8* %2
}
int mask_to_length(unsigned int mask) {
  int length;
  if (mask == 0)
    return 0;
  if (mask == 0xFFFFFFFF)
    return 32;
  for (length = 0; length <= 32; length++)
    if (0xFFFFFFFF << (32 - length) == mask)
      break;
  return length;
}


x86 assembly (clang, -O0):
<mask_to_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <mask_to_length+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    117a <mask_to_length+0x7a>
cmpl   $0xffffffff,-0x8(%rbp)
jne    1133 <mask_to_length+0x33>
movl   $0x20,-0x4(%rbp)
jmp    117a <mask_to_length+0x7a>
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jg     1174 <mask_to_length+0x74>
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
cmp    -0x8(%rbp),%eax
jne    1161 <mask_to_length+0x61>
jmp    1174 <mask_to_length+0x74>
jmp    1166 <mask_to_length+0x66>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <mask_to_length+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask_to_length>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
xor    $0x21,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @mask_to_length(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = select i1 %2, i32 32, i32 33
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 0, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    ft_putchar(str[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <ft_putstr+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int isatty(int fd) {
  fprintf(stderr, "isatty non implémenté ! %d\n", fd);
  return 1;
}


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
push   %rax
mov    %edi,%edx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"isatty non impl\C3\A9ment\C3\A9 ! %d\0A\00"
define i32 @isatty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"isatty non impl\C3\A9ment\C3\A9 ! %d\0A\00"
define i32 @isatty(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 1
}
/* Variables and functions */
double radius_from_volume(double, double, double, double);
double radius_effective(int mode, double radius, double edge_sep,
                        double thick_string, double fp_num_pearls) {
  switch (mode) {
  default:
  case 1:
    return radius_from_volume(radius, edge_sep, thick_string, fp_num_pearls);
  }
}


x86 assembly (clang, -O0):
<radius_effective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
je     1145 <radius_effective+0x35>
jmp    1140 <radius_effective+0x30>
jmp    1145 <radius_effective+0x35>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
call   1030 <radius_from_volume@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_effective>:
jmp    1030 <radius_from_volume@plt>

LLVM IR (-O0):
define double @radius_effective(i32 %0, double %1, double %2, double %3, double %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load i32, i32* %6
switch i32 %11, label %12 [
i32 1, label %13
]
12: ; preds = %5
br label %13
13: ; preds = %5, %12
%14 = load double, double* %7
%15 = load double, double* %8
%16 = load double, double* %9
%17 = load double, double* %10
%18 = call double @radius_from_volume(double %14, double %15, double %16, double %17)
ret double %18
}

LLVM IR (-O2):
define double @radius_effective(i32 %0, double %1, double %2, double %3, double %4) {
%6 = tail call double @radius_from_volume(double %1, double %2, double %3, double %4)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *procname) {
  printf("usage: %s -h[help] -n max_loop -m all|aqueue|netio|pipeio|unixio\r\n",
         procname);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"usage: %s -h[help] -n max_loop -m all|aqueue|netio|pipeio|unixio\0D\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"usage: %s -h[help] -n max_loop -m all|aqueue|netio|pipeio|unixio\0D\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int addi(uint32_t *env) {
  uint32_t *context = (uint32_t *)*(uint32_t **)(env + 1);
  int a = (int)*(int *)(context);
  int b = (int)*(int *)(context + 1);
  return a + b;
}


x86 assembly (clang, -O0):
<addi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addi>:
mov    0x4(%rdi),%rcx
mov    0x4(%rcx),%eax
add    (%rcx),%eax
ret

LLVM IR (-O0):
define i32 @addi(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = bitcast i32* %7 to i32**
%9 = load i32*, i32** %8
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
store i32 %11, i32* %4
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
store i32 %14, i32* %5
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @addi(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = bitcast i32* %2 to i32**
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %4, i64 1
%7 = load i32, i32* %6
%8 = add nsw i32 %7, %5
ret i32 %8
}
int _open(const char *path, int flags, ...) { return -1; }


x86 assembly (clang, -O0):
<_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_open(i8* nocapture readnone %0, i32 %1, ...) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: scpack <filename> [output file]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [40 x i8] c"Usage: scpack <filename> [output file]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [39 x i8] c"Usage: scpack <filename> [output file]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned long f14(unsigned long x,
                                               unsigned long y) {
  unsigned long r = x - y;
  if (r < y)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1141 <f14+0x31>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f14>:
push   %rbx
mov    %rdi,%rbx
sub    %rsi,%rbx
cmp    %rsi,%rbx
jae    1123 <f14+0x13>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @f14(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = sub i64 %6, %7
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = load i64, i64* %4
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @foo(i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i64, i64* %5
ret i64 %15
}

LLVM IR (-O2):
define i64 @f14(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = icmp ult i64 %3, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i64 %3
}
/* Type definitions */
struct horseList {
  int dummy;
};

/* Variables and functions */
struct horseList *create_horse_linked_list(int);
int /*<<< orphan*/ race(struct horseList *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ start_race(struct horseList *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  struct horseList *headOfHorseList = create_horse_linked_list(8);
  start_race(headOfHorseList);
  while (!race(headOfHorseList))
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x8,%edi
call   1030 <create_horse_linked_list@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <start_race@plt>
mov    -0x10(%rbp),%rdi
call   1060 <race@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11a4 <main+0x54>
jmp    11a9 <main+0x59>
jmp    1186 <main+0x36>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x8,%edi
call   1030 <create_horse_linked_list@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <start_race@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1060 <race@plt>
test   %eax,%eax
je     1180 <main+0x30>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.horseList = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.horseList*
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call %struct.horseList* @create_horse_linked_list(i32 8)
store %struct.horseList* %5, %struct.horseList** %2
%6 = load %struct.horseList*, %struct.horseList** %2
%7 = call i32 @start_race(%struct.horseList* %6)
br label %8
8: ; preds = %13, %0
%9 = load %struct.horseList*, %struct.horseList** %2
%10 = call i32 @race(%struct.horseList* %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br i1 %12, label %13, label %14
13: ; preds = %8
br label %8
14: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
%struct.horseList = type { i32 }
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call %struct.horseList* @create_horse_linked_list(i32 8)
%4 = tail call i32 @start_race(%struct.horseList* %3)
br label %5
5: ; preds = %5, %0
%6 = tail call i32 @race(%struct.horseList* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %5, label %8
8: ; preds = %5
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int read_byte_data(int, int);
int /*<<< orphan*/ write_byte_data(int, int, int);
void set_allcall_address(uint8_t allcalladdress, uint8_t address) {
  uint8_t oldmode = read_byte_data(address, 0x00);
  uint8_t newmode = oldmode | (1 << 0);
  write_byte_data(address, 0x00, newmode);
  write_byte_data(address, 0x05, allcalladdress << 1);
}


x86 assembly (clang, -O0):
<set_allcall_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <read_byte_data@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%edx
xor    %esi,%esi
call   1040 <write_byte_data@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
mov    $0x5,%esi
call   1040 <write_byte_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_allcall_address>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
xor    %esi,%esi
call   1030 <read_byte_data@plt>
or     $0x1,%eax
mov    %ebx,%edi
xor    %esi,%esi
mov    %eax,%edx
call   1040 <write_byte_data@plt>
add    %ebp,%ebp
mov    %ebx,%edi
mov    $0x5,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <write_byte_data@plt>

LLVM IR (-O0):
define void @set_allcall_address(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @read_byte_data(i32 %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = or i32 %9, 1
store i32 %10, i32* %6
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = call i32 @write_byte_data(i32 %11, i32 0, i32 %12)
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = shl i32 %15, 1
%17 = call i32 @write_byte_data(i32 %14, i32 5, i32 %16)
ret void
}

LLVM IR (-O2):
define void @set_allcall_address(i32 %0, i32 %1) {
%3 = tail call i32 @read_byte_data(i32 %1, i32 0)
%4 = or i32 %3, 1
%5 = tail call i32 @write_byte_data(i32 %1, i32 0, i32 %4)
%6 = shl i32 %0, 1
%7 = tail call i32 @write_byte_data(i32 %1, i32 5, i32 %6)
ret void
}
int hashingByMult(int key, int HASH_TABLE_SIZE) {
  float K = 0.618666;
  float val = key * K;
  val = val - (int)val;
  return (int)(HASH_TABLE_SIZE * val);
}


x86 assembly (clang, -O0):
<hashingByMult>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  0xeee(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvttss2si -0x10(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashingByMult>:
cvtsi2ss %edi,%xmm0
mulss  0xef4(%rip),%xmm0
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
cvtsi2ss %esi,%xmm2
subss  %xmm1,%xmm0
mulss  %xmm0,%xmm2
cvttss2si %xmm2,%eax
ret

LLVM IR (-O0):
define i32 @hashingByMult(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
store float 0x3FE3CC1CA0000000, float* %5
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to float
%9 = load float, float* %5
%10 = fmul float %8, %9
store float %10, float* %6
%11 = load float, float* %6
%12 = load float, float* %6
%13 = fptosi float %12 to i32
%14 = sitofp i32 %13 to float
%15 = fsub float %11, %14
store float %15, float* %6
%16 = load i32, i32* %4
%17 = sitofp i32 %16 to float
%18 = load float, float* %6
%19 = fmul float %17, %18
%20 = fptosi float %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @hashingByMult(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = fmul float %3, 0x3FE3CC1CA0000000
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
%7 = fsub float %4, %6
%8 = sitofp i32 %1 to float
%9 = fmul float %7, %8
%10 = fptosi float %9 to i32
ret i32 %10
}