// File: /workspace/github_cpp_makefile_star2_O1/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 0x12c2b
leaq 0xf0cb(%rip), %rsi      # 0x21be4
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x12c2b
leaq 0xf0f7(%rip), %rsi      # 0x21c2c
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x12b8a
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x12c2b
leaq 0xf128(%rip), %rsi      # 0x21c80
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
andq %rdi, %rdx
jmp 0x12c2b
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x12c2b
leaq 0xf094(%rip), %rsi      # 0x21c10
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl %edx, %ecx
sarq %cl, %rdi
movq %rdi, %rdx
jmp 0x12c2b
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x12c2b
leaq 0xf0bf(%rip), %rsi      # 0x21c64
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
xorq %rdi, %rdx
jmp 0x12c2b
leal -0x2(%rax), %ecx
cmpl $0x6, %ecx
ja 0x12c2b
leaq 0xf086(%rip), %rsi      # 0x21c48
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
orq %rdi, %rdx
jmp 0x12c2b
andl %edi, %edx
jmp 0x12bfa
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x12be8
andl %edi, %edx
jmp 0x12c2b
andl %edi, %edx
jmp 0x12c28
movl %edx, %ecx
sarq %cl, %rdi
movslq %edi, %rdx
jmp 0x12c2b
movl %edx, %ecx
sarq %cl, %rdi
jmp 0x12c04
xorl %edi, %edx
jmp 0x12bfa
orl %edi, %edx
movslq %edx, %rdx
jmp 0x12c2b
movl %edx, %ecx
shlq %cl, %rdi
movl %edi, %edx
jmp 0x12c2b
movl %edx, %ecx
shlq %cl, %rdi
jmp 0x12c14
movl %edx, %ecx
sarq %cl, %rdi
movzbl %dil, %edx
jmp 0x12c2b
xorl %edi, %edx
jmp 0x12c2b
xorl %edi, %edx
jmp 0x12c28
orl %edi, %edx
jmp 0x12c2b
orl %edi, %edx
movzbl %dl, %edx
popq %rbp
retq