#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 *, int);
int /*<<< orphan*/ scanf(char *, char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
main() {
  char a[9], b[9];
  int i, j;
  scanf("%s %s", a, b);
  for (i = j = 0; b[i]; i++)
    j += !strncmp(a, b + i, 2);
  printf("%d\n", j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd(%rbp),%rsi
lea    -0x16(%rbp),%rdx
lea    0xeb2(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmpb   $0x0,-0x16(%rbp,%rax,1)
je     11aa <main+0x7a>
lea    -0xd(%rbp),%rdi
lea    -0x16(%rbp),%rsi
movslq -0x1c(%rbp),%rax
add    %rax,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1161 <main+0x31>
mov    -0x20(%rbp),%esi
lea    0xe52(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
lea    0x17(%rsp),%rsi
lea    0xe(%rsp),%rbx
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmpb   $0x0,0xe(%rsp)
je     1182 <main+0x52>
xor    %ebp,%ebp
lea    0x17(%rsp),%r14
nop
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x1,%eax
adc    $0x0,%ebp
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1160 <main+0x30>
jmp    1184 <main+0x54>
xor    %ebp,%ebp
lea    0xe7b(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca [9 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
store i32 0, i32* %5
store i32 0, i32* %4
br label %9
9: ; preds = %27, %0
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %9
%16 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%17 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = call i32 @strncmp(i8* %16, i8* %20, i32 2)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
%25 = load i32, i32* %5
%26 = add nsw i32 %25, %24
store i32 %26, i32* %5
br label %27
27: ; preds = %15
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %9
30: ; preds = %9
%31 = load i32, i32* %5
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %20, label %8
8: ; preds = %0, %8
%9 = phi i64 [ %16, %8 ], [ 0, %0 ]
%10 = phi i8* [ %17, %8 ], [ %4, %0 ]
%11 = phi i32 [ %15, %8 ], [ 0, %0 ]
%12 = call i32 @strncmp(i8* %3, i8* %10, i32 2)
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = add nuw nsw i32 %11, %14
%16 = add nuw i64 %9, 1
%17 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %8
20: ; preds = %8, %0
%21 = phi i32 [ 0, %0 ], [ %15, %8 ]
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %21)
ret i32 0
}