// File: AshOlogn[P]ash-language-interpreter/src/errors.cpp
// Function: StaticTypeError::what() const
const char* StaticTypeError::what() const throw() {

  std::string str = "";
  
  if(startLineNumber == endLineNumber) {
    str.append("StaticTypeError error on line ");
    str.append(std::to_string(startLineNumber));
  } else {
    str.append("StaticTypeError from line ");
    str.append(std::to_string(startLineNumber));
    str.append(" to line ");
    str.append(std::to_string(endLineNumber));
  }
  
  str.append("\n");
  str.append(context);
  
  //now append customized message if isCustomMessage
  if(isCustomMessage) {
    str.append(customMessage);

  } else {

    str.append("The ");
    str.append(operation);
    str.append(" operation does not take ");
  
    if(isBinary) {
      str.append(toStringParseDataType(arg1));
      str.append(" and ");
      str.append(toStringParseDataType(arg2));
      str.append(" type arguments");
    } else {
      str.append(toStringParseDataType(arg1));
      str.append(" type argument");    
    }
  }
  
  return copyString(str.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x4430
movq -0xa8(%rbp), %rdx
leaq 0x389ad(%rip), %rsi     # 0x3f035
leaq -0x28(%rbp), %rdi
callq 0x4350
jmp 0x6693
leaq -0x29(%rbp), %rdi
callq 0x4290
movq -0xb0(%rbp), %rcx
movl 0x28(%rcx), %eax
cmpl 0x2c(%rcx), %eax
jne 0x6738
leaq 0x389dc(%rip), %rsi     # 0x3f092
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x66c1
movq -0xb0(%rbp), %rax
movl 0x28(%rax), %esi
leaq -0x60(%rbp), %rdi
callq 0x6e40
jmp 0x66d6
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4470
jmp 0x66e5
leaq -0x60(%rbp), %rdi
callq 0x4170
jmp 0x67f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x4290
jmp 0x6985
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x697c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4170
jmp 0x697c
leaq 0x38972(%rip), %rsi     # 0x3f0b1
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x674a
movq -0xb0(%rbp), %rax
movl 0x28(%rax), %esi
leaq -0x80(%rbp), %rdi
callq 0x6e40
jmp 0x675f
leaq -0x28(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4470
jmp 0x676e
leaq -0x80(%rbp), %rdi
callq 0x4170
leaq 0x3894e(%rip), %rsi     # 0x3f0cc
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6789
movq -0xb0(%rbp), %rax
movl 0x2c(%rax), %esi
leaq -0xa0(%rbp), %rdi
callq 0x6e40
jmp 0x67a1
leaq -0x28(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4470
jmp 0x67b3
leaq -0xa0(%rbp), %rdi
callq 0x4170
jmp 0x67f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4170
jmp 0x697c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4170
jmp 0x697c
leaq 0x3dd25(%rip), %rsi     # 0x44524
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x680a
movq -0xb0(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6820
movq -0xb0(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x6848
movq -0xb0(%rbp), %rax
movq 0x20(%rax), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6843
jmp 0x6949
leaq 0x38887(%rip), %rsi     # 0x3f0d6
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x685a
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6870
leaq 0x38864(%rip), %rsi     # 0x3f0db
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6882
movq -0xb0(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x6909
movq -0xb0(%rbp), %rax
movl 0x30(%rax), %edi
callq 0xb8a0
movq %rax, -0xb8(%rbp)
jmp 0x68a7
movq -0xb8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x68b9
leaq 0x38835(%rip), %rsi     # 0x3f0f5
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x68cb
movq -0xb0(%rbp), %rax
movl 0x34(%rax), %edi
callq 0xb8a0
movq %rax, -0xc0(%rbp)
jmp 0x68e3
movq -0xc0(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x68f5
leaq 0x387ff(%rip), %rsi     # 0x3f0fb
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6907
jmp 0x6947
movq -0xb0(%rbp), %rax
movl 0x30(%rax), %edi
callq 0xb8a0
movq %rax, -0xc8(%rbp)
jmp 0x6921
movq -0xc8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6933
leaq 0x387d1(%rip), %rsi     # 0x3f10b
leaq -0x28(%rbp), %rdi
callq 0x4460
jmp 0x6945
jmp 0x6947
jmp 0x6949
leaq -0x28(%rbp), %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0xd0(%rbp)
jmp 0x6963
leaq -0x28(%rbp), %rdi
callq 0x4170
movq -0xd0(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x4170
movq -0x38(%rbp), %rdi
callq 0x42e0
nop