xunge/DecIR huggingface dataset:
int mod(unsigned int a, unsigned int b) {
  while (a >= b)
    a -= b;
  return (int)a;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jb     1126 <mod+0x26>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <mod+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    %edi,%eax
add    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    %esi,%eax
cmp    %esi,%eax
jae    1110 <mod+0x10>
ret

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

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = icmp ult i32 %4, %1
%6 = sub i32 %4, %1
br i1 %5, label %7, label %3
7: ; preds = %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int ht_stringcmp(void *k1, void *k2) {
  char *c1, *c2;
  c1 = k1;
  c2 = k2;
  return (strcmp(c1, c2) == 0);
}


x86 assembly (clang, -O0):
<ht_stringcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_stringcmp>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ht_stringcmp(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** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i64 @strcmp(i8* %9, i8* %10)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @ht_stringcmp(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int host_request_exec_env_linux(char *buffer, int max_buffer_size) {
  int ret;
  memset(buffer, 0, max_buffer_size);
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, "
                       "0x20"
                       "\n"
                       ".byte "
                       "0x04"
                       ", 0x00\n"
                       ".byte 0x00, 0x00, 0x00\n"
                       ".byte 0x00\n"
                       : "=a"(ret)
                       : "a"(buffer), "b"(max_buffer_size));
  return ret;
}


x86 assembly (clang, -O0):
<host_request_exec_env_linux>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ebx
(bad)
add    %ah,(%rax)
add    $0x0,%al
add    %al,(%rax)
add    %al,(%rax)
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<host_request_exec_env_linux>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movslq %esi,%rbx
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
(bad)
add    %ah,(%rax)
add    $0x0,%al
add    %al,(%rax)
add    %al,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @host_request_exec_env_linux(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x20\0A.byte 0x04, 0x00\0A.byte 0x00, 0x00, 0x00\0A.byte 0x00\0A", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i8* %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @host_request_exec_env_linux(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %3, i1 false)
%4 = tail call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0x20\0A.byte 0x04, 0x00\0A.byte 0x00, 0x00, 0x00\0A.byte 0x00\0A", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ qsort_r(void *, size_t, size_t,
                           int (*)(void const *, void const *, void *), void *);
void sort_r(void *base, size_t nel, size_t width,
            int (*compar)(const void *_a, const void *_b, void *_arg),
            void *arg) {
  qsort_r(base, nel, width, compar, arg);
}


x86 assembly (clang, -O0):
<sort_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <qsort_r@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_r>:
jmp    1030 <qsort_r@plt>

LLVM IR (-O0):
define void @sort_r(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32 (i8*, i8*, i8*)*
%10 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 (i8*, i8*, i8*)* %3, i32 (i8*, i8*, i8*)** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i32 (i8*, i8*, i8*)*, i32 (i8*, i8*, i8*)** %9
%15 = load i8*, i8** %10
%16 = call i32 @qsort_r(i8* %11, i64 %12, i64 %13, i32 (i8*, i8*, i8*)* %14, i8* %15)
ret void
}

LLVM IR (-O2):
define void @sort_r(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4) {
%6 = tail call i32 @qsort_r(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4)
ret void
}
/* Variables and functions */
char *memcpy(char *, char const *, size_t);
char *n_malloc(size_t);
int /*<<< orphan*/ nomem();
int strlen(char const *);
char *n_strdup(const char *s) {
  register size_t len = strlen(s) + 1;
  register char *new;
  if ((new = n_malloc(len)) == NULL) {
    nomem();
    return NULL;
  }
  return memcpy(new, s, len);
}


x86 assembly (clang, -O0):
<n_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <n_malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1189 <n_strdup+0x49>
mov    $0x0,%al
call   1050 <nomem@plt>
movq   $0x0,-0x8(%rbp)
jmp    119e <n_strdup+0x5e>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1060 <n_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1173 <n_strdup+0x33>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
jmp    117a <n_strdup+0x3a>
xor    %eax,%eax
call   1050 <nomem@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @n_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = call i8* @n_malloc(i64 %10)
store i8* %11, i8** %5
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 (...) @nomem()
store i8* null, i8** %2
br label %20
15: ; preds = %1
%16 = load i8*, i8** %5
%17 = load i8*, i8** %3
%18 = load i64, i64* %4
%19 = call i8* @memcpy(i8* %16, i8* %17, i64 %18)
store i8* %19, i8** %2
br label %20
20: ; preds = %15, %13
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @n_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @n_malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (...) @nomem()
br label %10
9: ; preds = %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 %0, i64 %4, i1 false)
br label %10
10: ; preds = %9, %7
ret i8* %5
}
void foo(int x) {}


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

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

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

LLVM IR (-O2):
define void @foo(i32 %0) {
ret void
}
/* Variables and functions */
char getinfo(char *);
int is_ice_data(char *data) {
  return getinfo(data) == (('I' << 24) | ('C' << 16) | ('E' << 8) | '!');
}


x86 assembly (clang, -O0):
<is_ice_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getinfo@plt>
movsbl %al,%eax
cmp    $0x49434521,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_ice_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call signext i8 @getinfo(i8* %3)
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 1229145377
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_ice_data(i8* %0) {
%2 = tail call signext i8 @getinfo(i8* %0)
ret i32 0
}
void Sys_NET_Init(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XUnregisterIMInstantiateCallback() {
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_int16_t(int16_t const k1, int16_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_int16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_int16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int16_t(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 slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_int16_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void set_restore_sigmask(void) {}


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

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

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

LLVM IR (-O2):
define void @set_restore_sigmask() {
ret void
}
long proc7(long p1, int p2, short p3, char p4, long *p5, long p6, long p7) {
  *p5 = p1 + p2 + p3 - p4;
  return *p5 + p6 + p7;
}


x86 assembly (clang, -O0):
<proc7>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dx,%cx
mov    0x10(%rbp),%rdx
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %cx,-0xe(%rbp)
mov    %al,-0xf(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rax
add    %rax,%rcx
movswq -0xe(%rbp),%rax
add    %rax,%rcx
movsbq -0xf(%rbp),%rax
sub    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
add    -0x20(%rbp),%rax
add    0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc7>:
movslq %esi,%rsi
add    %rdi,%rsi
movslq %edx,%rax
add    %rsi,%rax
movslq %ecx,%rcx
sub    %rcx,%rax
mov    %rax,(%r8)
add    %r9,%rax
add    0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @proc7(i64 %0, i32 %1, i16 signext %2, i8 signext %3, i64* %4, i64 %5, i64 %6) {
%8 = alloca i64
%9 = alloca i32
%10 = alloca i16
%11 = alloca i8
%12 = alloca i64*
%13 = alloca i64
%14 = alloca i64
store i64 %0, i64* %8
store i32 %1, i32* %9
store i16 %2, i16* %10
store i8 %3, i8* %11
store i64* %4, i64** %12
store i64 %5, i64* %13
store i64 %6, i64* %14
%15 = load i64, i64* %8
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = add nsw i64 %15, %17
%19 = load i16, i16* %10
%20 = sext i16 %19 to i64
%21 = add nsw i64 %18, %20
%22 = load i8, i8* %11
%23 = sext i8 %22 to i64
%24 = sub nsw i64 %21, %23
%25 = load i64*, i64** %12
store i64 %24, i64* %25
%26 = load i64*, i64** %12
%27 = load i64, i64* %26
%28 = load i64, i64* %13
%29 = add nsw i64 %27, %28
%30 = load i64, i64* %14
%31 = add nsw i64 %29, %30
ret i64 %31
}

LLVM IR (-O2):
define i64 @proc7(i64 %0, i32 %1, i16 signext %2, i8 signext %3, i64* nocapture writeonly %4, i64 %5, i64 %6) {
%8 = sext i32 %1 to i64
%9 = add nsw i64 %8, %0
%10 = sext i16 %2 to i64
%11 = add nsw i64 %9, %10
%12 = sext i8 %3 to i64
%13 = sub i64 %11, %12
store i64 %13, i64* %4
%14 = add nsw i64 %13, %5
%15 = add nsw i64 %14, %6
ret i64 %15
}
/* Variables and functions */
scalar_t__ compare(char *, char *);
char *compare_greaterThan() {
  do {
    if (!(compare("hiaa", "hibb") > 0))
      return "Compare greater than string";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<compare_greaterThan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <compare@plt>
cmp    $0x0,%rax
jg     1145 <compare_greaterThan+0x35>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <compare_greaterThan+0x42>
jmp    114a <compare_greaterThan+0x3a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_greaterThan>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <compare@plt>
xor    %ecx,%ecx
test   %rax,%rax
lea    0xeda(%rip),%rax
cmovle %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"hiaa\00"
@.str.1 = [5 x i8] c"hibb\00"
@.str.2 = [28 x i8] c"Compare greater than string\00"
define i8* @compare_greaterThan() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i64 @compare(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp sgt i64 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %2
br label %7
7: ; preds = %6
store i8* null, i8** %1
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"hiaa\00"
@.str.1 = [5 x i8] c"hibb\00"
@.str.2 = [28 x i8] c"Compare greater than string\00"
define i8* @compare_greaterThan() {
%1 = tail call i64 @compare(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
char tolower(char);
void tolowerStr(char *str) {
  while (*str) {
    *str = tolower(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<tolowerStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <tolowerStr+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <tolowerStr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tolowerStr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @tolower(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @tolowerStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  char my_string[16];
  char THE_TRICK[2] = "\xFF\xE4";
  fgets(my_string, 40, stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%ax
mov    %ax,-0x22(%rbp)
lea    -0x20(%rbp),%rdi
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
mov    $0x28,%esi
call   1030 <fgets@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x28,%esi
call   1030 <fgets@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.THE_TRICK = [2 x i8] c"\FF\E4"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [16 x i8]
%7 = alloca [2 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [2 x i8]* %7 to i8*
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 40, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 40, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/filip-be/ImageComparer/refs/heads/"
             "master/exiv2/expat/xmlwf/.libs/lt-xmlwf.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf4f(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf6a(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/filip-be/ImageComparer/refs/heads/master/exiv2/expat/xmlwf/.libs/lt-xmlwf.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/filip-be/ImageComparer/refs/heads/master/exiv2/expat/xmlwf/.libs/lt-xmlwf.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ icon_x;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
int get_XWMHints_icon_x(void *_p) { return (int)((XWMHints *)_p)->icon_x; }


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

x86 assembly (clang, -O2):
<get_XWMHints_icon_x>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XWMHints_icon_x(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XWMHints_icon_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ midi_clock_set_swing(scalar_t__);
int /*<<< orphan*/ seq_utils_clamp(scalar_t__, int, int);
scalar_t__ song_get_swing();
int /*<<< orphan*/ song_set_swing(int /*<<< orphan*/);
void seq_ctrl_adjust_swing(int change) {
  song_set_swing(seq_utils_clamp(song_get_swing() + change, (50), (80)));
  midi_clock_set_swing(song_get_swing());
}


x86 assembly (clang, -O0):
<seq_ctrl_adjust_swing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <song_get_swing@plt>
mov    %rax,%rdi
movslq -0x4(%rbp),%rax
add    %rax,%rdi
mov    $0x32,%esi
mov    $0x50,%edx
call   1060 <seq_utils_clamp@plt>
mov    %eax,%edi
call   1040 <song_set_swing@plt>
mov    $0x0,%al
call   1030 <song_get_swing@plt>
mov    %rax,%rdi
call   1050 <midi_clock_set_swing@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_adjust_swing>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <song_get_swing@plt>
movslq %ebx,%rdi
add    %rax,%rdi
mov    $0x32,%esi
mov    $0x50,%edx
call   1060 <seq_utils_clamp@plt>
mov    %eax,%edi
call   1040 <song_set_swing@plt>
xor    %eax,%eax
call   1030 <song_get_swing@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1050 <midi_clock_set_swing@plt>

LLVM IR (-O0):
define void @seq_ctrl_adjust_swing(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @song_get_swing()
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add nsw i64 %3, %5
%7 = call i32 @seq_utils_clamp(i64 %6, i32 50, i32 80)
%8 = call i32 @song_set_swing(i32 %7)
%9 = call i64 (...) @song_get_swing()
%10 = call i32 @midi_clock_set_swing(i64 %9)
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_adjust_swing(i32 %0) {
%2 = tail call i64 (...) @song_get_swing()
%3 = sext i32 %0 to i64
%4 = add nsw i64 %2, %3
%5 = tail call i32 @seq_utils_clamp(i64 %4, i32 50, i32 80)
%6 = tail call i32 @song_set_swing(i32 %5)
%7 = tail call i64 (...) @song_get_swing()
%8 = tail call i32 @midi_clock_set_swing(i64 %7)
ret void
}
/* Type definitions */
typedef int uint16_t;
struct pcg_state_32 {
  int dummy;
};

/* Variables and functions */
int pcg_unique_32_xsh_rs_16_random_r(struct pcg_state_32 *);
uint16_t pcg_unique_32_xsh_rs_16_boundedrand_r(struct pcg_state_32 *rng,
                                               uint16_t bound) {
  uint16_t threshold = ((uint16_t)(-bound)) % bound;
  for (;;) {
    uint16_t r = pcg_unique_32_xsh_rs_16_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_unique_32_xsh_rs_16_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_unique_32_xsh_rs_16_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_unique_32_xsh_rs_16_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_unique_32_xsh_rs_16_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_unique_32_xsh_rs_16_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_unique_32_xsh_rs_16_random_r@plt>
test   %eax,%eax
js     1120 <pcg_unique_32_xsh_rs_16_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_32 = type { i32 }
define i32 @pcg_unique_32_xsh_rs_16_boundedrand_r(%struct.pcg_state_32* %0, i32 %1) {
%3 = alloca %struct.pcg_state_32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_32* %0, %struct.pcg_state_32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_32*, %struct.pcg_state_32** %3
%13 = call i32 @pcg_unique_32_xsh_rs_16_random_r(%struct.pcg_state_32* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_32 = type { i32 }
define i32 @pcg_unique_32_xsh_rs_16_boundedrand_r(%struct.pcg_state_32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_unique_32_xsh_rs_16_random_r(%struct.pcg_state_32* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Variables and functions */
int le_read32(int *);
void le_read32_buff(int *buff, const int count) {
  int i;
  for (i = 0; i < count; i++)
    buff[i] = le_read32(&buff[i]);
}


x86 assembly (clang, -O0):
<le_read32_buff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <le_read32_buff+0x51>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <le_read32@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <le_read32_buff+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_read32_buff>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1134 <le_read32_buff+0x24>
mov    %rdi,%rbx
mov    %esi,%r14d
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <le_read32@plt>
mov    %eax,(%rbx)
add    $0x4,%rbx
add    $0xffffffffffffffff,%r14
jne    1120 <le_read32_buff+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @le_read32_buff(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @le_read32(i32* %8)
store i32 %9, i32* %8
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EmitLn(char *);
int /*<<< orphan*/ Match(char);
int /*<<< orphan*/ Term();
void Substract() {
  Match('-');
  Term();
  EmitLn("subl (%esp), %eax");
  EmitLn("negl %eax");
  EmitLn("addl $4, %esp");
}


x86 assembly (clang, -O0):
<Substract>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1040 <Match@plt>
mov    $0x0,%al
call   1030 <Term@plt>
lea    0xeb4(%rip),%rdi
call   1050 <EmitLn@plt>
lea    0xeba(%rip),%rdi
call   1050 <EmitLn@plt>
lea    0xeb8(%rip),%rdi
call   1050 <EmitLn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Substract>:
push   %rax
mov    $0x2d,%edi
call   1040 <Match@plt>
xor    %eax,%eax
call   1030 <Term@plt>
lea    0xeb7(%rip),%rdi
call   1050 <EmitLn@plt>
lea    0xebd(%rip),%rdi
call   1050 <EmitLn@plt>
lea    0xebb(%rip),%rdi
pop    %rax
jmp    1050 <EmitLn@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"subl (%esp), %eax\00"
@.str.1 = [10 x i8] c"negl %eax\00"
@.str.2 = [14 x i8] c"addl $4, %esp\00"
define void @Substract() {
%1 = call i32 @Match(i8 signext 45)
%2 = call i32 (...) @Term()
%3 = call i32 @EmitLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @EmitLn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @EmitLn(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"subl (%esp), %eax\00"
@.str.1 = [10 x i8] c"negl %eax\00"
@.str.2 = [14 x i8] c"addl $4, %esp\00"
define void @Substract() {
%1 = tail call i32 @Match(i8 signext 45)
%2 = tail call i32 (...) @Term()
%3 = tail call i32 @EmitLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @EmitLn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @EmitLn(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int proc_false(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @proc_false() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_count_cover(char *, int);
float sinf(float);
float HMM_SinF(float Radians) {
  { _hmt_count_cover("HMM_SinF", 422); };
  float Result = sinf(Radians);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_SinF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x1a6,%esi
call   1030 <_hmt_count_cover@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <sinf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_SinF>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xed2(%rip),%rdi
mov    $0x1a6,%esi
call   1030 <_hmt_count_cover@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <sinf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"HMM_SinF\00"
define float @HMM_SinF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i32 @_hmt_count_cover(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 422)
%5 = load float, float* %2
%6 = call float @sinf(float %5)
store float %6, float* %3
%7 = load float, float* %3
ret float %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"HMM_SinF\00"
define float @HMM_SinF(float %0) {
%2 = tail call i32 @_hmt_count_cover(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 422)
%3 = tail call float @sinf(float %0)
ret float %3
}
void XcmsCIELuvQueryMaxL() {}


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

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

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

LLVM IR (-O2):
define void @XcmsCIELuvQueryMaxL() {
ret void
}
int test_imm_74uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x74 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_74uint64_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, 116
%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_74uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 116
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int *two_sum(int *, size_t, int);
int main(int argc, char **argv) {
  int array[] = {2, 7, 11, 15};
  size_t len = sizeof(array) / sizeof(array[0]);
  int target = 9;
  int *retval = two_sum(array, len, target);
  printf("%d, %d\n", retval[0], retval[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x4,-0x28(%rbp)
movl   $0x9,-0x2c(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1040 <two_sum@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    (%rax),%esi
mov    -0x38(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x9,%edx
call   1040 <two_sum@plt>
mov    (%rax),%esi
mov    0x4(%rax),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.array = [4 x i32] [i32 2, i32 7, i32 11, i32 15]
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32* @two_sum(i32* %5, i64 4, i32 9)
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void x3(void) {
  printf("Called mod3-x3 "
         ""
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"Called mod3-x3 \00"
define void @x3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int *);
int report_div0_and_no_npe(int *p) {
  assert(p);
  return *p / 0;
}


x86 assembly (clang, -O0):
<report_div0_and_no_npe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
xor    %ecx,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_div0_and_no_npe>:
jmp    1030 <assert@plt>

LLVM IR (-O0):
define i32 @report_div0_and_no_npe(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @assert(i32* %3)
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = sdiv i32 %6, 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @report_div0_and_no_npe(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFD;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int net_setnonblock(int fd) {
  if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFD, 0) | O_NONBLOCK) == -1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<net_setnonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
mov    0x2e99(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
jne    116b <net_setnonblock+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <net_setnonblock+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_setnonblock>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <fcntl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@F_SETFL = global i32 0
@F_GETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @net_setnonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @F_SETFL
%6 = load i32, i32* %3
%7 = load i32, i32* @F_GETFD
%8 = call i32 @fcntl(i32 %6, i32 %7, i32 0)
%9 = load i32, i32* @O_NONBLOCK
%10 = or i32 %8, %9
%11 = call i32 @fcntl(i32 %4, i32 %5, i32 %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@F_GETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @net_setnonblock(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFD
%4 = tail call i32 @fcntl(i32 %0, i32 %3, i32 0)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %6)
%8 = icmp eq i32 %7, -1
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
void gen_swap(void) { output_line("xchg"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"xchg\00"
define void @gen_swap() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ utilVectorAdd(float *, float *, unsigned int);
void utilVectorAddInStream(float *dst, float *src, unsigned int num,
                           void *stream) {
  utilVectorAdd(dst, src, num);
}


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

x86 assembly (clang, -O2):
<utilVectorAddInStream>:
jmp    1030 <utilVectorAdd@plt>

LLVM IR (-O0):
define void @utilVectorAddInStream(float* %0, float* %1, i32 %2, i8* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
%8 = alloca i8*
store float* %0, float** %5
store float* %1, float** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load float*, float** %5
%10 = load float*, float** %6
%11 = load i32, i32* %7
%12 = call i32 @utilVectorAdd(float* %9, float* %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @utilVectorAddInStream(float* %0, float* %1, i32 %2, i8* nocapture readnone %3) {
%5 = tail call i32 @utilVectorAdd(float* %0, float* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
int main() {
  short s;
  s = 0x0100;
  printf("%d\n", s);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 256, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext 256)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xa6() {
  Assert_real((isodigit(166) == 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_isodigit.c",
              835, ("isodigit should be 0 for 0xa6"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xa6>:
push   %rax
mov    $0xa6,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x343,%edx
pop    %rax
jmp    1030 <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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xa6\00"
define void @t_isodigit_0xa6() {
%1 = call i64 @isodigit(i32 166)
%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 835, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xa6\00"
define void @t_isodigit_0xa6() {
%1 = tail call i64 @isodigit(i32 166)
%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 835, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ errorHandling();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int closeLog(FILE *fileToClose) {
  if (fileToClose != NULL) {
    fclose(fileToClose);
    return 0;
  } else {
    errorHandling();
    return -1;
  }
}


x86 assembly (clang, -O0):
<closeLog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <closeLog+0x2c>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    115a <closeLog+0x3a>
mov    $0x0,%al
call   1040 <errorHandling@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeLog>:
push   %rax
test   %rdi,%rdi
je     112f <closeLog+0xf>
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1040 <errorHandling@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @closeLog(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32*, i32** %3
%8 = call i32 @fclose(i32* %7)
store i32 0, i32* %2
br label %11
9: ; preds = %1
%10 = call i32 (...) @errorHandling()
store i32 -1, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @closeLog(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fclose(i32* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @errorHandling()
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ 0, %3 ], [ -1, %5 ]
ret i32 %8
}