{
    "allowed_reference_expressions_for_hint": [
        {
            "allowed_expressions": [],
            "hint_lines": [
                "from starkware.cairo.common.cairo_secp.secp_utils import pack",
                "from starkware.cairo.common.math_utils import as_int",
                "from starkware.python.math_utils import div_mod, safe_div",
                "",
                "p = pack(ids.P, PRIME)",
                "x = pack(ids.x, PRIME) + as_int(ids.x.d3, PRIME) * ids.BASE ** 3 + as_int(ids.x.d4, PRIME) * ids.BASE ** 4",
                "y = pack(ids.y, PRIME)",
                "",
                "value = res = div_mod(x, y, p)"
            ]
        },
        {
            "allowed_expressions": [],
            "hint_lines": [
                "from starkware.cairo.common.cairo_secp.secp_utils import split",
                "segments.write_arg(ids.res.address_, split(value))"
            ]
        },
        {
            "allowed_expressions": [],
            "hint_lines": [
                "k = safe_div(res * y - x, p)",
                "value = k if k > 0 else 0 - k",
                "ids.flag = 1 if k > 0 else 0"
            ]
        }
    ]
}
