To solve this optimization problem, we first need to define the variables and constraints based on the given information. Let's denote:

- \(R\) as the number of regular passes sold,
- \(P\) as the number of premium passes sold.

The objective is to maximize profit, with the profit per regular pass being $40 and the profit per premium pass being $90. Thus, the objective function can be written as:

\[ \text{Maximize:} \quad 40R + 90P \]

Given constraints are:
1. The total number of passes sold cannot exceed 500:
\[ R + P \leq 500 \]
2. At least 100 passes must be premium:
\[ P \geq 100 \]
3. At least 3 times as many people prefer to buy regular passes than premium passes:
\[ R \geq 3P \]

We also know that \(R\) and \(P\) must be non-negative since they represent the number of passes.

Now, let's translate this into Gurobi code in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Movie_Passes")

# Define variables
R = m.addVar(vtype=GRB.CONTINUOUS, name="Regular_Passes")
P = m.addVar(vtype=GRB.CONTINUOUS, name="Premium_Passes")

# Set objective function
m.setObjective(40*R + 90*P, GRB.MAXIMIZE)

# Add constraints
m.addConstr(R + P <= 500, "Total_Passes")
m.addConstr(P >= 100, "Minimum_Premium_Passes")
m.addConstr(R >= 3*P, "Regular_vs_Premium")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Regular Passes: {R.x}")
    print(f"Premium Passes: {P.x}")
    print(f"Total Profit: {40*R.x + 90*P.x}")
else:
    print("No optimal solution found")

```