#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 *);
int main(void) {
  int inicio, fim, inc, i, soma = 0;
  scanf("%d %d", &inicio, &fim);
  if (inicio == fim) {
    printf("0\n");
  } else {
    inc = fim > inicio ? 1 : -1;
    for (i = inicio + inc; i != fim; i += inc) {
      if (i % 2 != 0) {
        soma += i;
      }
    }
    printf("%d\n", soma);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1169 <main+0x49>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d7 <main+0xb7>
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11c6 <main+0xa6>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b3 <main+0x93>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11b8 <main+0x98>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    118a <main+0x6a>
mov    -0x18(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%eax
cmp    %eax,%ecx
jne    115e <main+0x2e>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
jmp    119f <main+0x6f>
setl   %dl
movzbl %dl,%edx
lea    (%rcx,%rdx,2),%ecx
add    $0xffffffff,%ecx
xor    %esi,%esi
cmp    %eax,%ecx
je     1191 <main+0x61>
add    %edx,%edx
add    $0xffffffff,%edx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
mov    %ecx,%edi
and    $0x1,%edi
neg    %edi
and    %ecx,%edi
add    %edi,%esi
add    %edx,%ecx
cmp    %ecx,%eax
jne    1180 <main+0x50>
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"0\0A\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
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %42
13: ; preds = %0
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp sgt i32 %14, %15
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 -1
store i32 %18, i32* %4
%19 = load i32, i32* %2
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
store i32 %21, i32* %5
br label %22
22: ; preds = %35, %13
%23 = load i32, i32* %5
%24 = load i32, i32* %3
%25 = icmp ne i32 %23, %24
br i1 %25, label %26, label %39
26: ; preds = %22
%27 = load i32, i32* %5
%28 = srem i32 %27, 2
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = load i32, i32* %5
%32 = load i32, i32* %6
%33 = add nsw i32 %32, %31
store i32 %33, i32* %6
br label %34
34: ; preds = %30, %26
br label %35
35: ; preds = %34
%36 = load i32, i32* %4
%37 = load i32, i32* %5
%38 = add nsw i32 %37, %36
store i32 %38, i32* %5
br label %22
39: ; preds = %22
%40 = load i32, i32* %6
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %39, %11
ret i32 0
}

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