#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int centroidfold(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char seq[] = "augcaugcaunnnngcaugcaugcaugc";
  char str[] = "............................";
  int x = centroidfold(seq, str);
  switch (x) {
  case 0:
    printf("%s\n%s\n", seq, str);
    break;
  default:
    printf("err: %d\n", x);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movups 0xed7(%rip),%xmm0
movups %xmm0,-0x23(%rbp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
movups 0xee1(%rip),%xmm0
movups %xmm0,-0x43(%rbp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,-0x50(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <centroidfold@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
test   %eax,%eax
jne    1196 <main+0x76>
jmp    117b <main+0x5b>
lea    -0x30(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a7 <main+0x87>
mov    -0x54(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movups 0xee2(%rip),%xmm0
movups %xmm0,0x2d(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xeea(%rip),%xmm0
movups %xmm0,0xd(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <centroidfold@plt>
test   %eax,%eax
je     1176 <main+0x56>
lea    0xed9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    118c <main+0x6c>
lea    0xec0(%rip),%rdi
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.seq = [29 x i8] c"augcaugcaunnnngcaugcaugcaugc\00"
@__const.main.str = [29 x i8] c"............................\00"
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [9 x i8] c"err: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [29 x i8]
%3 = alloca [29 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [29 x i8]* %2 to i8*
%6 = bitcast [29 x i8]* %3 to i8*
%7 = getelementptr inbounds [29 x i8], [29 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [29 x i8], [29 x i8]* %3, i64 0, i64 0
%9 = call i32 @centroidfold(i8* %7, i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
switch i32 %10, label %15 [
i32 0, label %11
]
11: ; preds = %0
%12 = getelementptr inbounds [29 x i8], [29 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [29 x i8], [29 x i8]* %3, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
br label %18
15: ; preds = %0
%16 = load i32, i32* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %11
ret i32 0
}

LLVM IR (-O2):
@__const.main.seq = [29 x i8] c"augcaugcaunnnngcaugcaugcaugc\00"
@__const.main.str = [29 x i8] c"............................\00"
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [9 x i8] c"err: %d\0A\00"
define i32 @main() {
%1 = alloca [29 x i8]
%2 = alloca [29 x i8]
%3 = getelementptr inbounds [29 x i8], [29 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [29 x i8], [29 x i8]* %2, i64 0, i64 0
%5 = call i32 @centroidfold(i8* %3, i8* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
br label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %11
11: ; preds = %9, %7
ret i32 0
}