// File: 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:
subq $0x108, %rsp            # imm = 0x108
movl $0x0, 0x104(%rsp)
movl $0x64, 0x100(%rsp)
movl 0x100(%rsp), %esi
leaq 0x9e15(%rip), %rdx      # 0xb100
leaq 0xa0(%rsp), %rdi
callq 0x1570
movq 0x9cd1(%rip), %rdi      # 0xafd0
leaq 0x5d9a(%rip), %rsi      # 0x70a0
callq 0x10d0
jmp 0x130d
jmp 0x130f
movq 0x9cca(%rip), %rdi      # 0xafe0
leaq 0x9f(%rsp), %rsi
callq 0x1110
movq %rax, 0x60(%rsp)
jmp 0x132a
movq 0x60(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1080
movq %rax, 0x58(%rsp)
jmp 0x1343
movq 0x58(%rsp), %rdi
leaq 0x94(%rsp), %rsi
callq 0x1080
movq %rax, 0x50(%rsp)
jmp 0x135c
movq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1080
movq %rax, 0x48(%rsp)
jmp 0x1375
movq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x1100
movb %al, 0x47(%rsp)
jmp 0x138f
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x139c
jmp 0x1540
movsbl 0x9f(%rsp), %eax
addl $-0x4d, %eax
movl %eax, %ecx
movq %rcx, 0x38(%rsp)
subl $0x26, %eax
ja 0x14f7
movq 0x38(%rsp), %rax
leaq 0x5c41(%rip), %rcx      # 0x7004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x1690
jmp 0x155c
movl 0x98(%rsp), %eax
movl %eax, 0x30(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0x34(%rsp)
movsbl 0x9f(%rsp), %esi
movl 0x90(%rsp), %edx
leaq 0x7c(%rsp), %rdi
callq 0x1620
jmp 0x1423
movl 0x34(%rsp), %edx
movl 0x30(%rsp), %esi
movq 0x7c(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
callq 0x15d0
jmp 0x143f
jmp 0x1526
movl 0x98(%rsp), %esi
movl 0x94(%rsp), %edx
leaq 0xa0(%rsp), %rdi
callq 0x1650
movq %rax, 0x28(%rsp)
jmp 0x1466
movq 0x28(%rsp), %rax
movq %rax, 0x74(%rsp)
movl 0x74(%rsp), %esi
movq 0x9b55(%rip), %rdi      # 0xafd0
callq 0x1160
movq %rax, 0x20(%rsp)
jmp 0x1487
movq 0x20(%rsp), %rdi
movq 0x9b2d(%rip), %rsi      # 0xafc0
callq 0x10f0
jmp 0x149a
jmp 0x1526
movl 0x98(%rsp), %esi
movl 0x94(%rsp), %edx
leaq 0xa0(%rsp), %rdi
callq 0x1650
movq %rax, 0x18(%rsp)
jmp 0x14c1
movq 0x18(%rsp), %rax
movq %rax, 0x6c(%rsp)
movl 0x70(%rsp), %esi
movq 0x9afa(%rip), %rdi      # 0xafd0
callq 0x1160
movq %rax, 0x10(%rsp)
jmp 0x14e2
movq 0x10(%rsp), %rdi
movq 0x9ad2(%rip), %rsi      # 0xafc0
callq 0x10f0
jmp 0x14f5
jmp 0x1526
movq 0x9ad2(%rip), %rdi      # 0xafd0
leaq 0x5b9e(%rip), %rsi      # 0x70a3
callq 0x10d0
movq %rax, 0x8(%rsp)
jmp 0x1511
movq 0x8(%rsp), %rdi
movq 0x9aa3(%rip), %rsi      # 0xafc0
callq 0x10f0
jmp 0x1524
jmp 0x1526
movq 0x9aa3(%rip), %rdi      # 0xafd0
leaq 0x5b6c(%rip), %rsi      # 0x70a0
callq 0x10d0
jmp 0x153b
jmp 0x130f
leaq 0xa0(%rsp), %rdi
callq 0x1690
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
retq
movq 0x88(%rsp), %rdi
callq 0x1170
nopl (%rax)