xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xcb() {
  Assert_real((isprint(203) == 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_isprint.c",
              1020, ("isprint should be 0 for 0xcb"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xcb\00"
define void @t_isprint_0xcb() {
%1 = tail call i64 @isprint(i32 203)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ds18b20_parse_resolution(int r) {
  switch (r) {
  case 9:
    return (0x1f);
  case 10:
    return (0x3f);
  case 11:
    return (0x5f);
  case 12:
    return (0x7f);
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<ds18b20_parse_resolution>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffff7,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1160 <ds18b20_parse_resolution+0x60>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1f,-0x4(%rbp)
jmp    1167 <ds18b20_parse_resolution+0x67>
movl   $0x3f,-0x4(%rbp)
jmp    1167 <ds18b20_parse_resolution+0x67>
movl   $0x5f,-0x4(%rbp)
jmp    1167 <ds18b20_parse_resolution+0x67>
movl   $0x7f,-0x4(%rbp)
jmp    1167 <ds18b20_parse_resolution+0x67>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds18b20_parse_resolution>:
add    $0xfffffff7,%edi
mov    %edi,%ecx
shl    $0x5,%ecx
or     $0x1f,%ecx
cmp    $0x4,%edi
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ds18b20_parse_resolution(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 9, label %5
i32 10, label %6
i32 11, label %7
i32 12, label %8
]
5: ; preds = %1
store i32 31, i32* %2
br label %10
6: ; preds = %1
store i32 63, i32* %2
br label %10
7: ; preds = %1
store i32 95, i32* %2
br label %10
8: ; preds = %1
store i32 127, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @ds18b20_parse_resolution(i32 %0) {
%2 = add i32 %0, -9
%3 = icmp ult i32 %2, 4
%4 = shl i32 %2, 5
%5 = or i32 %4, 31
%6 = select i1 %3, i32 %5, i32 -1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
extern void fatal(char *s1, char *s2, int n) {
  fprintf(stderr, "Error: %s, %s\n", s1, s2);
  exit(n);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"Error: %s, %s\0A\00"
define void @fatal(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i32, i32* %6
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"Error: %s, %s\0A\00"
define void @fatal(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Hello, ");
  printf("World");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Hello, \00"
@.str.1 = [6 x i8] c"World\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Hello, \00"
@.str.1 = [6 x i8] c"World\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Type definitions */
struct hash {
  int dummy;
};

/* Variables and functions */
int hash_add_bin(struct hash *, char const *, size_t, void const *);
size_t strlen(char const *);
int hash_add(struct hash *hash, const char *key, const void *value) {
  size_t keylen = strlen(key);
  return hash_add_bin(hash, key, keylen, value);
}


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

x86 assembly (clang, -O2):
<hash_add>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <hash_add_bin@plt>

LLVM IR (-O0):
%struct.hash = type { i32 }
define i32 @hash_add(%struct.hash* %0, i8* %1, i8* %2) {
%4 = alloca %struct.hash*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
store %struct.hash* %0, %struct.hash** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %7
%10 = load %struct.hash*, %struct.hash** %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %7
%13 = load i8*, i8** %6
%14 = call i32 @hash_add_bin(%struct.hash* %10, i8* %11, i64 %12, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.hash = type { i32 }
define i32 @hash_add(%struct.hash* %0, i8* %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = tail call i32 @hash_add_bin(%struct.hash* %0, i8* %1, i64 %4, i8* %2)
ret i32 %5
}
void port1_ISR(void) {}


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

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

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

LLVM IR (-O2):
define void @port1_ISR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void show_tes() { fprintf(stdout, "This is test print\n"); }


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

x86 assembly (clang, -O2):
<show_tes>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [20 x i8] c"This is test print\0A\00"
define void @show_tes() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"This is test print\0A\00"
define void @show_tes() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ access(int *, int, int);
void foo(int *buf, int n, int i) { access(buf, n, i); }


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

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <access@plt>

LLVM IR (-O0):
define void @foo(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 @access(i32* %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @access(i32* %0, i32 %1, i32 %2)
ret void
}
char *strecpy(char *to, char *e, char *from) {
  if (to >= e)
    return to;
  to = memccpy(to, from, '\0', e - to);
  if (to == ((void *)0)) {
    to = e - 1;
    *to = '\0';
  }
  return to;
}


x86 assembly (clang, -O0):
<strecpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     113f <strecpy+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1183 <strecpy+0x73>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
sub    %rax,%rcx
xor    %edx,%edx
call   1030 <memccpy@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <strecpy+0x6b>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strecpy>:
push   %rbx
mov    %rdi,%rax
cmp    %rsi,%rdi
jae    1134 <strecpy+0x24>
mov    %rsi,%rbx
mov    %rsi,%rcx
sub    %rax,%rcx
mov    %rax,%rdi
mov    %rdx,%rsi
xor    %edx,%edx
call   1030 <memccpy@plt>
test   %rax,%rax
je     1136 <strecpy+0x26>
pop    %rbx
ret
movb   $0x0,-0x1(%rbx)
add    $0xffffffffffffffff,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strecpy(i8* %0, i8* %1, i8* nocapture %2) {
%4 = icmp ult i8* %0, %1
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = ptrtoint i8* %1 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
%9 = tail call i8* @memccpy(i8* %0, i8* %2, i32 0, i64 %8)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %1, i64 -1
store i8 0, i8* %12
br label %13
13: ; preds = %5, %11, %3
%14 = phi i8* [ %0, %3 ], [ %12, %11 ], [ %9, %5 ]
ret i8* %14
}
/* Variables and functions */
long __VERIFIER_nondet_long();
int /*<<< orphan*/ assert_context_process();
long schedule_timeout(long timeout) {
  long tmp;
  {
    {
      assert_context_process();
      tmp = __VERIFIER_nondet_long();
    }
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<schedule_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <assert_context_process@plt>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_long@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<schedule_timeout>:
push   %rax
xor    %eax,%eax
call   1040 <assert_context_process@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__VERIFIER_nondet_long@plt>

LLVM IR (-O0):
define i64 @schedule_timeout(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i32 (...) @assert_context_process()
%5 = call i64 (...) @__VERIFIER_nondet_long()
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @schedule_timeout(i64 %0) {
%2 = tail call i32 (...) @assert_context_process()
%3 = tail call i64 (...) @__VERIFIER_nondet_long()
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ cgclear();
int /*<<< orphan*/ gen(char *);
void cgindb(void) {
  gen("mov\tbx,ax");
  cgclear();
  gen("mov\tal,[bx]");
}


x86 assembly (clang, -O0):
<cgindb>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <gen@plt>
mov    $0x0,%al
call   1040 <cgclear@plt>
lea    0xecc(%rip),%rdi
call   1030 <gen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgindb>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <gen@plt>
xor    %eax,%eax
call   1040 <cgclear@plt>
lea    0xecf(%rip),%rdi
pop    %rax
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"mov\09bx,ax\00"
@.str.1 = [12 x i8] c"mov\09al,[bx]\00"
define void @cgindb() {
%1 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @cgclear()
%3 = call i32 @gen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"mov\09bx,ax\00"
@.str.1 = [12 x i8] c"mov\09al,[bx]\00"
define void @cgindb() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @cgclear()
%3 = tail call i32 @gen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void *test_anti_range_66(unsigned n) {
  extern void *alloc_anti_range_66(unsigned) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_66(n);
}


x86 assembly (clang, -O0):
<test_anti_range_66>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
ja     1137 <test_anti_range_66+0x27>
cmpl   $0x0,-0x4(%rbp)
ja     1137 <test_anti_range_66+0x27>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <alloc_anti_range_66@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_66>:
cmp    $0x1,%edi
sbb    %eax,%eax
or     %eax,%edi
jmp    1030 <alloc_anti_range_66@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_66(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 -1, i32 %0
%4 = tail call i8* @alloc_anti_range_66(i32 %3)
ret i8* %4
}
int is_style_delim(int c) {
  switch (c) {
  case '(':
  case ')':
  case ',':
  case '\0':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_style_delim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     113f <is_style_delim+0x3f>
jmp    111a <is_style_delim+0x1a>
mov    -0xc(%rbp),%eax
add    $0xffffffd8,%eax
sub    $0x2,%eax
jb     113f <is_style_delim+0x3f>
jmp    112e <is_style_delim+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x2c,%eax
jne    114b <is_style_delim+0x4b>
jmp    113f <is_style_delim+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1152 <is_style_delim+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_style_delim>:
cmp    $0x2c,%edi
ja     111d <is_style_delim+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x130000000001,%rdx
bt     %rcx,%rdx
jae    111d <is_style_delim+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_style_delim(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 40, label %5
i32 41, label %5
i32 44, label %5
i32 0, label %5
]
5: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_style_delim(i32 %0) {
switch i32 %0, label %2 [
i32 40, label %3
i32 41, label %3
i32 44, label %3
i32 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int heap_left(int i) { return (i << 1); }


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

x86 assembly (clang, -O2):
<heap_left>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @heap_left(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ cm_accent_generic(int, int, int, char *, char, int, char *);
void cm_accent_cedilla(int arg, int start, int end) {
  cm_accent_generic(arg, start, end, "Cc", ',', 1, "cedil");
}


x86 assembly (clang, -O0):
<cm_accent_cedilla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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
lea    0xecf(%rip),%rcx
mov    $0x2c,%r8d
mov    $0x1,%r9d
lea    0xebf(%rip),%rax
mov    %rax,(%rsp)
call   1030 <cm_accent_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cm_accent_cedilla>:
push   %rax
lea    0xeeb(%rip),%rax
mov    %rax,(%rsp)
lea    0xedd(%rip),%rcx
mov    $0x2c,%r8d
mov    $0x1,%r9d
call   1030 <cm_accent_generic@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"Cc\00"
@.str.1 = [6 x i8] c"cedil\00"
define void @cm_accent_cedilla(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 @cm_accent_generic(i32 %7, i32 %8, i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 44, i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"Cc\00"
@.str.1 = [6 x i8] c"cedil\00"
define void @cm_accent_cedilla(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @cm_accent_generic(i32 %0, i32 %1, i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 44, i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int banko_lookup_mask(int32_t mask, int row, int column) {
  return (mask >> ((3 - 1 - row) * 9 + (9 - 1 - column))) & 1;
}


x86 assembly (clang, -O0):
<banko_lookup_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
sub    -0x8(%rbp),%ecx
imul   $0x9,%ecx,%ecx
mov    $0x8,%edx
sub    -0xc(%rbp),%edx
add    %edx,%ecx
sar    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<banko_lookup_mask>:
mov    %edi,%eax
mov    $0x2,%ecx
sub    %esi,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %edx,%ecx
add    $0x8,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @banko_lookup_mask(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 = sub nsw i32 2, %8
%10 = mul nsw i32 %9, 9
%11 = load i32, i32* %6
%12 = sub nsw i32 8, %11
%13 = add nsw i32 %10, %12
%14 = ashr i32 %7, %13
%15 = and i32 %14, 1
ret i32 %15
}

LLVM IR (-O2):
define i32 @banko_lookup_mask(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 2, %1
%5 = mul nsw i32 %4, 9
%6 = sub i32 8, %2
%7 = add nsw i32 %6, %5
%8 = lshr i32 %0, %7
%9 = and i32 %8, 1
ret i32 %9
}
int do_340() { return 340; }


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

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

LLVM IR (-O0):
define i32 @do_340() {
ret i32 340
}

LLVM IR (-O2):
define i32 @do_340() {
ret i32 340
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_STORE_CTX;

/* Variables and functions */
int dv_openssl_callback(int ok, X509_STORE_CTX *ctx) { return 1; }


x86 assembly (clang, -O0):
<dv_openssl_callback>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @dv_openssl_callback(i32 %0, i32* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
size_t strlen(char const *);
size_t _sd2txt_len(const char *key, char *val) {
  size_t ret = strlen(key);
  if (!*val)
    return ret;
  ret += strlen(val);
  ret++;
  return ret;
}


x86 assembly (clang, -O0):
<_sd2txt_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1147 <_sd2txt_len+0x37>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <_sd2txt_len+0x5c>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sd2txt_len>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
cmpb   $0x0,(%r14)
je     1134 <_sd2txt_len+0x24>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @_sd2txt_len(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @strlen(i8* %1)
%8 = add i64 %3, 1
%9 = add i64 %8, %7
br label %10
10: ; preds = %2, %6
%11 = phi i64 [ %9, %6 ], [ %3, %2 ]
ret i64 %11
}
/* Type definitions */
struct mcon_str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mcon_str_addl(struct mcon_str *, char *, int,
                                 int /*<<< orphan*/);
void mcon_serialize_int(struct mcon_str *str, int num) {
  int i = (num);
  mcon_str_addl(str, (char *)&i, 4, 0);
}


x86 assembly (clang, -O0):
<mcon_serialize_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <mcon_str_addl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcon_serialize_int>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <mcon_str_addl@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.mcon_str = type { i32 }
define void @mcon_serialize_int(%struct.mcon_str* %0, i32 %1) {
%3 = alloca %struct.mcon_str*
%4 = alloca i32
%5 = alloca i32
store %struct.mcon_str* %0, %struct.mcon_str** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load %struct.mcon_str*, %struct.mcon_str** %3
%8 = bitcast i32* %5 to i8*
%9 = call i32 @mcon_str_addl(%struct.mcon_str* %7, i8* %8, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
%struct.mcon_str = type { i32 }
define void @mcon_serialize_int(%struct.mcon_str* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %1, i32* %3
%5 = call i32 @mcon_str_addl(%struct.mcon_str* %0, i8* %4, i32 4, i32 0)
ret void
}
int d_register(char *ip_y_puerto, char *ip_y_puerto_a_registrar,
               char **direcciones_obtenidas) {
  return 0;
}


x86 assembly (clang, -O0):
<d_register>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @d_register(i8* nocapture readnone %0, i8* nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 0
}
void amd_iommu_detect(void) {}


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

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

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

LLVM IR (-O2):
define void @amd_iommu_detect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Help(void) {
  printf("Usage: <programname> --rcon=\"<ip> <port> <rconpw> <cmd>\"\n"
         "Example: --rcon=\"127.0.0.1 27960 myrconpw devmap oasis\"\n");
}


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

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

LLVM IR (-O0):
@.str = [114 x i8] c"Usage: <programname> --rcon=\22<ip> <port> <rconpw> <cmd>\22\0AExample: --rcon=\22127.0.0.1 27960 myrconpw devmap oasis\22\0A\00"
define void @Help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [113 x i8] c"Usage: <programname> --rcon=\22<ip> <port> <rconpw> <cmd>\22\0AExample: --rcon=\22127.0.0.1 27960 myrconpw devmap oasis\22\00"
define void @Help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([113 x i8], [113 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned char _sbus_readb(unsigned long addr) {
  return *(volatile unsigned char *)addr;
}


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

x86 assembly (clang, -O2):
<_sbus_readb>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @_sbus_readb(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
%5 = load volatile i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @_sbus_readb(i64 %0) {
%2 = inttoptr i64 %0 to i8*
%3 = load volatile i8, i8* %2
ret i8 %3
}
/* Variables and functions */
scalar_t__ nrf_drv_usbd_errata_type_52840_eng_b();
bool nrf_drv_usbd_errata_187(void) {
  return (1 && nrf_drv_usbd_errata_type_52840_eng_b());
}


x86 assembly (clang, -O0):
<nrf_drv_usbd_errata_187>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_drv_usbd_errata_type_52840_eng_b@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nrf_drv_usbd_errata_187() {
%1 = call i64 (...) @nrf_drv_usbd_errata_type_52840_eng_b()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_187() {
%1 = tail call i64 (...) @nrf_drv_usbd_errata_type_52840_eng_b()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int UART_read();
long millis();
int UART_read_timeout(long timeout_ms) {
  int c;
  long t0;
  t0 = millis();
  while (millis() - t0 < timeout_ms) {
    c = UART_read();
    if (c >= 0) {
      return c;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<UART_read_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <millis@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <millis@plt>
sub    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1170 <UART_read_timeout+0x50>
mov    $0x0,%al
call   1030 <UART_read@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     116b <UART_read_timeout+0x4b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <UART_read_timeout+0x57>
jmp    1137 <UART_read_timeout+0x17>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_read_timeout>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <millis@plt>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <millis@plt>
sub    %rbx,%rax
cmp    %r14,%rax
jge    115c <UART_read_timeout+0x3c>
xor    %eax,%eax
call   1030 <UART_read@plt>
test   %eax,%eax
js     1140 <UART_read_timeout+0x20>
jmp    1161 <UART_read_timeout+0x41>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @UART_read_timeout(i64 %0) {
%2 = tail call i64 (...) @millis()
br label %3
3: ; preds = %7, %1
%4 = tail call i64 (...) @millis()
%5 = sub nsw i64 %4, %2
%6 = icmp slt i64 %5, %0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 (...) @UART_read()
%9 = icmp sgt i32 %8, -1
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi i32 [ %8, %7 ], [ -1, %3 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ returnMean(double *, int);
int main(int argc, const char *argv[]) {
  double array[] = {1, 4, 6, 3, 5, 2, 0, 5, 7, 9};
  printf("Mean is: %lf\n", returnMean(array, sizeof(array) / sizeof(array[0])));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x50,%edx
call   1050 <memcpy@plt>
lea    -0x60(%rbp),%rdi
mov    $0xa,%esi
call   1040 <returnMean@plt>
mov    %eax,%esi
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <returnMean@plt>
lea    0xedd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [10 x double] [double 1.000000e+00, double 4.000000e+00, double 6.000000e+00, double 3.000000e+00, double 5.000000e+00, double 2.000000e+00, double 0.000000e+00, double 5.000000e+00, double 7.000000e+00, double 9.000000e+00]
@.str = [14 x i8] c"Mean is: %lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x double]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [10 x double]* %6 to i8*
%8 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 0
%9 = call i32 @returnMean(double* %8, i32 10)
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [10 x double] [double 1.000000e+00, double 4.000000e+00, double 6.000000e+00, double 3.000000e+00, double 5.000000e+00, double 2.000000e+00, double 0.000000e+00, double 5.000000e+00, double 7.000000e+00, double 9.000000e+00]
@.str = [14 x i8] c"Mean is: %lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x double]
%4 = bitcast [10 x double]* %3 to i8*
%5 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 0
%6 = call i32 @returnMean(double* %5, i32 10)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bluetooth_connection_service_unsudirribe();
void btModule_deinit() { bluetooth_connection_service_unsudirribe(); }


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

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

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

LLVM IR (-O2):
define void @btModule_deinit() {
%1 = tail call i32 (...) @bluetooth_connection_service_unsudirribe()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nRF24L01P_setRegister(int, int /*<<< orphan*/);
void nRF24L01P_disableAllRxPipes(void) { nRF24L01P_setRegister(0x02, 0); }


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

x86 assembly (clang, -O2):
<nRF24L01P_disableAllRxPipes>:
mov    $0x2,%edi
xor    %esi,%esi
jmp    1030 <nRF24L01P_setRegister@plt>

LLVM IR (-O0):
define void @nRF24L01P_disableAllRxPipes() {
%1 = call i32 @nRF24L01P_setRegister(i32 2, i32 0)
ret void
}

LLVM IR (-O2):
define void @nRF24L01P_disableAllRxPipes() {
%1 = tail call i32 @nRF24L01P_setRegister(i32 2, i32 0)
ret void
}
int bit_count2(int num) {
  int result = 0;
  while (num != 0) {
    num = num & (num - 1);
    result++;
  }
  return result;
}


x86 assembly (clang, -O0):
<bit_count2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <bit_count2+0x34>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bit_count2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_count2>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bit_count2+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bit_count2+0x10>
ret

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

LLVM IR (-O2):
define i32 @bit_count2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = and i32 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
void gtk_notebook_insert_page_menu() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_insert_page_menu() {
ret void
}
unsigned AVM2_uint32toU30(unsigned val, char *out) {
  unsigned len = 0;
  while (val) {
    out[len++] = (val & ~0x7f ? 0x80 : 0) | (val & 0x7F);
    val >>= 7;
  }
  return len;
}


x86 assembly (clang, -O0):
<AVM2_uint32toU30>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115b <AVM2_uint32toU30+0x5b>
mov    -0x4(%rbp),%edx
and    $0xffffff80,%edx
xor    %eax,%eax
mov    $0x80,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x7f,%ecx
or     %ecx,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
mov    %ecx,%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
shr    $0x7,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <AVM2_uint32toU30+0x12>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AVM2_uint32toU30>:
xor    %eax,%eax
test   %edi,%edi
je     1135 <AVM2_uint32toU30+0x35>
mov    %edi,%r8d
nopl   0x0(%rax)
xor    %edx,%edx
cmp    $0x7f,%edi
seta   %dl
shl    $0x7,%edx
mov    %edi,%ecx
and    $0x7f,%ecx
or     %edx,%ecx
mov    %cl,(%rsi,%rax,1)
add    $0x1,%rax
shr    $0x7,%r8d
cmp    $0x7f,%edi
mov    %r8d,%edi
ja     1110 <AVM2_uint32toU30+0x10>
ret

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

LLVM IR (-O2):
define i32 @AVM2_uint32toU30(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %17, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %12, %4 ], [ 0, %2 ]
%6 = phi i32 [ %14, %4 ], [ %0, %2 ]
%7 = icmp ult i32 %6, 128
%8 = select i1 %7, i32 0, i32 128
%9 = and i32 %6, 127
%10 = or i32 %8, %9
%11 = trunc i32 %10 to i8
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 %11, i8* %13
%14 = lshr i32 %6, 7
br i1 %7, label %15, label %4
15: ; preds = %4
%16 = trunc i64 %12 to i32
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 0, %2 ], [ %16, %15 ]
ret i32 %18
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_laursys_witset(int dim) {
  int *b;
  double *c;
  int fail = _ada_use_c2phc4c(854, &dim, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_laursys_witset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x356,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_laursys_witset>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x356,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @copy_dobldobl_laursys_witset(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 854, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_laursys_witset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 854, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void fa139(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    a:
      goto a;
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa139>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa139+0x4>

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

LLVM IR (-O0):
define void @fa139() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
br label %24
24: ; preds = %24, %23
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa139() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
char *strcat(char *, char *);
char *strcpy(char *, char *);
char *strstr(char *, char *);
void cutByCutterAndCreateNewString(char *start, char *end, char *newStr,
                                   char *cutter) {
  char *occ = NULL;
  newStr = strcpy(newStr, start);
  if (occ = strstr(newStr, cutter)) {
    *occ = '\0';
  }
  newStr = strcat(newStr, end);
}


x86 assembly (clang, -O0):
<cutByCutterAndCreateNewString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1183 <cutByCutterAndCreateNewString+0x53>
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    %rax,-0x18(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutByCutterAndCreateNewString>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%rsi
mov    %rdx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strstr@plt>
test   %rax,%rax
je     115c <cutByCutterAndCreateNewString+0x2c>
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcat@plt>

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

LLVM IR (-O2):
define void @cutByCutterAndCreateNewString(i8* nocapture %0, i8* nocapture %1, i8* %2, i8* nocapture %3) {
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %2, i8* dereferenceable(1) %0)
%6 = tail call i8* @strstr(i8* dereferenceable(1) %2, i8* dereferenceable(1) %3)
%7 = icmp eq i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %4
store i8 0, i8* %6
br label %9
9: ; preds = %8, %4
%10 = tail call i8* @strcat(i8* dereferenceable(1) %2, i8* dereferenceable(1) %1)
ret void
}