xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x35() {
  Assert_real((ispunct(53) == 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_ispunct.c",
              270, ("ispunct should be 0 for 5"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x35>:
push   %rax
mov    $0x35,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x10e,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 5\00"
define void @t_ispunct_0x35() {
%1 = call i64 @ispunct(i32 53)
%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 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for 5\00"
define void @t_ispunct_0x35() {
%1 = tail call i64 @ispunct(i32 53)
%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 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int REG_SPI_BASE(unsigned int);
__attribute__((always_)) __attribute__((flatten)) unsigned int
SPI_RD_STATUS(unsigned int i) {
  return (REG_SPI_BASE(i) + 0x10);
}


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

x86 assembly (clang, -O2):
<SPI_RD_STATUS>:
push   %rax
call   1030 <REG_SPI_BASE@plt>
add    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SPI_RD_STATUS(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @REG_SPI_BASE(i32 %3)
%5 = add i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @SPI_RD_STATUS(i32 %0) {
%2 = tail call i32 @REG_SPI_BASE(i32 %0)
%3 = add i32 %2, 16
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *xmalloc(size_t);
char *xstrdup(const char *str) {
  size_t size;
  char *s;
  size = strlen(str);
  s = xmalloc(size + 1);
  if (s)
    memcpy(s, str, size + 1);
  return s;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117a <xstrdup+0x4a>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1040 <xmalloc@plt>
mov    %rax,%r15
test   %rax,%rax
je     1162 <xstrdup+0x32>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %3)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Course: EG1302A-SPRING 2014\n"
         "Name: Ricardo A. Borunda\n"
         "Date Created: 1/28/2014\n"
         "Assignment: Assignment05\n");
  printf("Hello world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xf35(%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 <puts@plt>
lea    0xf42(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [103 x i8] c"Course: EG1302A-SPRING 2014\0AName: Ricardo A. Borunda\0ADate Created: 1/28/2014\0AAssignment: Assignment05\0A\00"
@.str.1 = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [102 x i8] c"Course: EG1302A-SPRING 2014\0AName: Ricardo A. Borunda\0ADate Created: 1/28/2014\0AAssignment: Assignment05\00"
@str.2 = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ not_implemented_error();
void primitive_unimplemented(void) { not_implemented_error(); }


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

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

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

LLVM IR (-O2):
define void @primitive_unimplemented() {
%1 = tail call i32 (...) @not_implemented_error()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ xdriver_end();
void end_screen() {
  printf("In end_screen\n");
  xdriver_end();
}


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

x86 assembly (clang, -O2):
<end_screen>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <xdriver_end@plt>

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

LLVM IR (-O2):
@str = [14 x i8] c"In end_screen\00"
define void @end_screen() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @xdriver_end()
ret void
}
unsigned rev(unsigned x, unsigned b) {
  if (b < 2)
    return x;
  b <<= 1;
  unsigned m = (1u << b) - 1u;
  return rev(x >> b & m, b) | rev(x & m, b);
}


x86 assembly (clang, -O0):
<rev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jae    1133 <rev+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <rev+0x6a>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%ecx
shr    %cl,%edi
and    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <rev@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
and    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <rev@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
xor    %r14d,%r14d
cmp    $0x2,%esi
jb     1155 <rev+0x45>
mov    %esi,%ebp
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
add    %ebp,%ebp
mov    $0xffffffff,%ebx
mov    %ebp,%ecx
shl    %cl,%ebx
not    %ebx
mov    %r15d,%edi
shr    %cl,%edi
and    %ebx,%edi
mov    %ebp,%esi
call   1030 <rev@plt>
and    %ebx,%r15d
or     %eax,%r14d
test   %ebp,%ebp
jne    1130 <rev+0x20>
or     %r15d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @rev(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, 2
br i1 %3, label %17, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %14, %4 ], [ %0, %2 ]
%7 = phi i32 [ %15, %4 ], [ 0, %2 ]
%8 = shl i32 %5, 1
%9 = shl nsw i32 -1, %8
%10 = xor i32 %9, -1
%11 = lshr i32 %6, %8
%12 = and i32 %11, %10
%13 = tail call i32 @rev(i32 %12, i32 %8)
%14 = and i32 %6, %10
%15 = or i32 %13, %7
%16 = icmp eq i32 %8, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %2
%18 = phi i32 [ 0, %2 ], [ %15, %4 ]
%19 = phi i32 [ %0, %2 ], [ %14, %4 ]
%20 = or i32 %19, %18
ret i32 %20
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned long);
char *integerToString(unsigned long int value) {
  char *buf = (char *)calloc(1, 40);
  sprintf(buf, "%lu", value);
  return buf;
}


x86 assembly (clang, -O0):
<integerToString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x28,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb2(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integerToString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1,%edi
mov    $0x28,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
define i8* @integerToString(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = call i64 @calloc(i32 1, i32 40)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define i8* @integerToString(i64 %0) {
%2 = tail call i64 @calloc(i32 1, i32 40)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int);
void cgdeclb(int a) { ngen("%s\t%d(%%ebp)", "decb", a); }


x86 assembly (clang, -O0):
<cgdeclb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <ngen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdeclb>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeed(%rip),%rsi
jmp    1030 <ngen@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s\09%d(%%ebp)\00"
@.str.1 = [5 x i8] c"decb\00"
define void @cgdeclb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ngen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s\09%d(%%ebp)\00"
@.str.1 = [5 x i8] c"decb\00"
define void @cgdeclb(i32 %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int u8islatini(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointcc(char const *);
int u8islatincc(const char *c) { return u8islatini(u8tointcc(c)); }


x86 assembly (clang, -O0):
<u8islatincc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointcc@plt>
mov    %eax,%edi
call   1040 <u8islatini@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8islatincc>:
push   %rax
call   1030 <u8tointcc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8islatini@plt>

LLVM IR (-O0):
define i32 @u8islatincc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointcc(i8* %3)
%5 = call i32 @u8islatini(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8islatincc(i8* %0) {
%2 = tail call i32 @u8tointcc(i8* %0)
%3 = tail call i32 @u8islatini(i32 %2)
ret i32 %3
}
char converte(char c, int shift) {
  char offset = c - 'a';
  offset += shift;
  if (offset < 0) {
    offset += 26;
  } else if (offset >= 26) {
    offset -= 26;
  }
  return offset + 'a';
}


x86 assembly (clang, -O0):
<converte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%ecx
movsbl -0x9(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jge    113f <converte+0x3f>
movsbl -0x9(%rbp),%eax
add    $0x1a,%eax
mov    %al,-0x9(%rbp)
jmp    115b <converte+0x5b>
movsbl -0x9(%rbp),%eax
cmp    $0x1a,%eax
jl     1156 <converte+0x56>
movsbl -0x9(%rbp),%eax
sub    $0x1a,%eax
mov    %al,-0x9(%rbp)
jmp    115b <converte+0x5b>
movsbl -0x9(%rbp),%eax
add    $0x61,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<converte>:
add    %dil,%sil
lea    -0x61(%rsi),%eax
lea    -0x47(%rsi),%ecx
add    $0x85,%sil
cmp    $0x1a,%al
movzbl %sil,%edx
movzbl %al,%eax
cmovl  %eax,%edx
test   %al,%al
movzbl %cl,%eax
cmovns %edx,%eax
add    $0x61,%al
ret

LLVM IR (-O0):
define signext i8 @converte(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i8
store i8 %0, i8* %3
store i32 %1, i32* %4
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 97
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i32, i32* %4
%11 = load i8, i8* %5
%12 = sext i8 %11 to i32
%13 = add nsw i32 %12, %10
%14 = trunc i32 %13 to i8
store i8 %14, i8* %5
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = add nsw i32 %20, 26
%22 = trunc i32 %21 to i8
store i8 %22, i8* %5
br label %33
23: ; preds = %2
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = icmp sge i32 %25, 26
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i8, i8* %5
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %29, 26
%31 = trunc i32 %30 to i8
store i8 %31, i8* %5
br label %32
32: ; preds = %27, %23
br label %33
33: ; preds = %32, %18
%34 = load i8, i8* %5
%35 = sext i8 %34 to i32
%36 = add nsw i32 %35, 97
%37 = trunc i32 %36 to i8
ret i8 %37
}

LLVM IR (-O2):
define signext i8 @converte(i8 signext %0, i32 %1) {
%3 = add i8 %0, -97
%4 = trunc i32 %1 to i8
%5 = add i8 %3, %4
%6 = icmp slt i8 %5, 0
%7 = add i8 %5, 26
%8 = icmp sgt i8 %5, 25
%9 = add i8 %5, -26
%10 = select i1 %8, i8 %9, i8 %5
%11 = select i1 %6, i8 %7, i8 %10
%12 = add i8 %11, 97
ret i8 %12
}
void fd126(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
p0B:
  goto p0B;
  goto a;
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd126>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd126+0x7>

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

LLVM IR (-O0):
define void @fd126(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd126(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __le16_to_cpu(int /*<<< orphan*/ const);
uint16_t get16_le(const uint16_t *p) { return __le16_to_cpu(*p); }


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

x86 assembly (clang, -O2):
<get16_le>:
mov    (%rdi),%edi
jmp    1030 <__le16_to_cpu@plt>

LLVM IR (-O0):
define i32 @get16_le(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @__le16_to_cpu(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @get16_le(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__le16_to_cpu(i32 %2)
ret i32 %3
}
float quarticEaseInf(float p) { return p * p * p * p; }


x86 assembly (clang, -O0):
<quarticEaseInf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quarticEaseInf>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quarticEaseInf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
define float @quarticEaseInf(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
%4 = fmul float %3, %0
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Msp430CounterC__0__Counter__overflow();
void Msp430CounterC__0__Msp430Timer__overflow(void) {
  Msp430CounterC__0__Counter__overflow();
}


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

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

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

LLVM IR (-O2):
define void @Msp430CounterC__0__Msp430Timer__overflow() {
%1 = tail call i32 (...) @Msp430CounterC__0__Counter__overflow()
ret void
}
int f_lt_rm1(float a1, float *a2) { return (((a1) < (*a2))); }


x86 assembly (clang, -O0):
<f_lt_rm1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_lt_rm1>:
movss  (%rdi),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @f_lt_rm1(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = fcmp olt float %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_lt_rm1(float %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp ogt float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_pl(void) { printf("Witaj w swiecie bibliotek!\n"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Witaj w swiecie bibliotek!\0A\00"
define void @hello_pl() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"Witaj w swiecie bibliotek!\00"
define void @hello_pl() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ mg_mqtt_prepend_header(struct mg_connection *,
                                          int /*<<< orphan*/, int, int);
int /*<<< orphan*/ mg_send(struct mg_connection *, int /*<<< orphan*/ *, int);
void mg_send_mqtt_short_command(struct mg_connection *nc, uint8_t cmd,
                                uint16_t message_id) {
  uint16_t message_id_net = htons(message_id);
  mg_send(nc, &message_id_net, 2);
  mg_mqtt_prepend_header(nc, cmd, ((1) << 1), 2);
}


x86 assembly (clang, -O0):
<mg_send_mqtt_short_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x2,%edx
call   1040 <mg_send@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x2,%ecx
mov    %ecx,%edx
call   1050 <mg_mqtt_prepend_header@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_send_mqtt_short_command>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %edx,%edi
call   1030 <htons@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <mg_send@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
call   1050 <mg_mqtt_prepend_header@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @mg_send_mqtt_short_command(%struct.mg_connection* %0, i32 %1, i32 %2) {
%4 = alloca %struct.mg_connection*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.mg_connection* %0, %struct.mg_connection** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @htons(i32 %8)
store i32 %9, i32* %7
%10 = load %struct.mg_connection*, %struct.mg_connection** %4
%11 = call i32 @mg_send(%struct.mg_connection* %10, i32* %7, i32 2)
%12 = load %struct.mg_connection*, %struct.mg_connection** %4
%13 = load i32, i32* %5
%14 = call i32 @mg_mqtt_prepend_header(%struct.mg_connection* %12, i32 %13, i32 2, i32 2)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @mg_send_mqtt_short_command(%struct.mg_connection* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 @htons(i32 %2)
store i32 %6, i32* %4
%7 = call i32 @mg_send(%struct.mg_connection* %0, i32* %4, i32 2)
%8 = call i32 @mg_mqtt_prepend_header(%struct.mg_connection* %0, i32 %1, i32 2, i32 2)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
size_t aeron_logbuffer_index_by_term_count(int64_t term_count) {
  return (size_t)(term_count % (3));
}


x86 assembly (clang, -O0):
<aeron_logbuffer_index_by_term_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_logbuffer_index_by_term_count>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @aeron_logbuffer_index_by_term_count(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 3
%5 = sext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @aeron_logbuffer_index_by_term_count(i32 %0) {
%2 = srem i32 %0, 3
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ cgbr(char *, int);
void cgbrfalse(int n) { cgbr("jnz", n); }


x86 assembly (clang, -O0):
<cgbrfalse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <cgbr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgbrfalse>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <cgbr@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"jnz\00"
define void @cgbrfalse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cgbr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"jnz\00"
define void @cgbrfalse(i32 %0) {
%2 = tail call i32 @cgbr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void log_msg(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_msg(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
scalar_t__ malloc(size_t);
int *ivector(long nl, long nh) {
  int *v = (int *)malloc((size_t)((nh - nl + 2) * sizeof(int)));
  if (v == NULL)
    error("allocation failure in ivector()");
  return (v - nl + 1);
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x2,%rdi
shl    $0x2,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1160 <ivector+0x40>
lea    0xea5(%rip),%rdi
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x4,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x8(,%rsi,4),%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <ivector+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <error@plt>
shl    $0x2,%r14
sub    %r14,%rbx
add    $0x4,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 2
%10 = mul i64 %9, 4
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %5
%13 = load i32*, i32** %5
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load i32*, i32** %5
%19 = load i64, i64* %3
%20 = sub i64 0, %19
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = getelementptr inbounds i32, i32* %21, i64 1
ret i32* %22
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 2
%5 = add i64 %4, 8
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i32*
%12 = sub i64 0, %0
%13 = getelementptr inbounds i32, i32* %11, i64 %12
%14 = getelementptr inbounds i32, i32* %13, i64 1
ret i32* %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void dbgint(int msg) {
  printf("%d", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<dbgint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<dbgint>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @dbgint(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void fa132(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    p02B:
      goto p02B;
      goto a;
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


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

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

LLVM IR (-O0):
define void @fa132() {
%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: ; No predecessors!
br label %17
17: ; preds = %17, %16
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; preds = %20
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa132() {
br label %1
1: ; preds = %1, %0
br label %1
}
int compute(int num) {
  int i, j, flag = 0;
  for (i = 2; i < num / 2; i++) {
    if (num % i == 0) {
      flag = -1;
      break;
    }
  }
  return flag;
}


x86 assembly (clang, -O0):
<compute>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    1162 <compute+0x62>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    114f <compute+0x4f>
movl   $0xffffffff,-0x10(%rbp)
jmp    1162 <compute+0x62>
jmp    1154 <compute+0x54>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <compute+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute>:
xor    %r8d,%r8d
cmp    $0x6,%edi
jl     1130 <compute+0x30>
mov    %edi,%esi
shr    %esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1134 <compute+0x34>
add    $0x1,%ecx
cmp    %ecx,%esi
jne    1120 <compute+0x20>
mov    %r8d,%eax
ret
mov    $0xffffffff,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @compute(i32 %0) {
%2 = icmp sgt i32 %0, 5
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = lshr i32 %0, 1
br label %7
5: ; preds = %7
%6 = icmp eq i32 %11, %4
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %5, %7, %1
%13 = phi i32 [ 0, %1 ], [ -1, %7 ], [ 0, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *name) {
  printf("usage: %s (OPTIONAL: --sleep-time=[INTEGER] --position=[STRING] "
         "--turns=[INTEGER] --help)\n\t--sleep-time: number of seconds to wait "
         "between each iteration\n\t--position: starting position. Available "
         "options are: toad, blinker, beacon, r-pentomino, pulsar [default = "
         "r-pentomino]\n\t--turns: number of iterations to do [default = "
         "100]\n\t--help: display this usage message\n",
         name);
}


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

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

LLVM IR (-O0):
@.str = [366 x i8] c"usage: %s (OPTIONAL: --sleep-time=[INTEGER] --position=[STRING] --turns=[INTEGER] --help)\0A\09--sleep-time: number of seconds to wait between each iteration\0A\09--position: starting position. Available options are: toad, blinker, beacon, r-pentomino, pulsar [default = r-pentomino]\0A\09--turns: number of iterations to do [default = 100]\0A\09--help: display this usage message\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([366 x i8], [366 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [366 x i8] c"usage: %s (OPTIONAL: --sleep-time=[INTEGER] --position=[STRING] --turns=[INTEGER] --help)\0A\09--sleep-time: number of seconds to wait between each iteration\0A\09--position: starting position. Available options are: toad, blinker, beacon, r-pentomino, pulsar [default = r-pentomino]\0A\09--turns: number of iterations to do [default = 100]\0A\09--help: display this usage message\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([366 x i8], [366 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOCK_EX;
int flock(int, int /*<<< orphan*/);
int lock_ex(int fd) { return flock(fd, LOCK_EX); }


x86 assembly (clang, -O0):
<lock_ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <flock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_ex>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <flock@plt>

LLVM IR (-O0):
@LOCK_EX = global i32 0
define i32 @lock_ex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @LOCK_EX
%5 = call i32 @flock(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@LOCK_EX = global i32 0
define i32 @lock_ex(i32 %0) {
%2 = load i32, i32* @LOCK_EX
%3 = tail call i32 @flock(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int sys_pipe2(int *, int /*<<< orphan*/);
int sys_pipe(int *pipefd) { return sys_pipe2(pipefd, 0); }


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

x86 assembly (clang, -O2):
<sys_pipe>:
xor    %esi,%esi
jmp    1030 <sys_pipe2@plt>

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

LLVM IR (-O2):
define i32 @sys_pipe(i32* %0) {
%2 = tail call i32 @sys_pipe2(i32* %0, i32 0)
ret i32 %2
}
const char *cras_config_get_system_socket_file_dir() { return "/var/run/cras"; }


x86 assembly (clang, -O0):
<cras_config_get_system_socket_file_dir>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"/var/run/cras\00"
define i8* @cras_config_get_system_socket_file_dir() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"/var/run/cras\00"
define i8* @cras_config_get_system_socket_file_dir() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ isprint(int);
int rl_character_len(int c, int pos) { return isprint(c) ? 1 : 2; }


x86 assembly (clang, -O0):
<rl_character_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isprint@plt>
mov    %rax,%rdx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_character_len>:
push   %rax
call   1030 <isprint@plt>
cmp    $0x1,%rax
mov    $0x1,%eax
adc    $0x0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rl_character_len(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i64 @isprint(i32 %5)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @rl_character_len(i32 %0, i32 %1) {
%3 = tail call i64 @isprint(i32 %0)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 2, i32 1
ret i32 %5
}
void gdk_display_set_double_click_distance() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_set_double_click_distance() {
ret void
}
int main(void) {
  int i = 3, j = 5, *p = &i, *q = &j, *r;
  double x;
  printf("%d\n", p == &i);
  p = i + 7;
  printf("%d\n", p);
  r = &x;
  printf("%x\n", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x8(%rbp),%rax
cmp    %rax,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x7,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xa,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* inttoptr (i64 10 to i32*))
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
ret i32 0
}
/* Type definitions */
struct S {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
void wrong_target_1(struct S *s) { abort(); }


x86 assembly (clang, -O0):
<wrong_target_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<wrong_target_1>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.S = type { i32 }
define void @wrong_target_1(%struct.S* %0) {
%2 = alloca %struct.S*
store %struct.S* %0, %struct.S** %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.S = type { i32 }
define void @wrong_target_1(%struct.S* nocapture readnone %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
int inter_mail_sql_init(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @inter_mail_sql_init() {
ret i32 1
}

LLVM IR (-O2):
define i32 @inter_mail_sql_init() {
ret i32 1
}
double MIN(double x, double y) {
  if (x < y)
    return x;
  else
    return y;
}


x86 assembly (clang, -O0):
<MIN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <MIN+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <MIN+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIN>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @MIN(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int *malloc(int);
int *f3() {
  static int *p = 0;
  p = malloc(10);
  return p;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x2f0b(%rip)
mov    0x2f04(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rax
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x2f0e(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@f3.p = internal global i32* null
define i32* @f3() {
%1 = call i32* @malloc(i32 10)
store i32* %1, i32** @f3.p
%2 = load i32*, i32** @f3.p
ret i32* %2
}

LLVM IR (-O2):
@f3.p = internal unnamed_addr global i32* null
define i32* @f3() {
%1 = tail call i32* @malloc(i32 10)
store i32* %1, i32** @f3.p
ret i32* %1
}