xunge/DecIR huggingface dataset:
void strncopy(to, from, len) char *to;
char *from;
int len;
{
  int i;
  for (i = 1; i < len && *from; i++)
    *to++ = *from++;
  *to = '\0';
}


x86 assembly (clang, -O0):
<strncopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x19(%rbp)
jge    1137 <strncopy+0x37>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1147 <strncopy+0x47>
jmp    1177 <strncopy+0x77>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <strncopy+0x16>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncopy>:
cmp    $0x2,%edx
jl     1126 <strncopy+0x26>
add    $0xffffffff,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
test   %cl,%cl
je     1123 <strncopy+0x23>
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
cmp    %eax,%edx
jne    1110 <strncopy+0x10>
add    %rax,%rdi
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @strncopy(i8* nocapture writeonly %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 1
br i1 %4, label %5, label %16
5: ; preds = %3, %11
%6 = phi i32 [ %14, %11 ], [ 1, %3 ]
%7 = phi i8* [ %13, %11 ], [ %0, %3 ]
%8 = phi i8* [ %12, %11 ], [ %1, %3 ]
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %9, i8* %7
%14 = add nuw nsw i32 %6, 1
%15 = icmp eq i32 %14, %2
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %3
%17 = phi i8* [ %0, %3 ], [ %13, %11 ], [ %7, %5 ]
store i8 0, i8* %17
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no_instrument_function))
__cyg_profile_func_enter(void *this_fn, void *call_site) {
  if (call_site == (void *)0)
    abort();
}


x86 assembly (clang, -O0):
<__cyg_profile_func_enter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1132 <__cyg_profile_func_enter+0x22>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cyg_profile_func_enter>:
test   %rsi,%rsi
je     1116 <__cyg_profile_func_enter+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @__cyg_profile_func_enter(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 %9
7: ; preds = %2
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @__cyg_profile_func_enter(i8* nocapture readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret void
}
char *skip_whitespace(char *s) {
  while (*s == ' ' || *s == '\t')
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skip_whitespace+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skip_whitespace+0x3d>
jmp    114e <skip_whitespace+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_whitespace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
mov    %rdi,%rax
jmp    1114 <skip_whitespace+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skip_whitespace+0x10>
cmp    $0x9,%cl
je     1110 <skip_whitespace+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_whitespace(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
int main(void) {
  int x;
  int y;
  int z;
  {
    x = 5;
    y = x;
    x++;
  L:
    y -= x;
    z = y;
    goto L;
    return (0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1121 <main+0x21>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
br label %8
8: ; preds = %8, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
store i32 %12, i32* %4
br label %8
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t _dns_parse_uint8(char **p) {
  uint8_t v;
  v = (uint8_t) * *p;
  *p += 1;
  return v;
}


x86 assembly (clang, -O0):
<_dns_parse_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbq (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dns_parse_uint8>:
mov    (%rdi),%rcx
movsbq (%rcx),%rax
add    $0x1,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i64 @_dns_parse_uint8(i8** %0) {
%2 = alloca i8**
%3 = alloca i64
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i64
store i64 %7, i64* %3
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %8
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
define i64 @_dns_parse_uint8(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %5, i8** %0
ret i64 %4
}
/* Type definitions */
struct server {
  int dummy;
};
struct imapmsg {
  int dummy;
};
struct folder {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ start_fetch(struct server *, struct folder *);
void imap_getcrlf_done(struct imapmsg *msg, struct server *sptr,
                       struct folder *fptr) {
  start_fetch(sptr, fptr);
}


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

x86 assembly (clang, -O2):
<imap_getcrlf_done>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <start_fetch@plt>

LLVM IR (-O0):
%struct.imapmsg = type { i32 }
%struct.server = type { i32 }
%struct.folder = type { i32 }
define void @imap_getcrlf_done(%struct.imapmsg* %0, %struct.server* %1, %struct.folder* %2) {
%4 = alloca %struct.imapmsg*
%5 = alloca %struct.server*
%6 = alloca %struct.folder*
store %struct.imapmsg* %0, %struct.imapmsg** %4
store %struct.server* %1, %struct.server** %5
store %struct.folder* %2, %struct.folder** %6
%7 = load %struct.server*, %struct.server** %5
%8 = load %struct.folder*, %struct.folder** %6
%9 = call i32 @start_fetch(%struct.server* %7, %struct.folder* %8)
ret void
}

LLVM IR (-O2):
%struct.imapmsg = type { i32 }
%struct.server = type { i32 }
%struct.folder = type { i32 }
define void @imap_getcrlf_done(%struct.imapmsg* nocapture readnone %0, %struct.server* %1, %struct.folder* %2) {
%4 = tail call i32 @start_fetch(%struct.server* %1, %struct.folder* %2)
ret void
}
/* Variables and functions */
scalar_t__ memcmp(char const *, char *, size_t);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
int __mem_eq_0(const char *mem, size_t len) {
  char buffer[len];
  memset(buffer, 0, len);
  return memcmp(mem, buffer, len) == 0;
}


x86 assembly (clang, -O0):
<__mem_eq_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mem_eq_0>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsp,%rbx
lea    0xf(%rsi),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1030 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @__mem_eq_0(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %5
%9 = alloca i8, i64 %7
store i64 %7, i64* %6
%10 = load i64, i64* %4
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
%12 = load i8*, i8** %3
%13 = load i64, i64* %4
%14 = call i64 @memcmp(i8* %12, i8* %9, i64 %13)
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = load i8*, i8** %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @__mem_eq_0(i8* %0, i64 %1) {
%3 = alloca i8, i64 %1
%4 = call i32 @memset(i8* %3, i32 0, i64 %1)
%5 = call i64 @memcmp(i8* %0, i8* %3, i64 %1)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256d;

/* Variables and functions */
int /*<<< orphan*/ _mm256_fmsubadd_pd(int /*<<< orphan*/, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
__m256d __attribute__((__target__("fma")))
mm256_fmsubadd_pd_wrap(__m256d a, __m256d b, __m256d c) {
  return _mm256_fmsubadd_pd(a, b, c);
}


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

x86 assembly (clang, -O2):
<mm256_fmsubadd_pd_wrap>:
jmp    1030 <_mm256_fmsubadd_pd@plt>

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

LLVM IR (-O2):
define i32 @mm256_fmsubadd_pd_wrap(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_mm256_fmsubadd_pd(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ echo_to_all(int, char *, int /*<<< orphan*/);
void start_summer(void) {
  echo_to_all(
      11, "The days grow longer and hotter as summer grips the world.\r\n", 0);
  return;
}


x86 assembly (clang, -O0):
<start_summer>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb,%edi
lea    0xee0(%rip),%rsi
xor    %edx,%edx
call   1030 <echo_to_all@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_summer>:
lea    0xee9(%rip),%rsi
mov    $0xb,%edi
xor    %edx,%edx
jmp    1030 <echo_to_all@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"The days grow longer and hotter as summer grips the world.\0D\0A\00"
define void @start_summer() {
%1 = call i32 @echo_to_all(i32 11, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"The days grow longer and hotter as summer grips the world.\0D\0A\00"
define void @start_summer() {
%1 = tail call i32 @echo_to_all(i32 11, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
void free_submatrix(b, nrl, nrh, ncl, nch) float **b;
int nrl, nrh, ncl, nch;
{
  if (nrh + ncl + nch)
    nch = nch;
  free((char *)(b + nrl));
}


x86 assembly (clang, -O0):
<free_submatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    $0x0,%eax
je     1141 <free_submatrix+0x31>
mov    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_submatrix>:
movslq %esi,%rax
lea    (%rdi,%rax,8),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_submatrix(float** nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds float*, float** %0, i64 %6
%8 = bitcast float** %7 to i8*
tail call void @free(i8* %8)
ret void
}
/* Variables and functions */
unsigned int sleep(unsigned int);
void sleep_s(unsigned int seconds) {
  for (; seconds; seconds = sleep(seconds))
    ;
}


x86 assembly (clang, -O0):
<sleep_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113a <sleep_s+0x2a>
jmp    112a <sleep_s+0x1a>
mov    -0x4(%rbp),%edi
call   1030 <sleep@plt>
mov    %eax,-0x4(%rbp)
jmp    111b <sleep_s+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_s>:
push   %rax
test   %edi,%edi
je     112b <sleep_s+0x1b>
mov    %edi,%eax
nopw   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <sleep@plt>
test   %eax,%eax
jne    1120 <sleep_s+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @sleep_s(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %2
%9 = call i32 @sleep(i32 %8)
store i32 %9, i32* %2
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @sleep_s(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = tail call i32 @sleep(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x9e() {
  Assert_real((isbdigit(158) == 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_isbdigit.c",
              795, ("isbdigit should be 0 for 0x9e"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x9e>:
push   %rax
mov    $0x9e,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x31b,%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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x9e\00"
define void @t_isbdigit_0x9e() {
%1 = call i64 @isbdigit(i32 158)
%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 795, 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x9e\00"
define void @t_isbdigit_0x9e() {
%1 = tail call i64 @isbdigit(i32 158)
%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 795, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int c076(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c076() {
ret i32 0
}
/* Variables and functions */
scalar_t__ isfinite(double const);
bool accept_posfin_double(void *val) {
  const double *dval = (const double *)val;
  return (val && isfinite(*dval) && *dval > 0);
}


x86 assembly (clang, -O0):
<accept_posfin_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1168 <accept_posfin_double+0x58>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <isfinite@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1168 <accept_posfin_double+0x58>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_posfin_double>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %rdi,%rdi
je     113d <accept_posfin_double+0x2d>
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
call   1030 <isfinite@plt>
test   %rax,%rax
je     113d <accept_posfin_double+0x2d>
movsd  (%rbx),%xmm0
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
ucomisd %xmm1,%xmm0
seta   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @accept_posfin_double(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = load double*, double** %3
%10 = load double, double* %9
%11 = call i64 @isfinite(double %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load double*, double** %3
%15 = load double, double* %14
%16 = fcmp ogt double %15, 0.000000e+00
br label %17
17: ; preds = %13, %8, %1
%18 = phi i1 [ false, %8 ], [ false, %1 ], [ %16, %13 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @accept_posfin_double(i8* %0) {
%2 = bitcast i8* %0 to double*
%3 = icmp eq i8* %0, null
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = load double, double* %2
%6 = tail call i64 @isfinite(double %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = load double, double* %2
%10 = fcmp ogt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %4, %1
%13 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t get_uint24(unsigned char *buf, int start) {
  return (uint32_t)buf[start] << 16 | (uint32_t)buf[start + 1] << 8 |
         (uint32_t)buf[start + 2];
}


x86 assembly (clang, -O0):
<get_uint24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint24>:
movslq %esi,%rax
movzbl (%rdi,%rax,1),%ecx
shl    $0x10,%ecx
movzbl 0x1(%rdi,%rax,1),%edx
shl    $0x8,%edx
or     %ecx,%edx
movzbl 0x2(%rdi,%rax,1),%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @get_uint24(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 16
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = or i32 %11, %19
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %21, i64 %24
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = or i32 %20, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @get_uint24(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 16
%8 = add nsw i32 %1, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %13, %7
%15 = add nsw i32 %1, 2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %0, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = or i32 %14, %19
ret i32 %20
}
/* Variables and functions */
__attribute__((visibility("default"))) void *sd_event_ref(void *e) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_event_ref(i8* nocapture readnone %0) {
ret i8* null
}
XLowerWindow() {}


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

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

LLVM IR (-O0):
define i32 @XLowerWindow() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XLowerWindow() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, unsigned int, char *, double);
int strlen(char *);
int __ghdl_snprintf_g(char *buf, unsigned int len, double val) {
  snprintf(buf, len, "%g", val);
  return strlen(buf);
}


x86 assembly (clang, -O0):
<__ghdl_snprintf_g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xeb9(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ghdl_snprintf_g>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdx
call   1040 <snprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%g\00"
define i32 @__ghdl_snprintf_g(i8* %0, i32 %1, double %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
store i8* %0, i8** %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load double, double* %6
%10 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %9)
%11 = load i8*, i8** %4
%12 = call i32 @strlen(i8* %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%g\00"
define i32 @__ghdl_snprintf_g(i8* %0, i32 %1, double %2) {
%4 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %2)
%5 = tail call i32 @strlen(i8* %0)
ret i32 %5
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
int usb_raw_io_flags_valid(__u16 flags) { return (flags & ~0x0001) == 0; }


x86 assembly (clang, -O0):
<usb_raw_io_flags_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffffe,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_raw_io_flags_valid>:
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @usb_raw_io_flags_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @usb_raw_io_flags_valid(i32 %0) {
%2 = icmp ult i32 %0, 2
%3 = zext i1 %2 to i32
ret i32 %3
}
void XmbDrawString() {}


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

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

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

LLVM IR (-O2):
define void @XmbDrawString() {
ret void
}
void fc92(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    }
    goto a;
    ;
    typedef int(*e)[n];
    0;
  };
a : {
  typedef int(*f)[n];
  {
    typedef int(*g)[n];
    0;
  };
  {
    typedef int(*h)[n];
    0;
  };
  ;
  typedef int(*i)[n];
  0;
};
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc92(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
br label %12
9: ; No predecessors!
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc92(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Lcd_Clr_Line(int);
int /*<<< orphan*/ Lcd_Out(int, int, char *);
void Lcd_OutText(unsigned char var, char *text) {
  if (var)
    Lcd_Out(2, 1, text);
  else
    Lcd_Clr_Line(2);
}


x86 assembly (clang, -O0):
<Lcd_OutText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1154 <Lcd_OutText+0x34>
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <Lcd_Out@plt>
jmp    115e <Lcd_OutText+0x3e>
mov    $0x2,%edi
call   1040 <Lcd_Clr_Line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lcd_OutText>:
test   %edi,%edi
je     1136 <Lcd_OutText+0x16>
mov    %rsi,%rdx
mov    $0x2,%edi
mov    $0x1,%esi
jmp    1030 <Lcd_Out@plt>
mov    $0x2,%edi
jmp    1040 <Lcd_Clr_Line@plt>

LLVM IR (-O0):
define void @Lcd_OutText(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @Lcd_Out(i32 2, i32 1, i8* %8)
br label %12
10: ; preds = %2
%11 = call i32 @Lcd_Clr_Line(i32 2)
br label %12
12: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @Lcd_OutText(i8 zeroext %0, i8* %1) {
%3 = icmp eq i8 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @Lcd_Out(i32 2, i32 1, i8* %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @Lcd_Clr_Line(i32 2)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __iar_program_start();
void Reset(void) { __iar_program_start(); }


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

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

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

LLVM IR (-O2):
define void @Reset() {
%1 = tail call i32 (...) @__iar_program_start()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_list(int len, int *l) {
  int c;
  for (c = 0; c < len; c++) {
    printf("%d ", l[c]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1159 <print_list+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_list+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_list>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1157 <print_list+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_list+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_list(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 = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_list(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int);
int nondet_int();
int fn1(int n) {
  int ret = nondet_int();
  __ESBMC_assume(0 <= ret);
  __ESBMC_assume(ret < n);
  return ret;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__ESBMC_assume@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__ESBMC_assume@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    %eax,%ebp
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   1040 <__ESBMC_assume@plt>
xor    %edi,%edi
cmp    %ebx,%ebp
setl   %dil
call   1040 <__ESBMC_assume@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @nondet_int()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp sle i32 0, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__ESBMC_assume(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @__ESBMC_assume(i32 %12)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = tail call i32 (...) @nondet_int()
%3 = xor i32 %2, -1
%4 = lshr i32 %3, 31
%5 = tail call i32 @__ESBMC_assume(i32 %4)
%6 = icmp slt i32 %2, %0
%7 = zext i1 %6 to i32
%8 = tail call i32 @__ESBMC_assume(i32 %7)
ret i32 %2
}
__typeof__(memchr(1, 1, "")) test_memchr_131(void) { return memchr(1, 1, ""); }


x86 assembly (clang, -O0):
<test_memchr_131>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <memchr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_memchr_131>:
lea    0xee9(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
jmp    1030 <memchr@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @test_memchr_131() {
%1 = call i8* @memchr(i8* inttoptr (i64 1 to i8*), i32 1, i64 ptrtoint ([1 x i8]* @.str to i64))
ret i8* %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @test_memchr_131() {
%1 = tail call i8* @memchr(i8* inttoptr (i64 1 to i8*), i32 1, i64 ptrtoint ([1 x i8]* @.str to i64))
ret i8* %1
}
int least(int x) { return (0xFF000000 & (x << (sizeof(int) * 6))); }


x86 assembly (clang, -O0):
<least>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
and    $0xff000000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<least>:
mov    %edi,%eax
shl    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @least(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = and i32 -16777216, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @least(i32 %0) {
%2 = shl i32 %0, 24
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int border_width;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
void set_XConfigureRequestEvent_border_width(void *_p, int _v) {
  ((XConfigureRequestEvent *)_p)->border_width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XConfigureRequestEvent_border_width>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XConfigureRequestEvent_border_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
double difftime(time_t time1, time_t time0) {
  return ((double)(time1 - time0));
}


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
sub    %rsi,%rdi
cvtsi2sd %rdi,%xmm0
ret

LLVM IR (-O0):
define double @difftime(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 = sub nsw i64 %5, %6
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @difftime(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = sitofp i64 %3 to double
ret double %4
}
/* Variables and functions */
long Chisquare(long);
double Normal(double, double);
double sqrt(long);
double Student(long n) { return (Normal(0.0, 1.0) / sqrt(Chisquare(n) / n)); }


x86 assembly (clang, -O0):
<Student>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  0xeb9(%rip),%xmm1
call   1030 <Normal@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <Chisquare@plt>
cqto
idivq  -0x8(%rbp)
mov    %rax,%rdi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Student>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  0xec0(%rip),%xmm1
xorpd  %xmm0,%xmm0
call   1030 <Normal@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <Chisquare@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     116a <Student+0x3a>
cqto
idiv   %rbx
jmp    116e <Student+0x3e>
xor    %edx,%edx
div    %ebx
mov    %rax,%rdi
call   1050 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @Student(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call double @Normal(double 0.000000e+00, double 1.000000e+00)
%4 = load i64, i64* %2
%5 = call i64 @Chisquare(i64 %4)
%6 = load i64, i64* %2
%7 = sdiv i64 %5, %6
%8 = call double @sqrt(i64 %7)
%9 = fdiv double %3, %8
ret double %9
}

LLVM IR (-O2):
define double @Student(i64 %0) {
%2 = tail call double @Normal(double 0.000000e+00, double 1.000000e+00)
%3 = tail call i64 @Chisquare(i64 %0)
%4 = sdiv i64 %3, %0
%5 = tail call double @sqrt(i64 %4)
%6 = fdiv double %2, %5
ret double %6
}
double quarticEaseInOutd(double p) {
  if (p < 0.5) {
    return 8 * p * p * p * p;
  } else {
    double f = (p - 1);
    return -8 * f * f * f * f + 1;
  }
}


x86 assembly (clang, -O0):
<quarticEaseInOutd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1142 <quarticEaseInOutd+0x42>
movsd  0xef4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1189 <quarticEaseInOutd+0x89>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb0(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe88(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quarticEaseInOutd>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    112b <quarticEaseInOutd+0x2b>
movsd  0xf0a(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret
addsd  0xed5(%rip),%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xec5(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @quarticEaseInOutd(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp olt double %5, 5.000000e-01
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load double, double* %3
%9 = fmul double 8.000000e+00, %8
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = load double, double* %3
%13 = fmul double %11, %12
%14 = load double, double* %3
%15 = fmul double %13, %14
store double %15, double* %2
br label %27
16: ; preds = %1
%17 = load double, double* %3
%18 = fsub double %17, 1.000000e+00
store double %18, double* %4
%19 = load double, double* %4
%20 = fmul double -8.000000e+00, %19
%21 = load double, double* %4
%22 = fmul double %20, %21
%23 = load double, double* %4
%24 = fmul double %22, %23
%25 = load double, double* %4
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 1.000000e+00)
store double %26, double* %2
br label %27
27: ; preds = %16, %7
%28 = load double, double* %2
ret double %28
}

LLVM IR (-O2):
define double @quarticEaseInOutd(double %0) {
%2 = fcmp olt double %0, 5.000000e-01
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = fmul double %0, 8.000000e+00
%5 = fmul double %4, %0
%6 = fmul double %5, %0
%7 = fmul double %6, %0
br label %14
8: ; preds = %1
%9 = fadd double %0, -1.000000e+00
%10 = fmul double %9, -8.000000e+00
%11 = fmul double %9, %10
%12 = fmul double %9, %11
%13 = tail call double @llvm.fmuladd.f64(double %12, double %9, double 1.000000e+00)
br label %14
14: ; preds = %8, %3
%15 = phi double [ %7, %3 ], [ %13, %8 ]
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printusage(void) {
  fprintf(stderr, "Usage: \n");
  fprintf(stderr,
          "  date2mjd -y year -m month -d day -h hour -i minute -s second\n");
}


x86 assembly (clang, -O0):
<printusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printusage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeda(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"Usage: \0A\00"
@.str.1 = [64 x i8] c" date2mjd -y year -m month -d day -h hour -i minute -s second\0A\00"
define void @printusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"Usage: \0A\00"
@.str.1 = [64 x i8] c" date2mjd -y year -m month -d day -h hour -i minute -s second\0A\00"
define void @printusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void sig_handler() {
  endwin();
  printf("*** Client ended due to interrupt ***\n");
  exit(1);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <endwin@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
xor    %eax,%eax
call   1040 <endwin@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"*** Client ended due to interrupt ***\0A\00"
define void @sig_handler() {
%1 = call i32 (...) @endwin()
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [38 x i8] c"*** Client ended due to interrupt ***\00"
define void @sig_handler() {
%1 = tail call i32 (...) @endwin()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *null() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @null() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @null() {
ret i8* null
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t rm8(const uint8_t a[1]) {
  uint8_t x;
  x = (uint8_t)a[0] << 0;
  return x;
}


x86 assembly (clang, -O0):
<rm8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rm8(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = shl i32 %6, 0
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @rm8(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}