#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int start, end;
  printf("Enter the beginning of the interval: ");
  scanf("%d", &start);
  printf("Enter the beginning of the interval: ");
  scanf("%d", &end);
  int i, counter = 0;
  for (i = start; i <= end; i++) {
    if (i % 5 == 0) {
      ++counter;
    }
  }
  printf("%d\n", counter);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11b4 <main+0x94>
mov    -0x10(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a1 <main+0x81>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a6 <main+0x86>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1178 <main+0x58>
mov    -0x14(%rbp),%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xf40(%rip),%r14
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf53(%rip),%r15
lea    0xc(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
cmp    %ecx,%eax
jg     128c <main+0x16c>
add    $0x1,%ecx
mov    %ecx,%edx
sub    %eax,%edx
xor    %ebx,%ebx
cmp    $0x8,%edx
jb     1270 <main+0x150>
mov    %edx,%esi
and    $0xfffffff8,%esi
movd   %eax,%xmm0
add    %esi,%eax
pshufd $0x0,%xmm0,%xmm7
paddd  0xe5f(%rip),%xmm7
pxor   %xmm1,%xmm1
movdqa 0xe62(%rip),%xmm11
movdqa 0xe69(%rip),%xmm8
movdqa 0xe71(%rip),%xmm4
movdqa 0xe79(%rip),%xmm5
movdqa 0xe80(%rip),%xmm9
pcmpeqd %xmm3,%xmm3
movdqa 0xe83(%rip),%xmm10
mov    %esi,%edi
pxor   %xmm6,%xmm6
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqa %xmm7,%xmm0
pmuludq %xmm11,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pshufd $0xf5,%xmm7,%xmm2
pmuludq %xmm11,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm0
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
pxor   %xmm4,%xmm2
pcmpgtd %xmm5,%xmm2
paddd  %xmm2,%xmm1
paddd  %xmm9,%xmm0
pxor   %xmm4,%xmm0
pcmpgtd %xmm5,%xmm0
paddd  %xmm0,%xmm6
psubd  %xmm3,%xmm1
psubd  %xmm3,%xmm6
paddd  %xmm10,%xmm7
add    $0xfffffff8,%edi
jne    11f0 <main+0xd0>
paddd  %xmm1,%xmm6
pshufd $0xee,%xmm6,%xmm0
paddd  %xmm6,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%ebx
cmp    %esi,%edx
je     128c <main+0x16c>
nopw   0x0(%rax,%rax,1)
imul   $0xcccccccd,%eax,%edx
add    $0x19999999,%edx
cmp    $0x33333333,%edx
adc    $0x0,%ebx
add    $0x1,%eax
cmp    %eax,%ecx
jne    1270 <main+0x150>
lea    0xe06(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Enter the beginning of the interval: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
store i32 0, i32* %5
%10 = load i32, i32* %2
store i32 %10, i32* %4
br label %11
11: ; preds = %23, %0
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %26
15: ; preds = %11
%16 = load i32, i32* %4
%17 = srem i32 %16, 5
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %22
22: ; preds = %19, %15
br label %23
23: ; preds = %22
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %11
26: ; preds = %11
%27 = load i32, i32* %5
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Enter the beginning of the interval: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %9, %10
br i1 %11, label %55, label %12
12: ; preds = %0
%13 = add i32 %10, 1
%14 = sub i32 %13, %9
%15 = icmp ult i32 %14, 8
br i1 %15, label %43, label %16
16: ; preds = %12
%17 = and i32 %14, -8
%18 = add i32 %9, %17
%19 = insertelement <4 x i32> poison, i32 %9, i64 0
%20 = shufflevector <4 x i32> %19, <4 x i32> poison, <4 x i32> zeroinitializer
%21 = add <4 x i32> %20, <i32 0, i32 1, i32 2, i32 3>
br label %22
22: ; preds = %22, %16
%23 = phi i32 [ 0, %16 ], [ %36, %22 ]
%24 = phi <4 x i32> [ zeroinitializer, %16 ], [ %34, %22 ]
%25 = phi <4 x i32> [ zeroinitializer, %16 ], [ %35, %22 ]
%26 = phi <4 x i32> [ %21, %16 ], [ %37, %22 ]
%27 = add <4 x i32> %26, <i32 4, i32 4, i32 4, i32 4>
%28 = srem <4 x i32> %26, <i32 5, i32 5, i32 5, i32 5>
%29 = srem <4 x i32> %27, <i32 5, i32 5, i32 5, i32 5>
%30 = icmp eq <4 x i32> %28, zeroinitializer
%31 = icmp eq <4 x i32> %29, zeroinitializer
%32 = zext <4 x i1> %30 to <4 x i32>
%33 = zext <4 x i1> %31 to <4 x i32>
%34 = add <4 x i32> %24, %32
%35 = add <4 x i32> %25, %33
%36 = add nuw i32 %23, 8
%37 = add <4 x i32> %26, <i32 8, i32 8, i32 8, i32 8>
%38 = icmp eq i32 %36, %17
br i1 %38, label %39, label %22
39: ; preds = %22
%40 = add <4 x i32> %35, %34
%41 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %40)
%42 = icmp eq i32 %14, %17
br i1 %42, label %55, label %43
43: ; preds = %12, %39
%44 = phi i32 [ 0, %12 ], [ %41, %39 ]
%45 = phi i32 [ %9, %12 ], [ %18, %39 ]
br label %46
46: ; preds = %43, %46
%47 = phi i32 [ %52, %46 ], [ %44, %43 ]
%48 = phi i32 [ %53, %46 ], [ %45, %43 ]
%49 = srem i32 %48, 5
%50 = icmp eq i32 %49, 0
%51 = zext i1 %50 to i32
%52 = add nuw nsw i32 %47, %51
%53 = add i32 %48, 1
%54 = icmp eq i32 %48, %10
br i1 %54, label %55, label %46
55: ; preds = %46, %39, %0
%56 = phi i32 [ 0, %0 ], [ %41, %39 ], [ %52, %46 ]
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %56)
ret i32 0
}