#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*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ stdin;
int main() {
  freopen("bacon.in", "r", stdin);
  char buffer[100];
  char *france = "France";
  fgets(buffer, 100, stdin);
  int i, j, k, n, count, valid;
  sscanf(buffer, "%d", &n);
  for (i = 1; i <= n; i++) {
    for (j = 0; j < 100; j++)
      buffer[j] = 0;
    fgets(buffer, 100, stdin);
    count = 0;
    for (j = 0; j < 90; j++) {
      valid = 1;
      for (k = 0; k < 6; k++)
        if (buffer[j + k] != france[k])
          valid = 0;
      if (valid)
        count++;
    }
    printf("Sentence #%d: %d\n", i, count);
  }
  fclose(stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e7f(%rip),%rax
mov    (%rax),%edx
lea    0xe8e(%rip),%rdi
lea    0xe90(%rip),%rsi
call   1050 <freopen@plt>
lea    0xe86(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
mov    0x2e54(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1060 <fgets@plt>
lea    -0x70(%rbp),%rdi
lea    0xe67(%rip),%rsi
lea    -0x88(%rbp),%rdx
call   1070 <sscanf@plt>
movl   $0x1,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x88(%rbp),%eax
jg     12e4 <main+0x194>
movl   $0x0,-0x80(%rbp)
cmpl   $0x64,-0x80(%rbp)
jge    11f5 <main+0xa5>
movslq -0x80(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    11d4 <main+0x84>
lea    -0x70(%rbp),%rdi
mov    0x2de8(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1060 <fgets@plt>
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x80(%rbp)
cmpl   $0x5a,-0x80(%rbp)
jge    12c1 <main+0x171>
movl   $0x1,-0x90(%rbp)
movl   $0x0,-0x84(%rbp)
cmpl   $0x6,-0x84(%rbp)
jge    1292 <main+0x142>
mov    -0x80(%rbp),%eax
add    -0x84(%rbp),%eax
cltq
movsbl -0x70(%rbp,%rax,1),%eax
mov    -0x78(%rbp),%rcx
movslq -0x84(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1279 <main+0x129>
movl   $0x0,-0x90(%rbp)
jmp    127e <main+0x12e>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    123b <main+0xeb>
cmpl   $0x0,-0x90(%rbp)
je     12ae <main+0x15e>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    12b3 <main+0x163>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    121d <main+0xcd>
mov    -0x7c(%rbp),%esi
mov    -0x8c(%rbp),%edx
lea    0xd44(%rip),%rdi
call   1040 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11be <main+0x6e>
mov    0x2cfd(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    0x2e81(%rip),%r12
mov    (%r12),%edx
lea    0xf0e(%rip),%rdi
lea    0xf10(%rip),%rsi
call   1050 <freopen@plt>
mov    (%r12),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1060 <fgets@plt>
lea    0xef0(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1070 <sscanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    13bd <main+0x26d>
mov    $0x1,%r13d
lea    0x10(%rsp),%r14
lea    0xec9(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
pxor   %xmm0,%xmm0
movdqa %xmm0,0x60(%rsp)
movdqa %xmm0,0x50(%rsp)
movdqa %xmm0,0x40(%rsp)
movdqa %xmm0,0x30(%rsp)
movdqa %xmm0,0x20(%rsp)
movdqa %xmm0,0x10(%rsp)
movl   $0x0,0x70(%rsp)
mov    (%r12),%edx
mov    %r14,%rdi
mov    $0x64,%esi
call   1060 <fgets@plt>
movd   0x10(%rsp),%xmm1
pslld  $0x18,%xmm1
mov    $0x5,%eax
pxor   %xmm0,%xmm0
movdqa 0xdd3(%rip),%xmm6
movdqa 0xdda(%rip),%xmm8
movdqa 0xde1(%rip),%xmm9
movdqa 0xde8(%rip),%xmm10
movdqa 0xdef(%rip),%xmm11
movdqa 0xdf6(%rip),%xmm12
movdqa 0xdfd(%rip),%xmm13
movdqa 0xe05(%rip),%xmm7
nopl   0x0(%rax,%rax,1)
movdqa %xmm6,%xmm2
pandn  %xmm1,%xmm2
movd   0xc(%rsp,%rax,1),%xmm1
movdqa %xmm1,%xmm3
pand   %xmm6,%xmm3
por    %xmm2,%xmm3
punpcklbw %xmm3,%xmm3
pshufd $0x44,%xmm3,%xmm2
pshuflw $0xc7,%xmm2,%xmm2
pshufhw $0xe5,%xmm2,%xmm2
pcmpeqb %xmm8,%xmm2
movdqa %xmm1,%xmm3
pcmpeqb %xmm9,%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
movd   0xd(%rsp,%rax,1),%xmm4
pcmpeqb %xmm10,%xmm4
punpcklbw %xmm4,%xmm4
punpcklwd %xmm4,%xmm4
movd   0xe(%rsp,%rax,1),%xmm5
pcmpeqb %xmm11,%xmm5
punpcklbw %xmm5,%xmm5
punpcklwd %xmm5,%xmm5
pand   %xmm4,%xmm5
pand   %xmm3,%xmm5
movd   0xf(%rsp,%rax,1),%xmm3
pcmpeqb %xmm12,%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
movd   0x10(%rsp,%rax,1),%xmm4
pcmpeqb %xmm13,%xmm4
punpcklbw %xmm4,%xmm4
punpcklwd %xmm4,%xmm4
pand   %xmm3,%xmm4
psrld  $0x18,%xmm4
pand   %xmm5,%xmm4
pand   %xmm2,%xmm4
pand   %xmm7,%xmm4
paddd  %xmm4,%xmm0
add    $0x4,%rax
cmp    $0x5d,%rax
jne    1270 <main+0x120>
movd   %xmm1,%eax
shr    $0x18,%eax
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%edi
cmp    $0x46,%al
sete   %al
mov    0x69(%rsp),%dl
cmp    $0x72,%dl
sete   %bl
movd   0x6a(%rsp),%xmm0
movd   %xmm0,%esi
cmp    $0x65636e61,%esi
sete   %cl
and    %bl,%cl
and    %al,%cl
movzbl %cl,%eax
add    %edi,%eax
cmp    $0x46,%dl
sete   %cl
cmpb   $0x72,0x6a(%rsp)
sete   %dl
movd   0x6b(%rsp),%xmm0
movd   %xmm0,%esi
cmp    $0x65636e61,%esi
sete   %bl
and    %cl,%dl
and    %bl,%dl
movzbl %dl,%edx
add    %eax,%edx
mov    %r15,%rdi
mov    %r13d,%esi
call   1040 <printf@plt>
lea    0x1(%r13),%eax
cmp    0xc(%rsp),%r13d
mov    %eax,%r13d
jl     11d0 <main+0x80>
mov    (%r12),%edi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"bacon.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [7 x i8] c"France\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [18 x i8] c"Sentence #%d: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = load i32, i32* @stdin
%11 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %10)
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %3
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%13 = load i32, i32* @stdin
%14 = call i32 @fgets(i8* %12, i32 100, i32 %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%16 = call i32 @sscanf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
store i32 1, i32* %4
br label %17
17: ; preds = %77, %0
%18 = load i32, i32* %4
%19 = load i32, i32* %7
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %80
21: ; preds = %17
store i32 0, i32* %5
br label %22
22: ; preds = %29, %21
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 100
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %27
store i8 0, i8* %28
br label %29
29: ; preds = %25
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %22
32: ; preds = %22
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%34 = load i32, i32* @stdin
%35 = call i32 @fgets(i8* %33, i32 100, i32 %34)
store i32 0, i32* %8
store i32 0, i32* %5
br label %36
36: ; preds = %70, %32
%37 = load i32, i32* %5
%38 = icmp slt i32 %37, 90
br i1 %38, label %39, label %73
39: ; preds = %36
store i32 1, i32* %9
store i32 0, i32* %6
br label %40
40: ; preds = %60, %39
%41 = load i32, i32* %6
%42 = icmp slt i32 %41, 6
br i1 %42, label %43, label %63
43: ; preds = %40
%44 = load i32, i32* %5
%45 = load i32, i32* %6
%46 = add nsw i32 %44, %45
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = load i8*, i8** %3
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp ne i32 %50, %56
br i1 %57, label %58, label %59
58: ; preds = %43
store i32 0, i32* %9
br label %59
59: ; preds = %58, %43
br label %60
60: ; preds = %59
%61 = load i32, i32* %6
%62 = add nsw i32 %61, 1
store i32 %62, i32* %6
br label %40
63: ; preds = %40
%64 = load i32, i32* %9
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %63
%67 = load i32, i32* %8
%68 = add nsw i32 %67, 1
store i32 %68, i32* %8
br label %69
69: ; preds = %66, %63
br label %70
70: ; preds = %69
%71 = load i32, i32* %5
%72 = add nsw i32 %71, 1
store i32 %72, i32* %5
br label %36
73: ; preds = %36
%74 = load i32, i32* %4
%75 = load i32, i32* %8
%76 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %74, i32 %75)
br label %77
77: ; preds = %73
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %17
80: ; preds = %17
%81 = load i32, i32* @stdin
%82 = call i32 @fclose(i32 %81)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"bacon.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [18 x i8] c"Sentence #%d: %d\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = alloca i32
%4 = load i32, i32* @stdin
%5 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %6, i32 100, i32 %7)
%9 = bitcast i32* %3 to i8*
%10 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 1
br i1 %12, label %95, label %13
13: ; preds = %0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 89
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 90
%16 = bitcast i8* %15 to <4 x i8>*
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 90
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 91
%19 = bitcast i8* %18 to <4 x i8>*
br label %20
20: ; preds = %13, %66
%21 = phi i32 [ %92, %66 ], [ 1, %13 ]
%22 = load i32, i32* @stdin
%23 = call i32 @fgets(i8* %6, i32 100, i32 %22)
%24 = load i8, i8* %6
%25 = insertelement <4 x i8> poison, i8 %24, i64 3
br label %26
26: ; preds = %26, %20
%27 = phi i64 [ 0, %20 ], [ %64, %26 ]
%28 = phi <4 x i8> [ %25, %20 ], [ %33, %26 ]
%29 = phi <4 x i32> [ zeroinitializer, %20 ], [ %63, %26 ]
%30 = or i64 %27, 1
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %30
%32 = bitcast i8* %31 to <4 x i8>*
%33 = load <4 x i8>, <4 x i8>* %32
%34 = shufflevector <4 x i8> %28, <4 x i8> %33, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%35 = icmp eq <4 x i8> %34, <i8 70, i8 70, i8 70, i8 70>
%36 = icmp eq <4 x i8> %33, <i8 114, i8 114, i8 114, i8 114>
%37 = or i64 %27, 2
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %37
%39 = bitcast i8* %38 to <4 x i8>*
%40 = load <4 x i8>, <4 x i8>* %39
%41 = icmp eq <4 x i8> %40, <i8 97, i8 97, i8 97, i8 97>
%42 = or i64 %27, 3
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %42
%44 = bitcast i8* %43 to <4 x i8>*
%45 = load <4 x i8>, <4 x i8>* %44
%46 = icmp eq <4 x i8> %45, <i8 110, i8 110, i8 110, i8 110>
%47 = add nuw nsw i64 %27, 4
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %47
%49 = bitcast i8* %48 to <4 x i8>*
%50 = load <4 x i8>, <4 x i8>* %49
%51 = icmp eq <4 x i8> %50, <i8 99, i8 99, i8 99, i8 99>
%52 = add nuw nsw i64 %27, 5
%53 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %52
%54 = bitcast i8* %53 to <4 x i8>*
%55 = load <4 x i8>, <4 x i8>* %54
%56 = icmp eq <4 x i8> %55, <i8 101, i8 101, i8 101, i8 101>
%57 = select <4 x i1> %56, <4 x i1> %51, <4 x i1> zeroinitializer
%58 = select <4 x i1> %57, <4 x i1> %46, <4 x i1> zeroinitializer
%59 = select <4 x i1> %58, <4 x i1> %41, <4 x i1> zeroinitializer
%60 = select <4 x i1> %59, <4 x i1> %36, <4 x i1> zeroinitializer
%61 = select <4 x i1> %60, <4 x i1> %35, <4 x i1> zeroinitializer
%62 = zext <4 x i1> %61 to <4 x i32>
%63 = add <4 x i32> %29, %62
%64 = add nuw i64 %27, 4
%65 = icmp eq i64 %64, 88
br i1 %65, label %66, label %26
66: ; preds = %26
%67 = extractelement <4 x i8> %33, i64 3
%68 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %63)
%69 = icmp eq i8 %67, 70
%70 = load i8, i8* %14
%71 = icmp eq i8 %70, 114
%72 = load <4 x i8>, <4 x i8>* %16
%73 = freeze <4 x i8> %72
%74 = bitcast <4 x i8> %73 to i32
%75 = icmp eq i32 %74, 1701015137
%76 = select i1 %75, i1 %71, i1 false
%77 = select i1 %76, i1 %69, i1 false
%78 = zext i1 %77 to i32
%79 = add nuw nsw i32 %68, %78
%80 = icmp eq i8 %70, 70
%81 = load i8, i8* %17
%82 = icmp eq i8 %81, 114
%83 = load <4 x i8>, <4 x i8>* %19
%84 = freeze <4 x i8> %83
%85 = bitcast <4 x i8> %84 to i32
%86 = icmp eq i32 %85, 1701015137
%87 = select i1 %86, i1 %82, i1 false
%88 = select i1 %87, i1 %80, i1 false
%89 = zext i1 %88 to i32
%90 = add nuw nsw i32 %79, %89
%91 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %21, i32 %90)
%92 = add nuw nsw i32 %21, 1
%93 = load i32, i32* %3
%94 = icmp slt i32 %21, %93
br i1 %94, label %20, label %95
95: ; preds = %66, %0
%96 = load i32, i32* @stdin
%97 = call i32 @fclose(i32 %96)
ret i32 0
}