#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 /*<<< orphan*/ printf(char *, char *);
int strnlen(char *, int);
int filterSummery(char summery[]) {
  if (summery[0] == '\0') {
    printf("summery \"%s\" is emty\n", summery);
    return 1;
  } else if (strnlen(summery, 200) < 10) {
    printf("summery \"%s\" is to short\n", summery);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<filterSummery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1158 <filterSummery+0x38>
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1197 <filterSummery+0x77>
mov    -0x10(%rbp),%rdi
mov    $0xc8,%esi
call   1040 <strnlen@plt>
cmp    $0xa,%eax
jge    118b <filterSummery+0x6b>
mov    -0x10(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1197 <filterSummery+0x77>
jmp    1190 <filterSummery+0x70>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filterSummery>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1148 <filterSummery+0x28>
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1040 <strnlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
jg     115c <filterSummery+0x3c>
lea    0xed0(%rip),%rdi
jmp    114f <filterSummery+0x2f>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"summery \22%s\22 is emty\0A\00"
@.str.1 = [26 x i8] c"summery \22%s\22 is to short\0A\00"
define i32 @filterSummery(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 1, i32* %2
br label %21
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i32 @strnlen(i8* %13, i32 200)
%15 = icmp slt i32 %14, 10
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i8*, i8** %3
%18 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %17)
store i32 1, i32* %2
br label %21
19: ; preds = %12
br label %20
20: ; preds = %19
store i32 0, i32* %2
br label %21
21: ; preds = %20, %16, %9
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [22 x i8] c"summery \22%s\22 is emty\0A\00"
@.str.1 = [26 x i8] c"summery \22%s\22 is to short\0A\00"
define i32 @filterSummery(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strnlen(i8* %0, i32 200)
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), %4 ]
%9 = tail call i32 @printf(i8* %8, i8* %0)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ 0, %4 ], [ 1, %7 ]
ret i32 %11
}