// File: /workspace/github_c_makefile_star2_O0/atomlang[P]atomlang/src/pk_core.c
// Function: varAdd
Var varAdd(PKVM* vm, Var v1, Var v2) {
  double d1, d2;

  if (isNumeric(v1, &d1)) {
    if (validateNumeric(vm, v2, &d2, RIGHT_OPERAND)) {
      return VAR_NUM(d1 + d2);
    }
    return VAR_NULL;
  }

  if (IS_OBJ(v1) && IS_OBJ(v2)) {
    Object *o1 = AS_OBJ(v1), *o2 = AS_OBJ(v2);
    switch (o1->type) {

      case OBJ_STRING:
      {
        if (o2->type == OBJ_STRING) {
          return VAR_OBJ(stringJoin(vm, (String*)o1, (String*)o2));
        }
      } break;

      case OBJ_LIST:
      {
        if (o2->type == OBJ_LIST) {
          return VAR_OBJ(listJoin(vm, (List*)o1, (List*)o2));
        }
      } break;

      case OBJ_MAP:
      case OBJ_RANGE:
      case OBJ_SCRIPT:
      case OBJ_FUNC:
      case OBJ_FIBER:
      case OBJ_CLASS:
      case OBJ_INST:
        break;
    }
  }

  UNSUPPORTED_OPERAND_TYPES("+");
  return VAR_NULL;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1fc90
testb $0x1, %al
jne 0x1fa78
jmp 0x1fac8
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0xc338(%rip), %rcx      # 0x2bdc6
callq 0x1fd30
testb $0x1, %al
jne 0x1fa99
jmp 0x1fab4
movsd 0x30(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
callq 0x45b0
movq %rax, 0x50(%rsp)
jmp 0x1fc7d
movabsq $0x7ffc000000000000, %rax # imm = 0x7FFC000000000000
movq %rax, 0x50(%rsp)
jmp 0x1fc7d
movabsq $-0x4000000000000, %rax # imm = 0xFFFC000000000000
andq 0x40(%rsp), %rax
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
cmpq %rcx, %rax
jne 0x1fbcc
movabsq $-0x4000000000000, %rax # imm = 0xFFFC000000000000
andq 0x38(%rsp), %rax
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
cmpq %rcx, %rax
jne 0x1fbcc
movq 0x40(%rsp), %rax
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
andq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
testl %eax, %eax
je 0x1fb5a
jmp 0x1fb41
movl 0x14(%rsp), %eax
subl $0x1, %eax
je 0x1fb91
jmp 0x1fb4c
movl 0x14(%rsp), %eax
addl $-0x2, %eax
subl $0x7, %eax
jb 0x1fbc8
jmp 0x1fbca
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x1fb8f
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x5970
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
orq %rcx, %rax
movq %rax, 0x50(%rsp)
jmp 0x1fc7d
jmp 0x1fbca
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x1fbc6
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x5cb0
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
orq %rcx, %rax
movq %rax, 0x50(%rsp)
jmp 0x1fc7d
jmp 0x1fbca
jmp 0x1fbca
jmp 0x1fbcc
jmp 0x1fbce
jmp 0x1fbd0
movq 0x48(%rsp), %rax
movq 0x5f0(%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0x1fc1d
movq 0x1340e(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xa55c(%rip), %rsi      # 0x2a150
leaq 0xa669(%rip), %rdx      # 0x2a264
leaq 0xc1d2(%rip), %rcx      # 0x2bdd4
leaq 0xbe8d(%rip), %r8       # 0x2ba96
movl $0x4fd, %r9d            # imm = 0x4FD
movb $0x0, %al
callq 0x2240
ud2
callq 0x2040
jmp 0x1fc1f
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
callq 0x7590
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x7590
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0xc187(%rip), %rsi      # 0x2bddb
movb $0x0, %al
callq 0x4ed0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq 0x5f0(%rax), %rax
movq %rcx, 0x58(%rax)
movabsq $0x7ffc000000000000, %rax # imm = 0x7FFC000000000000
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw (%rax,%rax)