# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Maintainer: Naveen M K <naveen521kk@gmail.com>
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
# Contributor: Frode Solheim <frode@fs-uae.net>

_primary_python="no"
_pybasever=3.12
_realname=python

if [[ "${_primary_python}" == "yes" ]]; then
  pkgbase="mingw-w64-${_realname}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
  provides=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
  conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
             "${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
            "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
  replaces=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
else
  pkgbase="mingw-w64-${_realname}${_pybasever}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
fi
pkgver=${_pybasever}.1
pkgrel=2
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('spdx:PSF-2.0')
url="https://www.python.org/"
msys2_references=(
  "cpe: cpe:/a:python:python"
  "cpe: cpe:/a:python_software_foundation:python"
)
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-cc"
  "${MINGW_PACKAGE_PREFIX}-autotools"
  "autoconf-archive"
)
#options=('debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-build-add-with-nt-threads-and-make-it-default-on-min.patch
        0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch
        0004-configure-add-MACHDEP-and-platform-on-MINGW.patch
        0005-Add-default-configuration-for-MINGW.patch
        0006-configure-enable-largefile-support-by-default-for-Mi.patch
        0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch
        0008-posixmodule.c-Define-necessary-headers-for-compiling.patch
        0009-Build-winreg-by-default-when-compiling-for-MINGW.patch
        0010-pyport.h-Add-support-for-MINGW.patch
        0011-configure-add-options-so-that-shared-build-is-possib.patch
        0012-Add-dynamic-loading-support-for-MINGW.patch
        0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch
        0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch
        0015-Enable-some-windows-specific-modules.patch
        0016-sysconfig-MINGW-build-extensions-with-GCC.patch
        0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch
        0018-Add-support-for-stdcall-without-underscore.patch
        0019-Customize-site-for-MINGW.patch
        0020-add-python-config-sh.patch
        0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch
        0022-msys-cygwin-semi-native-build-sysconfig.patch
        0023-sysconfig-mingw-sysconfig-like-posix.patch
        0024-mingw-use-backslashes-in-compileall-py.patch
        0025-mingw-pdcurses_ISPAD.patch
        0026-remove_path_max.default.patch
        0027-dont-link-with-gettext.patch
        0028-ctypes-python-dll.patch
        0029-gdbm-module-includes.patch
        0030-use-gnu_printf-in-format.patch
        0031-mingw-fix-ssl-dont-use-enum_certificates.patch
        0032-fix-using-dllhandle-and-winver-mingw.patch
        0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0034-MINGW-link-with-additional-library.patch
        0035-install-msilib.patch
        0036-fix-signal-module-build.patch
        0037-build-build-winconsoleio-and-_testconsole.patch
        0038-expose-sem_unlink.patch
        0039-Use-cygpty-while-using-isatty.patch
        0040-build-link-win-resource-files-and-build-pythonw.patch
        0041-fix-isselectable.patch
        0042-configure.ac-fix-inet_pton-check.patch
        0043-pass-gen-profile-ldflags.patch
        0044-pkg-config-windows-must-link-ext-with-python-lib.patch
        0045-importlib-bootstrap-path-sep.patch
        0046-warnings-fixes.patch
        0047-fix-build-testinternalcapi.patch
        0048-clang-arm64.patch
        0049-configure.ac-set-MINGW-stack-reserve.patch
        0050-Don-t-use-os.pathsep-to-find-EOF.patch
        0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0052-Change-the-get_platform-method-in-sysconfig.patch
        0053-build-Fix-ncursesw-include-lookup.patch
        0054-tests-fix-test_bytes.patch
        0055-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0056-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0057-build-Disable-checks-for-dlopen-dlfcn.patch
        0058-Fix-install-location-of-the-import-library.patch
        0059-build-Integrate-venvlauncher-build-installation-into.patch
        0060-configure.ac-set-_WIN32_WINNT-version.patch
        0061-configure.ac-don-t-check-for-clock_-functions.patch
        0062-expanduser-normpath-paths-coming-from-env-vars.patch
        0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0064-Define-PY3_DLLNAME-to-fix-build.patch
        0065-_testconsole.c-Fix-casing-path-sep.patch
        0066-Return-consistent-architecture-markers-for-python-on.patch
        0067-handle-ncursesw-pkg-config-when-cross-compiling.patch
        0068-mingw_smoketests-fix-_UCRT-condition.patch
        0069-Modify-sys.winver-to-match-upstream.patch
        0070-Change-user-site-packages-path-to-include-the-enviro.patch
        0071-configure-Include-a-header-in-the-check-for-_beginth.patch
        0072-configure.ac-Default-to-without-c-locale-coercion-on.patch
        0073-Fix-failing-tests.patch
        0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch
        0075-def-VPATH-when-compiling-Python-sysmodule.c.patch
        0076-Make-_Py_CheckPython3-extern.patch
        0077-link-with-bcrypt.patch
        0078-correctly-find-native-python.patch
        0079-Add-extra-flags-for-_bootstrap_python.patch
        0080-posixmodule-undefine-HAVE_OPENDIR.patch
        0081-getpath.py-add-support-for-mingw.patch
        0082-Don-t-build-_posixsubprocess-on-Windows.patch
        0083-_ssl-link-with-ws2_32.patch
        0084-Always-normalize-path-in-abspath.patch
        0085-Include-winsock.h-when-checking-for-netdb-function.patch
        0086-include-_multiprocessing-semaphore.c-on-win32.patch
        0087-configure-build-mmap-module-on-win32.patch
        0088-venv-creation-fixes.patch
        0089-move-the-shutdown-function-where-winsock.h-is-includ.patch
        0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch
        0091-configure.ac-fix-building-some-test-modules.patch
        0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch
        0093-Always-convert-to-before-passing-though-pathcch-func.patch
        0094-Build-venvlauncher.exe-from-PC-launcher.c.patch
        0095-getpath.py-fix-dirname.patch
        0096-getpath-use-normpath-on-all-generated-paths.patch
        0097-pathconfig-normpath-sys.path-0.patch
        0098-smoketests-add-some-tests-for-sys-site-paths.patch
        0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch
        0100-Build-and-install-libpython3.dll.patch
        0101-Port-GetPythonImport-to-mingw.patch
        0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch
        0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch
        0104-Add-missing-library-for-multiprocessing-module.patch
        0105-selectmodule-add-support-for-MINGW.patch
        0106-readline-disable-on-MINGW.patch
        0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch
        0108-Add-lpython-version-while-linking-stdlib.patch
        0109-Enable-_uuid-on-MINGW.patch
        0110-Enable-curses-library-on-MINGW.patch
        0111-mingw_smoketests-disable-distutils-related-tests.patch
        0112-mingw_smoketests-skip-test_c_ext_build-for-in-tree-b.patch
        0113-configure.ac-use-autoconf-2.69.patch
        0114-3.12-gh-114440-Close-writer-pipe-in-multiprocessing..patch
        0115-3.12-gh-115133-Fix-tests-for-XMLPullParser-with-Expa.patch
        0116-CI-clean-up-ignored-tests.patch
        0117-gcc-make-incompatible-pointer-types-as-warning.patch)

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying ${_patch}"
    patch -Nbp1 -i "${srcdir}/${_patch}"
  done
}

prepare() {
  cd "${srcdir}/Python-${pkgver}"

 apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
  0002-build-add-with-nt-threads-and-make-it-default-on-min.patch \
  0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch \
  0004-configure-add-MACHDEP-and-platform-on-MINGW.patch \
  0005-Add-default-configuration-for-MINGW.patch \
  0006-configure-enable-largefile-support-by-default-for-Mi.patch \
  0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch \
  0008-posixmodule.c-Define-necessary-headers-for-compiling.patch \
  0009-Build-winreg-by-default-when-compiling-for-MINGW.patch \
  0010-pyport.h-Add-support-for-MINGW.patch \
  0011-configure-add-options-so-that-shared-build-is-possib.patch \
  0012-Add-dynamic-loading-support-for-MINGW.patch \
  0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch \
  0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch \
  0015-Enable-some-windows-specific-modules.patch \
  0016-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch \
  0018-Add-support-for-stdcall-without-underscore.patch \
  0019-Customize-site-for-MINGW.patch \
  0020-add-python-config-sh.patch \
  0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch \
  0022-msys-cygwin-semi-native-build-sysconfig.patch \
  0023-sysconfig-mingw-sysconfig-like-posix.patch \
  0024-mingw-use-backslashes-in-compileall-py.patch \
  0025-mingw-pdcurses_ISPAD.patch \
  0026-remove_path_max.default.patch \
  0027-dont-link-with-gettext.patch \
  0028-ctypes-python-dll.patch \
  0029-gdbm-module-includes.patch \
  0030-use-gnu_printf-in-format.patch \
  0031-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0032-fix-using-dllhandle-and-winver-mingw.patch \
  0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0034-MINGW-link-with-additional-library.patch \
  0035-install-msilib.patch \
  0036-fix-signal-module-build.patch \
  0037-build-build-winconsoleio-and-_testconsole.patch \
  0038-expose-sem_unlink.patch \
  0039-Use-cygpty-while-using-isatty.patch \
  0040-build-link-win-resource-files-and-build-pythonw.patch \
  0041-fix-isselectable.patch \
  0042-configure.ac-fix-inet_pton-check.patch \
  0043-pass-gen-profile-ldflags.patch \
  0044-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0045-importlib-bootstrap-path-sep.patch \
  0046-warnings-fixes.patch \
  0047-fix-build-testinternalcapi.patch \
  0048-clang-arm64.patch \
  0049-configure.ac-set-MINGW-stack-reserve.patch \
  0050-Don-t-use-os.pathsep-to-find-EOF.patch \
  0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0052-Change-the-get_platform-method-in-sysconfig.patch \
  0053-build-Fix-ncursesw-include-lookup.patch \
  0054-tests-fix-test_bytes.patch \
  0055-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0056-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0057-build-Disable-checks-for-dlopen-dlfcn.patch \
  0058-Fix-install-location-of-the-import-library.patch \
  0059-build-Integrate-venvlauncher-build-installation-into.patch \
  0060-configure.ac-set-_WIN32_WINNT-version.patch \
  0061-configure.ac-don-t-check-for-clock_-functions.patch \
  0062-expanduser-normpath-paths-coming-from-env-vars.patch \
  0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0064-Define-PY3_DLLNAME-to-fix-build.patch \
  0065-_testconsole.c-Fix-casing-path-sep.patch \
  0066-Return-consistent-architecture-markers-for-python-on.patch \
  0067-handle-ncursesw-pkg-config-when-cross-compiling.patch \
  0068-mingw_smoketests-fix-_UCRT-condition.patch \
  0069-Modify-sys.winver-to-match-upstream.patch \
  0070-Change-user-site-packages-path-to-include-the-enviro.patch \
  0071-configure-Include-a-header-in-the-check-for-_beginth.patch \
  0072-configure.ac-Default-to-without-c-locale-coercion-on.patch \
  0073-Fix-failing-tests.patch \
  0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch \
  0075-def-VPATH-when-compiling-Python-sysmodule.c.patch \
  0076-Make-_Py_CheckPython3-extern.patch \
  0077-link-with-bcrypt.patch \
  0078-correctly-find-native-python.patch \
  0079-Add-extra-flags-for-_bootstrap_python.patch \
  0080-posixmodule-undefine-HAVE_OPENDIR.patch \
  0081-getpath.py-add-support-for-mingw.patch \
  0082-Don-t-build-_posixsubprocess-on-Windows.patch \
  0083-_ssl-link-with-ws2_32.patch \
  0084-Always-normalize-path-in-abspath.patch \
  0085-Include-winsock.h-when-checking-for-netdb-function.patch \
  0086-include-_multiprocessing-semaphore.c-on-win32.patch \
  0087-configure-build-mmap-module-on-win32.patch \
  0088-venv-creation-fixes.patch \
  0089-move-the-shutdown-function-where-winsock.h-is-includ.patch \
  0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch \
  0091-configure.ac-fix-building-some-test-modules.patch \
  0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch \
  0093-Always-convert-to-before-passing-though-pathcch-func.patch \
  0094-Build-venvlauncher.exe-from-PC-launcher.c.patch \
  0095-getpath.py-fix-dirname.patch \
  0096-getpath-use-normpath-on-all-generated-paths.patch \
  0097-pathconfig-normpath-sys.path-0.patch \
  0098-smoketests-add-some-tests-for-sys-site-paths.patch \
  0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch \
  0100-Build-and-install-libpython3.dll.patch \
  0101-Port-GetPythonImport-to-mingw.patch \
  0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch \
  0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch \
  0104-Add-missing-library-for-multiprocessing-module.patch \
  0105-selectmodule-add-support-for-MINGW.patch \
  0106-readline-disable-on-MINGW.patch \
  0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch \
  0108-Add-lpython-version-while-linking-stdlib.patch \
  0109-Enable-_uuid-on-MINGW.patch \
  0110-Enable-curses-library-on-MINGW.patch \
  0111-mingw_smoketests-disable-distutils-related-tests.patch \
  0112-mingw_smoketests-skip-test_c_ext_build-for-in-tree-b.patch \
  0113-configure.ac-use-autoconf-2.69.patch \
  0114-3.12-gh-114440-Close-writer-pipe-in-multiprocessing..patch \
  0115-3.12-gh-115133-Fix-tests-for-XMLPullParser-with-Expa.patch \
  0116-CI-clean-up-ignored-tests.patch \
  0117-gcc-make-incompatible-pointer-types-as-warning.patch
 
  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # Upstream defaults to -O3, so we can do too
    CFLAGS+=" -O3"
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    # _extra_config+=("--with-lto")
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  case "${CARCH}" in
    i686)
      LDFLAGS+=" -Wl,--large-address-aware"
    ;;
  esac

  mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

  ../Python-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --host=${MINGW_CHOST} \
    --build=${MINGW_CHOST} \
    --enable-shared \
    --with-system-expat \
    --with-system-ffi \
    --with-system-libmpdec \
    --without-ensurepip \
    --enable-loadable-sqlite-extensions \
    --with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
    "${_extra_config[@]}"

  make
}

check() {
  cd "${srcdir}/build-${MSYSTEM}"

  # Some basic tests to ensure nothing major or MSYS2 specific features are broken
  ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
  MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
}

package() {
  cd "${srcdir}/build-${MSYSTEM}"

  make -j1 install DESTDIR="${pkgdir}"

  # gdb pretty printers for debugging Python itself; to use:
  # python
  # sys.path.append('C:/msys64/mingw64/share/gdb/python3')
  # import python_gdb
  # reload(python_gdb)
  # end
  if [[ "${_primary_python}" == "yes" ]]; then
    [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
    cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
  fi

  # some useful "stuff"
  install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/

  # fixup shebangs
  for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
    sed -e '1 { s|^#!.*$|#!/usr/bin/env python'"${_pybasever}"'.exe| }' -i "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default aliases for all scripts/binaries
  if [[ "${_primary_python}" == "yes" ]]; then
    # Default names are aliases for Python now
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
    cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
  fi

  # delete anything that could conflict with the primary Python
  if [[ "${_primary_python}" != "yes" ]]; then
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
    rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/libpython3.dll
    rm "${pkgdir}${MINGW_PREFIX}"/lib/libpython3.dll.a
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
    rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
  fi
}

sha256sums=('8dfb8f426fcd226657f9e2bd5f1e96e53264965176fa17d32658e873591aeb21'
            '6c5823575f95eb6b90fc3af8e41a21a751a5eb468d577ffeb2cfa208f22eac21'
            '974901e51bc56dc6c4491268b70097ad2da3cd143d3b901262244d6311be1647'
            '8829bf445930c4a9d291e57f0c685d7b0eb5d55a4affd2f3f5fe379888b0021b'
            'b48031bff04737b328666576b0aa00317f4ab65461ada8f1287e7736b33e421b'
            '85af01023d3f0d3031eccfe040ceda80a89db36e73834c1f6c6b79f5db63ecc9'
            '0385461974ed561c829b07c5a03f7e8ababe61aec1752bf9815ada85c2266522'
            'b1df0b35c0ebe1f9c9af8b9869b3252b3dac3a29b4f969892bce40c54dbd54b3'
            'aabed2633fb1e16ce13bfb80a2b4c3dd092ad75a723d68f960a423e85f3597e0'
            '9cb6958cad84f20b214f56d296bbd62ca4b471359506ed448029cd7d17fb6385'
            '39698aeb0b7dde92d51d65376a2ea82da433e0dfde28b3ddddcfc8139c71e999'
            '17b29ab32edbaab2d8f3f85789cdae0fb39f724ae8ee6cf74e9c25ab679e9b6b'
            'f73a3257ee245da2dab835eed109f5302c2d86e3c5f82f6ed59a61e5828ade4c'
            '9fc2f9f6fda4c0a9109d0fb8c5cfb040d52c2320160d8c42ac33c46cd557ca0b'
            '9efd32e2e4a1a2dc97982f9a4d3de058264d26d16f4c4fc7971f901b86ac7fce'
            '4f7fc3b3cb9e79aa150e31dc45b7188a165d9f99718bc83923b8fa7284d1a2e8'
            '55fcb105f3edc18a58500b456b93bf8f52e3bc4371a5f1ac9b71f5557b84e175'
            'c4cd31cff6d102b23b05cd307c3843a8084df8e7cbc6926bee869d227354139e'
            'b19e6969a854be6cb559a668e511f92f6e483e077ce76319823cc88c1bf137dd'
            'e3816a3e35da68331b5798971bff7b4fac8659bbe2fbe51ab42318892eac651c'
            '4b38722139d674cd43769ee6a809a066dec29a5cad6f496271c7a3c5b286cdef'
            '7ab904dc6f2dd20e4a37de41d2b068fd01a8b2bcaa8f26ab9de47bfcd0af29eb'
            '5aa635ba408c3ae3ef99085931e68510737d42e14aa20a1aaa062e8bdd56e18e'
            '6abd089d6e5765c1fb456cdc2a83d4cd109eb0218951746a42c6666de8833b13'
            '7eb3a4f85d24f8fb3a19615943ac8bce5b22abb1a06e5ff1f3a814200f0b4b64'
            '9896e323d525fa374e57743cd02518e0ab7088e98af8dead1fe6761c4afb85ab'
            'f77293ab63decb3c67aab838e8e6ef4ce5b8226cdf91f0951b1497a52720777d'
            '995cda1be8d68cdaa2287388f7b053a5d36dd8e369a5d6ab87d499bc7c6d5f0e'
            '7b33479166b802cf5d04306eca18405e15383a6da5b364a5e1dad255770192a3'
            '2394beace7839129db69e5cf988e45eb32bed6795a68249a507f8d8793bfecc1'
            'eeb068fac16b6c83955331c174f5d4e12e6bc8d61ac08e07b112f6e7047f1879'
            '901fcb3b71fef5df9eb8ccce84a819683d5c2ec5b6e9b827ca70355b13e1d8d8'
            '406769f09a81860de41ae55497426f62d6291193efc9e166dda31360039aeb7f'
            '841e265ce5276bf7cddddb988b3cc612c30874d0bc630fffe3a0ef895388784a'
            '6529bd2bb410be421f20738006a060bd0a5efbe4a2bcfc3f1be2d36e3af434e8'
            '0bfc586f4c2608875a9a9c080f2a2562954ec4f52793e2b591af0ee8e981af88'
            'bc46aee3fc5951b907ad70fc7d996af50caac04f955effdc2eb6520f4a06b795'
            'a7aff6d1611455462bee252f87b3c1311121c641013285ad9feff2a8c6bd4ec5'
            '4c052cf9ebaf1e201a1df0f8f882488f353e3c7d9c85f13fca0e44e6d4f35e9a'
            '5793ca15086e913810fb61c9d7ab54281d5e40c39e0abe940ab86518b5425c2d'
            'bdefd9f00bd72acd348e9e7ee7a6faa450648ca7e5199db72c150f695fa0b7c4'
            'd0a28482b42b057c0b0d536b76604d4c52dcfcd8bde97c7026d14742bf4cca0c'
            'a2d070fef8174fad9c23330f12b29687ec873a83ce75fc0d43b8616a92321b79'
            '2c9e1ff6ca6936311732492a66445e1b9635ed5ab12fac3d55216b4972c49ee4'
            'ca95b16a0457fff45baebb3dff59c216e97d059cb3c13fc2c55268474225bc99'
            '53f75c6b78091ae49c1e9c102eac4bd540593be5808a715e5848d281c466c93a'
            '80e792e261fde2e44b7000bb0cacc7aff50e92de3d5cf81fc27bebb07de752e8'
            '9b64fd7eb17d4dae659016afd56f9e4528957ddac16de70e89e7cc1b5f048146'
            '64db622bf6b55360294f40dac787a3b790c3fe388222b6d9d3b5b14465ada35b'
            '4b31f79cf49dfa993d7dc96950ceab8dc492e42b244b403856d2658ceacb66f7'
            'e555e05fa039d6d631e8cc6bc7b1f81b23c86d386cdd8054f2ea7ad2ac09bd9d'
            'db10596451811a2e809f766dd7c7a8bc20c2f6e7cc697ce99b37c91e2f21397d'
            'dd1d6604e7a044187952e4510c9ef522325887434d0083f34e36cf061493db26'
            '9d199724bc9b2df5188d0511e629908ab1af74bbf6b83a43f956ea91eb1e61ca'
            'f50523ac8910e6bbcccd3fead5661336fadc081fb156e275ca32b5114c43f486'
            '874fc8349df235cc0aac86573df342568f2a20d198076a2a57cad97d4b3a3e92'
            'a5f0a463be5f46e1c582d06cd43c288369a760e22cdf5a30558c20b472b7fb0b'
            '4cf015d3f76d8156ba7298e651a8ad349145778e63e6bfceced6f5952b4bd9d3'
            'de7ab0b941c846cdf20354fc17fb9713b5e6b68af06f22ad12421c83a8756a4f'
            '6a1fc29b6266e23012bbf9a6c47cd632721e7411e6ecb56a03665ed41b285dec'
            '944205af4998130e70819ca9914576a74fbaf7c253a4d52dc437eacfaba6aed9'
            'ee4a089073fabd8c9bbfafa75a7979d08eaf375e673ba8e7a4e790980347c4ed'
            '36b8c5a12f00434f399003f2075e4f1362b0d3208b6ddac584d96542c0dd63db'
            '4817828133facc9fbe8da5b9e51d3679b73068f53e4ed1ec85de12a588f02110'
            '31ab086b18bc84bd8aee7d9d9f10e3994f6a963743eeeeb1e7e60d23d11f5161'
            '0562703c27272ad3590666b5f561ab1aa2e1fac5e17d54ee6ceb5f8c8457b781'
            '2b54f9ecfa02745e2763f8c7e6be090348a7b31be2f3ea4ff155c7ca864cfa43'
            '5194630766cc3317b627020de13cf3b316d2c98ab532567d7e7f52ad2ea21d8f'
            'a3cdd52975a4a08e37db8f64f167ffdd571c453c4e33980fa3e80d446b168b9f'
            '7c549c11edb177dad4df5ae13c0471d209fca3228b53d2c4ef689749d9096a0e'
            'dc3d8f3d20964a3930baaa5ebf46917737b33abac2e8e298bf5b5aa052dc8179'
            '5adb594d450e499d6d81cb029180627a58ed1be8750f9bbb41c1225227da16b9'
            'cb497acfca1400081e853f7747d3e0d83fa847d9258dc839070b6bbd386e699e'
            '233041bfd389c7c1b59b76575de68d18b50210d804737b442bd96b007003449f'
            'dc86b127566c6da91bf5cbdebafb15fa9823c9e048592eaae65b967413ea3c65'
            '9438225342a441557d5434d7c3d077dc20fcf1aeb6246c7deb86387d665628e9'
            '1b2770cd03232ec8c74abc8997a8415451ae8858da51aec755e8b9670b899116'
            '1672402e935fd1bab3c338b53bd2affa6c9b2faec807cb5579593d9272b82b2f'
            '79891611c8a0877ad6e05bf1c0899ee8f86859db53801b85b9fdc91df7fea9c3'
            'f649d891f5e454a50bdbf14dff4afa76e33df93ffdb2c65b9e55766479ca0957'
            '1aab6926fc625ab921d591c8018c40731722cbd9901e2c5dc2f903cb89a14331'
            'f71a61882d89447ced9928ace3c8458f8845485e66d198e344f3e1dbe97e4e6c'
            'd98bc94e23482472aeed37961545914e6cb197972999753f29d1f9894c876e01'
            '9463f117d07a80c02f019e065e582a312efdf12e193cd7217e74e389a2f2fe3e'
            '7821d6b2fb50da634e67ce2397538c0b2ab5438f03eebe6622d95c7f89a078c9'
            'd67b4e9185e539eaa0cf149c4f668c4251848cd608d6d80b12c88e8f6468f5f8'
            '5de364962e82bca4cceffcabcba2617535f6004f92b57ed316d5cfa82421ecb2'
            'f2036c41acd1dae55ab80ca8fcc48c8c1127263a755736655baba3ab279182e6'
            '65dd7bad62e60d321bd0bac9a200fb4ddebf75c05ec7ed2a9c4530a36a4c74eb'
            'b73e0fd84616466e13dc18711f76f1d02ec2b33fcb85479a5b55655116a11464'
            '7a7a1206ea71ecdd18051679c3eb8c466c7d9f4e598e06fce84a625c40587ca6'
            'adcc06e1e2adfe34b4fa8bb6e5c41b97596afb373e65aa5f6fa03cfe78fb89e4'
            'dfbd82deaa19f2a9baafc5601ba4d6047c2bb5d4a4e956a7a082287ce486b1ec'
            '219cfd1f6f35de824084ca5186becac10a32bc3d0c0178a49cd58859b7c065d5'
            'e4c0d521127b49fffef50da9320cff2dd762f148c1d1b2e204237450ba522065'
            '962ee212b159dccc9e44aad6b565efca41c5d4dba3ecad83fb24009b263e796b'
            '596c0684268adaf5cdf820f2c55b8b96d39c15c7707b0e443d5d14b4a883241d'
            'd77322b2e6bc5ce7ae36d710081edc933085e4010595b92f2fe5793e1c60ae75'
            'ba3cc1aafa3e046d856e13054cc8d9dd14ce98fc53d4f854a0788b81fbb2839c'
            '94f1d0ac6c29059a3e21f7495d678bf71ca8fe53cc9eed0003cbfecab01a4806'
            '329f83b7f7aac69f65124595e339cf908677075e56d6a3121b15039e159d1da5'
            '58ad318f885a5fe76fcb9bbc5cd2c3e8b39ec4170348e8018b3259d6996c9f05'
            '76e970d55dc3d61c203d05008d4771da2e9808548444e347d5e2c8b2d7654299'
            'b290144e98300fc88cf19e6c9bf33b4080f6dcc437f3f5323662c5ffb0b32045'
            '59b155e6597e3be2b9188e7b7468381d7d65c6e4aee188cdacb5eebaa695f071'
            '34caa4c8e68f970a031f65bef0c2e4e6dd97d6fb6e13da9121069840cfd6bafa'
            '757c0a45fd77ddb74f91cd141304d5fb0530ff8c52809d133c679d32c9c8326d'
            '922101eec57956f4c6a52522e87d3755c52cfe90e68186b1b480424455c8efef'
            '54c1abee4b13278090fd26a7b725c10dbeee0d8deffc46843be031f9b824364b'
            'e745ad7e0b75a858d1b1755d845d20cf5d70d10309ea68c9067a287991866726'
            '2ec6b6c7c64ae20b2e53a43cfba93eb03b8971dcb92bddddaf8d4c3df2e43520'
            'ccbdcf61a06f0a1a4fbdc78f03c4ecd449c3793c07e117e6d9c2f80b197f151c'
            '72fd7b38599091fe73028cddcda1223d2359832145a7cd0b5a3f1e28de96ebf2'
            '7a9a917e64d8e0b01b3be4fc1144268eb8bf55faf4cf69b59dc95483e6350231'
            'f2dab1281f7e64aba1eca657b7c1f87a5facbc52edd57bc00c4f3d81a2e1cbaa'
            'cb37d5377f0ca0411da99749dc2fee0c5edcb81bb8162fa43fca164590c84eaf'
            'a343e4063d59cbc7f4837dd0b6ca30b89c5887c33bb82acf05d3774e3553533b'
            '67cbe0824f78a6c71bade9a79cbc4d96dfca4abafb6a38c621b18cabb91359ec')
