#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strncmp(char *, char *, int);
int Detect_End_Of_Fct(char *buff) {
  if (strncmp(buff, "END", 3) == 0)
    return 1;
  {
    static int i = 0;
    if (i == 0) {
      fprintf(stderr, "warning, Detect_End_Of_Fct() not customized"
                      "for this architecture\n)");
      i++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<Detect_End_Of_Fct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1157 <Detect_End_Of_Fct+0x37>
movl   $0x1,-0x4(%rbp)
jmp    118f <Detect_End_Of_Fct+0x6f>
cmpl   $0x0,0x2ed6(%rip)
jne    1188 <Detect_End_Of_Fct+0x68>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2eb5(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2eac(%rip)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Detect_End_Of_Fct>:
push   %rbx
lea    0xed8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1160 <Detect_End_Of_Fct+0x40>
xor    %ebx,%ebx
cmpl   $0x0,0x2ef4(%rip)
jne    1165 <Detect_End_Of_Fct+0x45>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
addl   $0x1,0x2ed6(%rip)
jmp    1165 <Detect_End_Of_Fct+0x45>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"END\00"
@Detect_End_Of_Fct.i = internal global i32 0
@stderr = global i32 0
@.str.1 = [67 x i8] c"warning, Detect_End_Of_Fct() not customizedfor this architecture\0A)\00"
define i32 @Detect_End_Of_Fct(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %17
8: ; preds = %1
%9 = load i32, i32* @Detect_End_Of_Fct.i
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @Detect_End_Of_Fct.i
%15 = add nsw i32 %14, 1
store i32 %15, i32* @Detect_End_Of_Fct.i
br label %16
16: ; preds = %11, %8
store i32 0, i32* %2
br label %17
17: ; preds = %16, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"END\00"
@Detect_End_Of_Fct.i = internal unnamed_addr global i32 0
@stderr = global i32 0
@.str.1 = [67 x i8] c"warning, Detect_End_Of_Fct() not customizedfor this architecture\0A)\00"
define i32 @Detect_End_Of_Fct(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = icmp eq i64 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = load i32, i32* @Detect_End_Of_Fct.i
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @Detect_End_Of_Fct.i
%11 = add nsw i32 %10, 1
store i32 %11, i32* @Detect_End_Of_Fct.i
br label %12
12: ; preds = %4, %7, %1
%13 = phi i32 [ 1, %1 ], [ 0, %7 ], [ 0, %4 ]
ret i32 %13
}