@triton.jit
def jagged_dense_elementwise_mul_jagged_out_kernel(a_ptr, b_ptr, c_ptr,
    a_seq_lengths_ptr, a_offsets_ptr, stride_a, stride_bm, stride_bn,
    max_seq_len, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr):
    pid_batch = tl.program_id(0)
    pid_row_block = tl.program_id(1)
    batch_offset = tl.load(a_offsets_ptr + pid_batch)
    batch_seq_len = tl.load(a_seq_lengths_ptr + pid_batch)
    truncated_seq_len = tl.minimum(batch_seq_len, max_seq_len)
    offs_row = tl.arange(0, BLOCK_M)
    offs_col = tl.arange(0, BLOCK_N)
    rows = pid_row_block * BLOCK_M + offs_row
    a_ptrs = a_ptr + batch_offset * stride_a + rows[:, None
        ] * truncated_seq_len + offs_col[None, :]
    b_ptrs = b_ptr + rows[:, None] * stride_bm + offs_col[None, :] * stride_bn
    c_ptrs = c_ptr + batch_offset + rows[:, None
        ] * truncated_seq_len + offs_col[None, :]
    for block_start in range(0, truncated_seq_len, BLOCK_N):
        cols = block_start + offs_col
        mask = (rows[:, None] < truncated_seq_len) & (cols[None, :] <
            truncated_seq_len)
        a = tl.load(a_ptrs, mask=mask)
        a_ptrs += BLOCK_N
        b = tl.load(b_ptrs, mask=mask)
        b_ptrs += BLOCK_N
        c = a * b
        tl.store(c_ptrs, c, mask=mask)
        c_ptrs += BLOCK_N
