#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 *, int *, int *);
int main(int argc, const char *argv[]) {
  int i, a, b, sum = 0;
  scanf("%d%d", &a, &b);
  for (i = a; i <= b; i++) {
    if (i % 3 == 1 && i % 5 == 3)
      sum += i;
  }
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11a7 <main+0x87>
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1194 <main+0x74>
mov    -0x14(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x3,%edx
jne    1194 <main+0x74>
mov    -0x14(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1199 <main+0x79>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1157 <main+0x37>
mov    -0x20(%rbp),%esi
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf48(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
xor    %esi,%esi
cmp    %r8d,%ecx
jg     13d3 <main+0x2b3>
add    $0x1,%r8d
mov    %r8d,%edx
sub    %ecx,%edx
xor    %esi,%esi
cmp    $0x8,%edx
jb     1380 <main+0x260>
mov    %edx,%edi
and    $0xfffffff8,%edi
movd   %ecx,%xmm0
add    %edi,%ecx
pshufd $0x0,%xmm0,%xmm0
paddd  0xe8c(%rip),%xmm0
pxor   %xmm14,%xmm14
movdqa 0xe9e(%rip),%xmm12
movdqa 0xea5(%rip),%xmm10
movdqa 0xeac(%rip),%xmm11
movdqa 0xeb3(%rip),%xmm13
mov    %edi,%esi
pxor   %xmm15,%xmm15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,%xmm2
paddd  0xe54(%rip),%xmm2
movdqa %xmm0,%xmm1
pmuludq %xmm12,%xmm1
pshufd $0xed,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm3
movdqa %xmm3,%xmm4
pmuludq %xmm12,%xmm4
pshufd $0xed,%xmm4,%xmm4
punpckldq %xmm4,%xmm1
pxor   %xmm7,%xmm7
pcmpgtd %xmm0,%xmm7
movdqa %xmm7,%xmm4
pand   %xmm12,%xmm4
psubd  %xmm4,%xmm1
movdqa %xmm1,%xmm4
psrld  $0x1f,%xmm4
paddd  %xmm1,%xmm4
movdqa %xmm4,%xmm1
paddd  %xmm4,%xmm1
paddd  %xmm4,%xmm1
movdqa %xmm0,%xmm4
psubd  %xmm1,%xmm4
movdqa %xmm2,%xmm1
pmuludq %xmm12,%xmm1
pshufd $0xed,%xmm1,%xmm6
pshufd $0xf5,%xmm2,%xmm1
movdqa %xmm1,%xmm5
pmuludq %xmm12,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm6
pxor   %xmm8,%xmm8
pcmpgtd %xmm2,%xmm8
movdqa %xmm8,%xmm5
pand   %xmm12,%xmm5
psubd  %xmm5,%xmm6
movdqa %xmm6,%xmm5
psrld  $0x1f,%xmm5
paddd  %xmm6,%xmm5
movdqa %xmm5,%xmm9
paddd  %xmm5,%xmm9
paddd  %xmm5,%xmm9
movdqa %xmm2,%xmm6
psubd  %xmm9,%xmm6
movdqa %xmm0,%xmm5
pmuludq %xmm13,%xmm5
pshufd $0xed,%xmm5,%xmm5
pmuludq %xmm13,%xmm3
pshufd $0xed,%xmm3,%xmm3
punpckldq %xmm3,%xmm5
pand   %xmm13,%xmm7
psubd  %xmm7,%xmm5
movdqa %xmm5,%xmm3
psrld  $0x1f,%xmm3
psrad  $0x1,%xmm5
paddd  %xmm3,%xmm5
movdqa %xmm5,%xmm7
pslld  $0x2,%xmm7
paddd  %xmm5,%xmm7
movdqa %xmm0,%xmm3
psubd  %xmm7,%xmm3
movdqa %xmm2,%xmm5
pmuludq %xmm13,%xmm5
pshufd $0xed,%xmm5,%xmm5
pmuludq %xmm13,%xmm1
pshufd $0xed,%xmm1,%xmm1
punpckldq %xmm1,%xmm5
pand   %xmm13,%xmm8
psubd  %xmm8,%xmm5
movdqa %xmm5,%xmm1
psrld  $0x1f,%xmm1
psrad  $0x1,%xmm5
paddd  %xmm1,%xmm5
movdqa %xmm5,%xmm1
pslld  $0x2,%xmm1
paddd  %xmm5,%xmm1
movdqa %xmm2,%xmm5
psubd  %xmm1,%xmm5
pcmpeqd %xmm11,%xmm4
pcmpeqd %xmm10,%xmm3
pand   %xmm4,%xmm3
pcmpeqd %xmm11,%xmm6
pcmpeqd %xmm10,%xmm5
pand   %xmm6,%xmm5
pand   %xmm0,%xmm3
paddd  %xmm3,%xmm14
pand   %xmm2,%xmm5
paddd  %xmm5,%xmm15
paddd  0xd18(%rip),%xmm0
add    $0xfffffff8,%esi
jne    11b0 <main+0x90>
paddd  %xmm14,%xmm15
pshufd $0xee,%xmm15,%xmm0
paddd  %xmm15,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%esi
cmp    %edi,%edx
je     13d3 <main+0x2b3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %ecx,%rcx
imul   $0x55555556,%rcx,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
shr    $0x20,%rdx
add    %edi,%edx
lea    (%rdx,%rdx,2),%edx
mov    %ecx,%edi
sub    %edx,%edi
xor    $0x1,%edi
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x21,%rdx
add    %eax,%edx
lea    (%rdx,%rdx,4),%eax
mov    %ecx,%edx
sub    %eax,%edx
xor    $0x3,%edx
or     %edi,%edx
mov    $0x0,%eax
cmove  %ecx,%eax
add    %eax,%esi
add    $0x1,%ecx
cmp    %ecx,%r8d
jne    1380 <main+0x260>
lea    0xc98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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