xunge/DecIR huggingface dataset:
char *strcat(char *s1, const char *s2) {
  char *s = s1;
  while (*s1)
    s1++;
  while ((*s1++ = *s2++))
    ;
  return s;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1166 <strcat+0x66>
jmp    1137 <strcat+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
/* Variables and functions */
int tirar(int);
int d2() { return tirar(2); }


x86 assembly (clang, -O0):
<d2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <tirar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2>:
mov    $0x2,%edi
jmp    1030 <tirar@plt>

LLVM IR (-O0):
define i32 @d2() {
%1 = call i32 @tirar(i32 2)
ret i32 %1
}

LLVM IR (-O2):
define i32 @d2() {
%1 = tail call i32 @tirar(i32 2)
ret i32 %1
}
/* Variables and functions */
long double cosl(long double);
long double cosd(long double x) {
  return cosl(x / 180.0L * 3.141592653589793238462643383279502884L);
}


x86 assembly (clang, -O0):
<cosd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xed9(%rip)
fdivrp %st,%st(1)
fldt   0xee1(%rip)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <cosl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosd>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fdivs  0xee2(%rip)
fldt   0xeec(%rip)
fmulp  %st,%st(1)
fstpt  (%rsp)
call   1030 <cosl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @cosd(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fdiv x86_fp80 %3, 0xK4006B400000000000000
%5 = fmul x86_fp80 %4, 0xK4000C90FDAA22168C235
%6 = call x86_fp80 @cosl(x86_fp80 %5)
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @cosd(x86_fp80 %0) {
%2 = fdiv x86_fp80 %0, 0xK4006B400000000000000
%3 = fmul x86_fp80 %2, 0xK4000C90FDAA22168C235
%4 = tail call x86_fp80 @cosl(x86_fp80 %3)
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int, int /*<<< orphan*/);
void print_version() {
  printf("ipscan %d.%d.%d\n\n", 0, 9, 0);
  exit(0);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
xor    %ecx,%ecx
mov    $0x9,%edx
mov    %ecx,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
mov    $0x9,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"ipscan %d.%d.%d\0A\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0, i32 9, i32 0)
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"ipscan %d.%d.%d\0A\0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0, i32 9, i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}
int any(int c, char *as) {
  register char *s;
  s = as;
  while (*s)
    if (*s++ == c)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<any>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <any+0x4c>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    1147 <any+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1153 <any+0x53>
jmp    1113 <any+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any>:
movsbl (%rsi),%eax
test   %eax,%eax
je     1115 <any+0x15>
add    $0x1,%rsi
cmp    %edi,%eax
jne    1100 <any>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @any(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
%12 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %12
}
void nguraCleanup() {}


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

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

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

LLVM IR (-O2):
define void @nguraCleanup() {
ret void
}
/* Variables and functions */
int get_line(char *, int);
int htoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int len;
  char line[1000];
  while ((len = get_line(line, 1000)) > 0)
    printf("%d\n", htoi(line));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    117e <main+0x4e>
lea    -0x3f0(%rbp),%rdi
call   1050 <htoi@plt>
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jle    1183 <main+0x53>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1050 <htoi@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @get_line(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i32 @htoi(i8* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %4
12: ; preds = %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_line(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @htoi(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @get_line(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ gennice();
int /*<<< orphan*/ genslice();
int /*<<< orphan*/ printnice();
int main(int argc, char *argv[]) {
  gennice();
  genslice();
  printnice();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <gennice@plt>
mov    $0x0,%al
call   1060 <genslice@plt>
mov    $0x0,%al
call   1040 <printnice@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <gennice@plt>
xor    %eax,%eax
call   1060 <genslice@plt>
xor    %eax,%eax
call   1040 <printnice@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @gennice()
%7 = call i32 (...) @genslice()
%8 = call i32 (...) @printnice()
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @gennice()
%4 = tail call i32 (...) @genslice()
%5 = tail call i32 (...) @printnice()
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ ft_strcpy(char *, char const *);
int ft_strlen(char *);
char *ft_strcat(char *s1, const char *s2) {
  int i;
  i = ft_strlen(s1);
  ft_strcpy(&s1[i], s2);
  return (s1);
}


x86 assembly (clang, -O0):
<ft_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @ft_strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8*, i8** %4
%13 = call i32 @ft_strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @ft_strcat(i8* returned %0, i8* %1) {
%3 = tail call i32 @ft_strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @ft_strcpy(i8* %5, i8* %1)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t __noswap16(uint16_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @__noswap16(i32 returned %0) {
ret i32 %0
}
void wifi_rsp_tcpip_start_tcp_server(
    const struct wifi_msg_tcpip_start_tcp_server_rsp_t *msg) {}


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

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

LLVM IR (-O0):
%struct.wifi_msg_tcpip_start_tcp_server_rsp_t = type opaque
define void @wifi_rsp_tcpip_start_tcp_server(%struct.wifi_msg_tcpip_start_tcp_server_rsp_t* %0) {
%2 = alloca %struct.wifi_msg_tcpip_start_tcp_server_rsp_t*
store %struct.wifi_msg_tcpip_start_tcp_server_rsp_t* %0, %struct.wifi_msg_tcpip_start_tcp_server_rsp_t** %2
ret void
}

LLVM IR (-O2):
%struct.wifi_msg_tcpip_start_tcp_server_rsp_t = type opaque
define void @wifi_rsp_tcpip_start_tcp_server(%struct.wifi_msg_tcpip_start_tcp_server_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
void __builtin_wasm_throw(int /*<<< orphan*/, void *);
void throw(void *obj) { return __builtin_wasm_throw(0, obj); }


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

x86 assembly (clang, -O2):
<throw>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <__builtin_wasm_throw@plt>

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

LLVM IR (-O2):
define void @throw(i8* %0) {
tail call void @__builtin_wasm_throw(i32 0, i8* %0)
ret void
}
/* Variables and functions */
int syscall(int, char const *, char const *, void const *, size_t, int);
int lsetxattr(const char *path, const char *name, const void *value,
              size_t size, int flags) {
  return syscall(227, path, name, value, size, flags);
}


x86 assembly (clang, -O0):
<lsetxattr>:
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    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    $0xe3,%edi
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsetxattr>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xe3,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @lsetxattr(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = tail call i32 @syscall(i32 227, i8* %0, i8* %1, i8* %2, i64 %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dbuf_free(const void *buf) { free((void *)buf); }


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

x86 assembly (clang, -O2):
<dbuf_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @dbuf_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
double DProbNormal(int /*<<< orphan*/);
int /*<<< orphan*/ DRanNormalZig();
double DRanQuanNormalZig(void) { return DProbNormal(DRanNormalZig()); }


x86 assembly (clang, -O0):
<DRanQuanNormalZig>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <DRanNormalZig@plt>
mov    %eax,%edi
call   1040 <DProbNormal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DRanQuanNormalZig>:
push   %rax
xor    %eax,%eax
call   1030 <DRanNormalZig@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <DProbNormal@plt>

LLVM IR (-O0):
define double @DRanQuanNormalZig() {
%1 = call i32 (...) @DRanNormalZig()
%2 = call double @DProbNormal(i32 %1)
ret double %2
}

LLVM IR (-O2):
define double @DRanQuanNormalZig() {
%1 = tail call i32 (...) @DRanNormalZig()
%2 = tail call double @DProbNormal(i32 %1)
ret double %2
}
int test_imm_7Bint16_reg(short val) {
  return ((val) & (-0x7B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Bint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff85,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Bint16_reg>:
test   $0xff85,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_7Bint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -123
%6 = icmp ne i32 %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_7Bint16_reg(i16 signext %0) {
%2 = and i16 %0, -123
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
int getsockname(int, struct sockaddr *, int *);
int ez_sockfd_to_point(int _fd, struct sockaddr *_res) {
  socklen_t addr_len = 0;
  if (!_res)
    return -1;
  addr_len = sizeof(*_res);
  return getsockname(_fd, _res, &addr_len);
}


x86 assembly (clang, -O0):
<ez_sockfd_to_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113d <ez_sockfd_to_point+0x2d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <ez_sockfd_to_point+0x47>
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <getsockname@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ez_sockfd_to_point>:
test   %rsi,%rsi
je     112d <ez_sockfd_to_point+0x1d>
push   %rax
movl   $0x4,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <getsockname@plt>
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @ez_sockfd_to_point(i32 %0, %struct.sockaddr* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32 0, i32* %6
%7 = load %struct.sockaddr*, %struct.sockaddr** %5
%8 = icmp ne %struct.sockaddr* %7, null
br i1 %8, label %10, label %9
9: ; preds = %2
store i32 -1, i32* %3
br label %14
10: ; preds = %2
store i32 4, i32* %6
%11 = load i32, i32* %4
%12 = load %struct.sockaddr*, %struct.sockaddr** %5
%13 = call i32 @getsockname(i32 %11, %struct.sockaddr* %12, i32* %6)
store i32 %13, i32* %3
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @ez_sockfd_to_point(i32 %0, %struct.sockaddr* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp eq %struct.sockaddr* %1, null
br i1 %5, label %8, label %6
6: ; preds = %2
store i32 4, i32* %3
%7 = call i32 @getsockname(i32 %0, %struct.sockaddr* %1, i32* %3)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int i2c_smbus_write_word_data(int, int, int);
int odroidI2CWriteReg16(int fd, int reg, int data) {
  return i2c_smbus_write_word_data(fd, reg, data);
}


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

x86 assembly (clang, -O2):
<odroidI2CWriteReg16>:
jmp    1030 <i2c_smbus_write_word_data@plt>

LLVM IR (-O0):
define i32 @odroidI2CWriteReg16(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 @i2c_smbus_write_word_data(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @odroidI2CWriteReg16(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @i2c_smbus_write_word_data(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: mkfifo [-m mode] fifoname ...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"usage: mkfifo [-m mode] fifoname ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"usage: mkfifo [-m mode] fifoname ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bt_sys_settimeofday(struct timeval *, struct timezone *);
int settimeofday(struct timeval *p, struct timezone *z) {
  bt_sys_settimeofday(p, z);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @settimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = load %struct.timezone*, %struct.timezone** %4
%7 = call i32 @bt_sys_settimeofday(%struct.timeval* %5, %struct.timezone* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @settimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = tail call i32 @bt_sys_settimeofday(%struct.timeval* %0, %struct.timezone* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void trap_handler() {
  putchar('!');
  putchar('\n');
}


x86 assembly (clang, -O0):
<trap_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trap_handler>:
push   %rax
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @trap_handler() {
%1 = call i32 @putchar(i8 signext 33)
%2 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @trap_handler() {
%1 = tail call i32 @putchar(i8 signext 33)
%2 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_13511() {
  Assert_real((isqrt(13511) == 116),
              "/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/stdlib/isqrt.c",
              1565, ("Integer square root of 13511 should be 116"));
}


x86 assembly (clang, -O0):
<t_sqrt_13511>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34c7,%edi
call   1030 <isqrt@plt>
cmp    $0x74,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x61d,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_13511>:
push   %rax
mov    $0x34c7,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x74,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x61d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 13511 should be 116\00"
define void @t_sqrt_13511() {
%1 = call i32 @isqrt(i32 13511)
%2 = icmp eq i32 %1, 116
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1565, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [43 x i8] c"Integer square root of 13511 should be 116\00"
define void @t_sqrt_13511() {
%1 = tail call i32 @isqrt(i32 13511)
%2 = icmp eq i32 %1, 116
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1565, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *invo_name() {
  register int *ip;
  ip = (int *)0x7ffffff8;
  while (*--ip != 0)
    ;
  return (char *)&ip[1];
}


x86 assembly (clang, -O0):
<invo_name>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7ffffff8,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0x0,-0x4(%rax)
je     112b <invo_name+0x2b>
jmp    110d <invo_name+0xd>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invo_name>:
mov    $0x7ffffffc,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,-0x8(%rax)
lea    -0x4(%rax),%rax
jne    1110 <invo_name+0x10>
ret

LLVM IR (-O0):
define i8* @invo_name() {
%1 = alloca i32*
store i32* inttoptr (i64 2147483640 to i32*), i32** %1
br label %2
2: ; preds = %7, %0
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i32 -1
store i32* %4, i32** %1
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %2
8: ; preds = %2
%9 = load i32*, i32** %1
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = bitcast i32* %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @invo_name() {
br label %1
1: ; preds = %1, %0
%2 = phi i32* [ inttoptr (i64 2147483640 to i32*), %0 ], [ %3, %1 ]
%3 = getelementptr inbounds i32, i32* %2, i64 -1
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = bitcast i32* %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ ListPermutations(char *);
int /*<<< orphan*/ ListPermutations2(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  char str[] = "AABC";
  ListPermutations(str);
  printf("-------------------------------\n");
  ListPermutations2(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb4(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xeaf(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x15(%rbp),%rdi
call   1050 <ListPermutations@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
lea    -0x15(%rbp),%rdi
call   1040 <ListPermutations2@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x43424141,0x8(%rsp)
43
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <ListPermutations@plt>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <ListPermutations2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [5 x i8] c"AABC\00"
@.str = [33 x i8] c"-------------------------------\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [5 x i8]* %6 to i8*
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%9 = call i32 @ListPermutations(i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%12 = call i32 @ListPermutations2(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [5 x i8] c"AABC\00"
@str = [32 x i8] c"-------------------------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = call i32 @ListPermutations(i8* %4)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%7 = call i32 @ListPermutations2(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_QuaternionFromAxisAngle_init(void) {
  _hmt_register_covercase("HMM_QuaternionFromAxisAngle", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_QuaternionFromAxisAngle_init>:
lea    0xee9(%rip),%rdi
lea    0xefe(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"HMM_QuaternionFromAxisAngle\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_QuaternionFromAxisAngle_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"HMM_QuaternionFromAxisAngle\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_QuaternionFromAxisAngle_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, char, int);
void memset3_char_malloc_null() {
  char *str = (char *)malloc(10 * sizeof(char));
  memset(str + 1, '\0', 8);
  clang_analyzer_eval(str[1] == 0);
  free(str);
}


x86 assembly (clang, -O0):
<memset3_char_malloc_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset3_char_malloc_null>:
push   %rbx
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
xor    %edi,%edi
cmpb   $0x0,0x1(%rbx)
sete   %dil
call   1060 <clang_analyzer_eval@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @memset3_char_malloc_null() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 10)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = call i32 @memset(i8* %5, i8 signext 0, i32 8)
%7 = load i8*, i8** %1
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @clang_analyzer_eval(i32 %12)
%14 = load i8*, i8** %1
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
define void @memset3_char_malloc_null() {
%1 = tail call i64 @malloc(i32 10)
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 1
%4 = tail call i32 @memset(i8* %3, i8 signext 0, i32 8)
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @clang_analyzer_eval(i32 %7)
%9 = tail call i32 @free(i8* %2)
ret void
}
void midi_enable(int enable) {}


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

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

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

LLVM IR (-O2):
define void @midi_enable(i32 %0) {
ret void
}
char advance_char(char **c, int *col, int *row) {
  (*c)++;
  if (**c == '\n') {
    (*row)++;
    col = 0;
  } else
    (*col)++;
  return **c;
}


x86 assembly (clang, -O0):
<advance_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1149 <advance_char+0x49>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
movq   $0x0,-0x10(%rbp)
jmp    1154 <advance_char+0x54>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<advance_char>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
cmpb   $0xa,0x1(%rax)
cmove  %rdx,%rsi
addl   $0x1,(%rsi)
mov    0x1(%rax),%al
ret

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

LLVM IR (-O2):
define signext i8 @advance_char(i8** nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i8*, i8** %0
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %0
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
%8 = select i1 %7, i32* %2, i32* %1
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = load i8, i8* %5
ret i8 %11
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int debug = 0;
  while (x < 255) {
    if (x % 2 != 0) {
      x--;
    } else {
      x += 2;
    }
    if (debug != 0) {
      x = 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    117e <main+0x6e>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     115f <main+0x4f>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1168 <main+0x58>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1179 <main+0x69>
movl   $0x0,-0x8(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0xfe,%eax
jg     1135 <main+0x25>
nop
mov    %eax,%ecx
and    $0x1,%ecx
neg    %ecx
sbb    %ecx,%ecx
or     $0x2,%ecx
add    %ecx,%eax
cmp    $0xff,%eax
jl     1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %22, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 255
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %2
%14 = add nsw i32 %13, -1
store i32 %14, i32* %2
br label %18
15: ; preds = %8
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 2
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 0, i32* %2
br label %22
22: ; preds = %21, %18
br label %5
23: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 255
br i1 %2, label %3, label %10
3: ; preds = %0, %3
%4 = phi i32 [ %8, %3 ], [ %1, %0 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 2, i32 -1
%8 = add nsw i32 %7, %4
%9 = icmp slt i32 %8, 255
br i1 %9, label %3, label %10
10: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int uint_fast64_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_COPY_uint_fast64_t(uint_fast64_t *const dest,
                                          uint_fast64_t const src) {
  return (((*dest) = src), true);
}


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

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_COPY_uint_fast64_t>:
mov    %esi,(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_COPY_uint_fast64_t(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int x;
int main() {
  int x = x;
  printf("%d\n", x);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@x = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
char *MUSIC_ErrorString(int ErrorNumber) { return ""; }


x86 assembly (clang, -O0):
<MUSIC_ErrorString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MUSIC_ErrorString>:
lea    0xef9(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @MUSIC_ErrorString(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
const char *EDFUnpackString(const char *inp, int fieldLen) {
  static char retbuf[256];
  strncpy(retbuf, inp, fieldLen);
  retbuf[fieldLen] = '\0';
  return retbuf;
}


x86 assembly (clang, -O0):
<EDFUnpackString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0x2f13(%rip),%rdi
call   1030 <strncpy@plt>
movslq -0xc(%rbp),%rcx
lea    0x2f03(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2ef8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EDFUnpackString>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0x2f20(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movslq %ebx,%rax
movb   $0x0,(%rax,%r14,1)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EDFUnpackString.retbuf = internal global [256 x i8] zeroinitializer
define i8* @EDFUnpackString(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 = call i32 @strncpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @EDFUnpackString.retbuf, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [256 x i8], [256 x i8]* @EDFUnpackString.retbuf, i64 0, i64 %9
store i8 0, i8* %10
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @EDFUnpackString.retbuf, i64 0, i64 0)
}

LLVM IR (-O2):
@EDFUnpackString.retbuf = internal global [256 x i8] zeroinitializer
define i8* @EDFUnpackString(i8* %0, i32 %1) {
%3 = tail call i32 @strncpy(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @EDFUnpackString.retbuf, i64 0, i64 0), i8* %0, i32 %1)
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds [256 x i8], [256 x i8]* @EDFUnpackString.retbuf, i64 0, i64 %4
store i8 0, i8* %5
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @EDFUnpackString.retbuf, i64 0, i64 0)
}
int cmp_lt_uchar(const void *p, const void *q) {
  const unsigned char a = *(const unsigned char *)p;
  const unsigned char b = *(const unsigned char *)q;
  do {
    if (a > b)
      return +1;
    if (b > a)
      return -1;
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<cmp_lt_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movzbl -0x19(%rbp),%eax
movzbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jle    113a <cmp_lt_uchar+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_lt_uchar+0x5d>
movzbl -0x1a(%rbp),%eax
movzbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
jle    1156 <cmp_lt_uchar+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_lt_uchar+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_lt_uchar>:
mov    (%rdi),%al
mov    (%rsi),%cl
cmp    %cl,%al
sbb    %edx,%edx
cmp    %cl,%al
mov    $0x1,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_lt_uchar(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ugt i8 %3, %4
%6 = icmp ugt i8 %4, %3
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}