// File: /workspace/github_cpp_makefile_star2_O1/ruippeixotog[P]algo-lib/segment-tree.cpp
// Function: main
int main() {
  int n = 100;
  SegTree<Node, Op> tree(n, arr);

  char code; int st, end, arg;
  cout << "> ";
  while(cin >> code >> st >> end >> arg) {
    switch(code) {
      case 's':
      case 'a':
        tree.update(st, end, Op(code, arg));
        break;
      case 'm':
        cout << tree.query(st, end).minVal << endl;
        break;
      case 'M':
        cout << tree.query(st, end).maxVal << endl;
        break;
      default:
        cout << "Invalid command." << endl;
    }
    cout << "> ";
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
leaq 0x3e1f(%rip), %rdx      # 0x50f0
leaq 0x18(%rsp), %rdi
movl $0x64, %esi
callq 0x1528
movq 0x3ce9(%rip), %rbx      # 0x4fd0
leaq 0x1d16(%rip), %rsi      # 0x3004
movl $0x2, %edx
movq %rbx, %rdi
callq 0x1100
leaq 0xb(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
leaq 0x14(%rsp), %rbp
movq 0x3cca(%rip), %rdi      # 0x4fe0
movq %r15, %rsi
callq 0x1110
movq %rax, %rdi
movq %r12, %rsi
callq 0x1090
movq %rax, %rdi
movq %r13, %rsi
callq 0x1090
movq %rax, %rdi
movq %rbp, %rsi
callq 0x1090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x14b5
movzbl 0xb(%rsp), %eax
cmpl $0x6c, %eax
jg 0x13a9
cmpl $0x4d, %eax
je 0x13ec
cmpl $0x61, %eax
je 0x13b7
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x1c8f(%rip), %rsi      # 0x3007
callq 0x1100
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
jmp 0x149c
cmpl $0x6d, %eax
je 0x1447
cmpl $0x73, %eax
jne 0x1369
movl 0x10(%rsp), %r8d
movl 0xc(%rsp), %r9d
movl 0x14(%rsp), %edx
shlq $0x20, %rdx
orq %rax, %rdx
movl 0x18(%rsp), %ecx
decl %ecx
movq %rdx, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2056
jmp 0x149c
movl 0x10(%rsp), %r8d
movl 0xc(%rsp), %r9d
movl 0x18(%rsp), %ecx
decl %ecx
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x236a
shrq $0x20, %rax
movq %rbx, %rdi
movl %eax, %esi
callq 0x1140
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
jmp 0x149c
movl 0x10(%rsp), %r8d
movl 0xc(%rsp), %r9d
movl 0x18(%rsp), %ecx
decl %ecx
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x236a
movq %rbx, %rdi
movl %eax, %esi
callq 0x1140
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x1b59(%rip), %rsi      # 0x3004
callq 0x1100
jmp 0x130f
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x14c4
callq 0x10d0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x14ec
callq 0x10d0
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movl %eax, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x14fb
callq 0x10d0
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1512
jmp 0x1512
jmp 0x1512
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x156a
movq %rbx, %rdi
callq 0x1150
nop