#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*/ free(char *);
int /*<<< orphan*/ getMaxRange(char *, int /*<<< orphan*/, long, long, long,
                               long);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *str;
  long *A;
  long t;
  str = (char *)malloc(1000002 * sizeof(char));
  scanf("%s", str);
  long i = 0;
  long currentInt = 0;
  long min = currentInt, max = currentInt, shiftValue = 0, maxP = 0,
       maxPRev = 0, len = 0;
  while (str[i] != '\0') {
    if (str[i] != '=') {
      str[len++] = str[i];
    }
    i++;
  }
  printf("%ld", getMaxRange(str, 0, currentInt, min, max, len));
  free(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf4242,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1070 <scanf@plt>
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1219 <main+0xc9>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
je     1208 <main+0xb8>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x60(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x60(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11bd <main+0x6d>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x60(%rbp),%r9
xor    %esi,%esi
call   1040 <getMaxRange@plt>
mov    %eax,%esi
lea    0xdc6(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xf4242,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xe9b(%rip),%rdi
mov    %rax,%rsi
call   1070 <scanf@plt>
xor    %r9d,%r9d
mov    %rbx,%rax
jmp    1184 <main+0x34>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x3d,%cl
je     1180 <main+0x30>
test   %cl,%cl
je     119a <main+0x4a>
mov    %cl,(%rbx,%r9,1)
add    $0x1,%r9
jmp    1180 <main+0x30>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <getMaxRange@plt>
lea    0xe51(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i32 0, i32* %1
%13 = call i64 @malloc(i32 1000002)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %2
%15 = load i8*, i8** %2
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
store i64 0, i64* %5
store i64 0, i64* %6
%17 = load i64, i64* %6
store i64 %17, i64* %7
%18 = load i64, i64* %6
store i64 %18, i64* %8
store i64 0, i64* %9
store i64 0, i64* %10
store i64 0, i64* %11
store i64 0, i64* %12
br label %19
19: ; preds = %42, %0
%20 = load i8*, i8** %2
%21 = load i64, i64* %5
%22 = getelementptr inbounds i8, i8* %20, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %45
26: ; preds = %19
%27 = load i8*, i8** %2
%28 = load i64, i64* %5
%29 = getelementptr inbounds i8, i8* %27, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 61
br i1 %32, label %33, label %42
33: ; preds = %26
%34 = load i8*, i8** %2
%35 = load i64, i64* %5
%36 = getelementptr inbounds i8, i8* %34, i64 %35
%37 = load i8, i8* %36
%38 = load i8*, i8** %2
%39 = load i64, i64* %12
%40 = add nsw i64 %39, 1
store i64 %40, i64* %12
%41 = getelementptr inbounds i8, i8* %38, i64 %39
store i8 %37, i8* %41
br label %42
42: ; preds = %33, %26
%43 = load i64, i64* %5
%44 = add nsw i64 %43, 1
store i64 %44, i64* %5
br label %19
45: ; preds = %19
%46 = load i8*, i8** %2
%47 = load i64, i64* %6
%48 = load i64, i64* %7
%49 = load i64, i64* %8
%50 = load i64, i64* %12
%51 = call i32 @getMaxRange(i8* %46, i32 0, i64 %47, i64 %48, i64 %49, i64 %50)
%52 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %51)
%53 = load i8*, i8** %2
%54 = call i32 @free(i8* %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 1000002)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %4
4: ; preds = %12, %0
%5 = phi i64 [ 0, %0 ], [ %14, %12 ]
%6 = phi i64 [ 0, %0 ], [ %13, %12 ]
%7 = getelementptr inbounds i8, i8* %2, i64 %5
%8 = load i8, i8* %7
switch i8 %8, label %9 [
i8 0, label %15
i8 61, label %12
]
9: ; preds = %4
%10 = add nsw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %2, i64 %6
store i8 %8, i8* %11
br label %12
12: ; preds = %4, %9
%13 = phi i64 [ %10, %9 ], [ %6, %4 ]
%14 = add nuw nsw i64 %5, 1
br label %4
15: ; preds = %4
%16 = tail call i32 @getMaxRange(i8* %2, i32 0, i64 0, i64 0, i64 0, i64 %6)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = tail call i32 @free(i8* %2)
ret i32 0
}