moving logic around to llvm_api_high