// File: /workspace/github_cpp_makefile_star2_O3/AshOlogn[P]ash-language-interpreter/src/parsetoken.cpp
// Function: toStringParseData(ParseData)
char* toStringParseData(ParseData d) {

  switch(d.type) {

    case INT8_T: {
      int8_t val = (int8_t) d.value.integer;
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case INT16_T: {
      int16_t val = (int16_t) d.value.integer;  
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case INT32_T: {
      int32_t val = (int32_t) d.value.integer;
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case INT64_T: {
      int64_t val = (int64_t) d.value.integer;
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case UINT8_T: {
      uint8_t val = (uint8_t) d.value.integer;
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case UINT16_T: {
      uint16_t val = (uint16_t) d.value.integer;  
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case UINT32_T: {
      uint32_t val = (uint32_t) d.value.integer;
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case UINT64_T: {
      uint64_t val = (uint64_t) d.value.integer;
      std::string str = std::to_string(val);
      return copyString(str.c_str());
    }

    case CHAR_T: {
      char val = (char) ((uint8_t) d.value.integer);
      char* c = new char[2];
      c[0] = val;
      c[1] = '\0';
      return c; 
    }

    case DOUBLE_T: {
      std::string str = std::to_string((double) d.value.floatingPoint);
      return copyString(str.c_str());
    }
    
    case BOOL_T: {
     
      if(d.value.integer) {
        return copyString("true");
      } else {
        return copyString("false");
      }
    }

    case STRING_T: {
      return copyString((char*) d.value.allocated);
    }

		case ARRAY_T: {

			Array* arr = (Array*) d.value.allocated;
			uint32_t length = arr->length;
			ParseData* values = arr->values;

			std::string str("[");

			if(length > 0)
				str.append(toStringParseData(values[0]));
			
			for(uint32_t i = 1; i < length; i++) {
				str.append(", ");
				str.append(toStringParseData(values[i]));
			}
			str.append("]");

			return copyString(str.c_str());
		}
		
		case VOID_T: {
			return copyString("VOID");
		}

    default: {
      return copyString("INVALID");
    }

  }

  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0xf, %edi
ja 0x8696
movq %rsi, %rbx
movl %edi, %eax
leaq 0x16933(%rip), %rcx     # 0x1eb44
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl %bl, %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
cmpl $0x64, %ebx
movl $0x3, %eax
sbbl $0x0, %eax
cmpl $0xa, %ebx
movl $0x1, %r15d
cmovael %eax, %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x4250
addq (%r12), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x5c46
movq (%r12), %rdi
callq 0x175e8
jmp 0x8754
leaq 0x16dc8(%rip), %rdi     # 0x1f04e
jmp 0x86a6
movq %rbx, %xmm0
movq 0x23d21(%rip), %rsi     # 0x2bfb8
leaq 0x16db5(%rip), %rcx     # 0x1f053
leaq -0x48(%rbp), %rbx
movl $0x148, %edx            # imm = 0x148
movq %rbx, %rdi
movb $0x1, %al
callq 0x88c9
movq (%rbx), %rdi
callq 0x175e8
movq %rax, %r14
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x8760
jmp 0x8765
movzbl %bl, %ebx
cmpl $0x64, %ebx
movl $0x3, %eax
sbbl $0x0, %eax
cmpl $0xa, %ebx
movl $0x1, %r14d
cmovael %eax, %r14d
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x2d, %edx
callq 0x4250
movq (%r15), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x5c46
movq (%r15), %rdi
callq 0x175e8
jmp 0x8434
movl 0x4(%rbx), %r12d
movq 0x8(%rbx), %r13
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x16df2(%rip), %rsi     # 0x1f12d
leaq 0x16dec(%rip), %rdx     # 0x1f12e
leaq -0x48(%rbp), %rdi
callq 0x5cb8
testq %r12, %r12
je 0x83ad
movl (%r13), %edi
movq 0x8(%r13), %rsi
callq 0x81eb
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x43a0
cmpl $0x1, %r12d
je 0x83ad
addq $0x18, %r13
decq %r12
leaq 0x16cce(%rip), %rbx     # 0x1f04b
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43a0
movl -0x8(%r13), %edi
movq (%r13), %rsi
callq 0x81eb
movq %r14, %rdi
movq %rax, %rsi
callq 0x43a0
addq $0x10, %r13
decq %r12
jne 0x8381
leaq 0x165de(%rip), %rsi     # 0x1e992
leaq -0x48(%rbp), %rdi
callq 0x43a0
movq -0x48(%rbp), %rdi
callq 0x175e8
jmp 0x87da
movzwl %bx, %ebx
movl $0x1, %r14d
cmpl $0xa, %ebx
jb 0x8402
movl $0x2, %r14d
cmpl $0x64, %ebx
jb 0x8402
movl $0x3, %r14d
cmpl $0x3e8, %ebx            # imm = 0x3E8
jb 0x8402
cmpl $0x2710, %ebx           # imm = 0x2710
movl $0x5, %r14d
sbbl $0x0, %r14d
movl %r14d, %esi
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x4250
movq (%r15), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x5c46
movq (%r15), %rdi
callq 0x175e8
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
jne 0x8760
jmp 0x8765
movq %rbx, %rdi
jmp 0x86a6
movq %rbx, %r14
negq %r14
cmovsq %rbx, %r14
movl $0x1, %r15d
cmpq $0xa, %r14
jb 0x86d8
movl $0x4, %r15d
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0x86b9
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x86d5
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x86d8
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r15d
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x847e
addl $-0x3, %r15d
jmp 0x86d8
movl %ebx, %r14d
negl %r14d
cmovsl %ebx, %r14d
movl $0x1, %r15d
cmpl $0xa, %r14d
jb 0x8719
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x86bf
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x8716
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x8719
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x84ed
addl $-0x3, %r15d
jmp 0x8719
movswl %bx, %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x8570
movl $0x2, %r15d
cmpl $0x64, %ebx
jb 0x8570
movl $0x3, %r15d
cmpl $0x3e8, %ebx            # imm = 0x3E8
jb 0x8570
cmpl $0x2710, %ebx           # imm = 0x2710
movl $0x5, %r15d
sbbl $0x0, %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x4250
addq (%r12), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x5c46
movq (%r12), %rdi
callq 0x175e8
jmp 0x8754
movl $0x1, %eax
cmpl $0xa, %ebx
jb 0x8779
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebx, %edx
cmpl $0x63, %edx
jbe 0x86c5
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x8777
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x8779
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x85ca
addl $-0x3, %eax
jmp 0x8779
movl $0x1, %esi
cmpq $0xa, %rbx
jb 0x87ab
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0x86cd
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x87a9
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x87ab
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x862b
addl $-0x3, %esi
jmp 0x87ab
testq %rbx, %rbx
je 0x869f
leaq 0x1607e(%rip), %rdi     # 0x1e6fa
jmp 0x86a6
movl $0x2, %edi
callq 0x4030
movq %rax, %r14
movb %bl, (%rax)
movb $0x0, 0x1(%rax)
jmp 0x8765
leaq 0x16771(%rip), %rdi     # 0x1ee0e
jmp 0x86a6
leaq 0x16059(%rip), %rdi     # 0x1e6ff
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x175e8
addl $-0x2, %r15d
jmp 0x86d8
addl $-0x2, %r15d
jmp 0x8719
addl $-0x2, %eax
jmp 0x8779
addl $-0x2, %esi
jmp 0x87ab
decl %r15d
shrq $0x3f, %rbx
leal (%rbx,%r15), %esi
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x4250
addq (%r12), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x8849
movq (%r12), %rdi
callq 0x175e8
jmp 0x8754
decl %r15d
shrl $0x1f, %ebx
leal (%r15,%rbx), %esi
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x4250
addq (%r12), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x5c46
movq (%r12), %rdi
callq 0x175e8
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x8765
callq 0x41e0
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %eax
movl %eax, %esi
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0x48(%rbp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x4250
movq (%r14), %rdi
movl 0x8(%r14), %esi
movl %ebx, %edx
callq 0x5c46
movq (%r14), %rdi
callq 0x175e8
jmp 0x87da
decl %esi
movl %esi, %esi
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0x48(%rbp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x4250
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq %rbx, %rdx
callq 0x8849
movq (%r14), %rdi
callq 0x175e8
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
jne 0x8760
jmp 0x8765
jmp 0x8830
jmp 0x8830
jmp 0x8800
jmp 0x8800
jmp 0x8800
jmp 0x880e
movq %rax, %rbx
jmp 0x8841
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x883c
jmp 0x8841
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
jne 0x883c
jmp 0x8841
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x883c
jmp 0x8841
jmp 0x8830
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x8841
callq 0x41e0
movq %rbx, %rdi
callq 0x4380