// File: /workspace/github_cpp_makefile_star2_O2/AshOlogn[P]ash-language-interpreter/src/bitlogicaleval.cpp
// Function: ParseData bitHelper<long, long>(long, long, ParseDataType, ParseOperatorType)
ParseData bitHelper(T1 n1, T2 n2, ParseDataType finalType, ParseOperatorType op) {

  T1 arg1 = n1;
  T2 arg2 = n2;
  
  ParseData d;
  d.type = finalType;
  
  switch(op) {
    
    case BIT_AND_OP: {
      switch(finalType) {
        case CHAR_T: d.value.integer = (unsigned char) (n1 & n2); break;
        case INT32_T: d.value.integer = (int32_t) (n1 & n2); break;
        case INT64_T: d.value.integer = (int64_t) (n1 & n2); break;
        case UINT32_T: d.value.integer = (uint32_t) (n1 & n2); break;
        case UINT64_T: d.value.integer = (uint64_t) (n1 & n2); break;
      }
      break;
    }

    case BIT_XOR_OP: {
      switch(finalType) {
        case CHAR_T: d.value.integer = (unsigned char) (n1 ^ n2); break;
        case INT32_T: d.value.integer = (int32_t) (n1 ^ n2); break;
        case INT64_T: d.value.integer = (int64_t) (n1 ^ n2); break;
        case UINT32_T: d.value.integer = (uint32_t) (n1 ^ n2); break;
        case UINT64_T: d.value.integer = (uint64_t) (n1 ^ n2); break;
      }
      break;
    }
    
    case BIT_OR_OP: {
      switch(finalType) {
        case CHAR_T: d.value.integer = (unsigned char) (n1 | n2); break;
        case INT32_T: d.value.integer = (int32_t) (n1 | n2); break;
        case INT64_T: d.value.integer = (int64_t) (n1 | n2); break;
        case UINT32_T: d.value.integer = (uint32_t) (n1 | n2); break;
        case UINT64_T: d.value.integer = (uint64_t) (n1 | n2); break;
      }
      break;
    }

		case BIT_LEFT_OP: {
			switch(finalType) {
        case CHAR_T: d.value.integer = (unsigned char) (n1 << n2); break;
        case INT32_T: d.value.integer = (int32_t) (n1 << n2); break;
        case INT64_T: d.value.integer = (int64_t) (n1 << n2); break;
        case UINT32_T: d.value.integer = (uint32_t) (n1 << n2); break;
        case UINT64_T: d.value.integer = (uint64_t) (n1 << n2); break;
      }
      break;
		}

		case BIT_RIGHT_OP: {
			switch(finalType) {
        case CHAR_T: d.value.integer = (unsigned char) (n1 >> n2); break;
        case INT32_T: d.value.integer = (int32_t) (n1 >> n2); break;
        case INT64_T: d.value.integer = (int64_t) (n1 >> n2); break;
        case UINT32_T: d.value.integer = (uint32_t) (n1 >> n2); break;
        case UINT64_T: d.value.integer = (uint64_t) (n1 >> n2); break;
      }
      break;
		}
  }

  return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
movq %rsi, %rdx
addl $-0x11, %ecx
cmpl $0xa, %ecx
ja 0x10ebd
leaq 0xee19(%rip), %rsi      # 0x1fbc4
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x10ebd
leaq 0xee45(%rip), %rsi      # 0x1fc0c
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x10e1c
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x10ebd
leaq 0xee76(%rip), %rsi      # 0x1fc60
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
andq %rdi, %rdx
jmp 0x10ebd
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x10ebd
leaq 0xede2(%rip), %rsi      # 0x1fbf0
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl %edx, %ecx
sarq %cl, %rdi
movq %rdi, %rdx
jmp 0x10ebd
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x10ebd
leaq 0xee0d(%rip), %rsi      # 0x1fc44
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
xorq %rdi, %rdx
jmp 0x10ebd
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x10ebd
leaq 0xedd4(%rip), %rsi      # 0x1fc28
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
orq %rdi, %rdx
jmp 0x10ebd
andl %edi, %edx
jmp 0x10e8c
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x10e7a
andl %edi, %edx
jmp 0x10ebd
andl %edi, %edx
jmp 0x10eba
movl %edx, %ecx
sarq %cl, %rdi
movslq %edi, %rdx
jmp 0x10ebd
movl %edx, %ecx
sarq %cl, %rdi
jmp 0x10e96
xorl %edi, %edx
jmp 0x10e8c
orl %edi, %edx
movslq %edx, %rdx
jmp 0x10ebd
movl %edx, %ecx
shlq %cl, %rdi
movl %edi, %edx
jmp 0x10ebd
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x10ea6
movl %edx, %ecx
sarq %cl, %rdi
movzbl %dil, %edx
jmp 0x10ebd
xorl %edi, %edx
jmp 0x10ebd
xorl %edi, %edx
jmp 0x10eba
orl %edi, %edx
jmp 0x10ebd
orl %edi, %edx
movzbl %dl, %edx
popq %rbp
retq