# 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}.5
pkgrel=1
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-CI-clean-up-ignored-tests.patch
        0115-gcc-make-incompatible-pointer-types-as-warning.patch
        0116-CI-normalize-path-in-test_makefile.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-CI-clean-up-ignored-tests.patch \
  0115-gcc-make-incompatible-pointer-types-as-warning.patch \
  0116-CI-normalize-path-in-test_makefile.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=('fa8a2e12c5e620b09f53e65bcd87550d2e5a1e2e04bf8ba991dcc55113876397'
            'c25c4d3b262438814ceefbc938f7710766071b541f5e46c017162b1cf564a59e'
            'cacfd20cd8d5050d92967bd7f73fed374fe051ee0a8e44e5edbc2ac2cf21b5c6'
            '2f9841e5eb70404d20b4fb0fecf95b75438e50ae6b0080e370edb1fd6f58b710'
            'c7fdf7fe1d3fa68495dcce49b8456f4da288c6d7b919f535c0888cab99f8bd77'
            'a377c41bba88659aa9ba52710ec93b466ddb0948b535b8166731042aa9b6634c'
            '18485e3197aeb4b88e32d91a92b1895aa6fc41a88fe1f7930237676dea1c7d43'
            '98bc8fe39d01c47330056e9ccf61367858eca788f051036814ede2ea1e9f9134'
            'bf853393ef38f83cd875ac8bb7ec5abfbe3cc9532010458c05b28e40da8c7fb4'
            '810e1d7fe6599e380baee7ac9b0dbf8a0a565c56ebd62a442c205a366dcc15c8'
            'f1fe09a03acb12163f8f219d902c605ffc6dd8b2ab871fd9d6ecca77155991ca'
            '671c8a85556ddc20d011ee69e9a5c49ababed9892d9727f34d4a0b479684717e'
            'f919795a736ebffb5eba27caab369ca9d9d306e79139c66654d1ea626b630c2a'
            '0931ff6f5b749a1286faf6ea45722adec4a81c4bc44d61e201640d37d2df8696'
            '360b54765b0688e8e472aa38dc5e3c0b2b8565398d78c8580e00a9d1967086c3'
            'f14bc2b07e512b1615a6d04f9bec7e1abaa52be4df06ae408e1699520112fc91'
            '4c1c096c5717bd0d0b43d4ca2997df61f73b678bd88797d65a0cd9af6681f036'
            '6eac3c3975dd6792201de33432592d43373a5b24dc39c033b59a7eef9583fa21'
            'aebb3ad40380da3f5fc2ff3612c8a99d287edef62bc6cdb79a9dd8289d14e570'
            'f437d1360a4ffccc865c594d902712a1a1cd7e67160e59afdb97bfe9d26b6251'
            '8841bed95aba2b7e532a4853d36bd7ed43116778c017787e40b8f055066de211'
            '25c5cbf1ea24b2c24439c499c9c6d349c0b4c34f673cddfa2fe7906d74f299c8'
            'c9ff01f5531f083a8fbc86603df07d06f2829e97e620300463b92e2789b918d7'
            '41480c96a6b4d3de413373772bb79402cf6543cc3b8972c1a47f87d24fd00e12'
            '072d56ca654dea5aad415359876853abdfbe1d9eea7ffd985692fc56ab79fd77'
            '88b67f7cda7eb56273f5886798f9cf6f27c7b9544827b8467b1f98640dca6331'
            '425e3d3a770ac8b88dc70435f6825a03df47df5b3485dc7b94a1fcfc7702814b'
            '532c7ebd7ec9e3af5082dba46cd5e6b34c41ca9e83ac6beb0ef2bab4f94f087f'
            '56813d3d6065fc08d76ed89ac746ffccc23759ab9a3041a0df6413cef6974a4e'
            '889ab9286669db4d5171af3fd20e54de4fe7e0f91cc62e25ec22ab7d8bd529fb'
            'c53a86ea2b42184975001c3cebac90c8ccd1c253d44021a8e565849d2d9c259c'
            '2334dca72beb517c8e76b12a10745f809dfb6e0d85e4712505e854c78930a3ab'
            'c214dc5380fb259a9a8d503e9988f1ba19407ff0a9e061f684c7f615438eb58e'
            '67f31b192cd8ddcf55a2152ecc9fad242880f4302ffcf58bfd995f6209d63879'
            'a19f7140dc0b2b36dcac893f65b098d1eda84bce9e33c0188e9054bf15f33a06'
            '232c284456215c866aef0aa55b14598f476ab14b2ce5a66afca73d92060bdbb4'
            'bcbbdfc2131b70b3267339273b8f93565e898d02eb95d794afd978ac1548c742'
            'd1c626aae31940b7f537c0188b84a094e83fb7819ea9ec223251a5417e43eafc'
            'eba32acac52825d19559371e6755fbb2c67315198b15263047bae2fe8f70e31a'
            '7726fa0cece07869a48057bbffb2f8d861700210e336bbea861c580bf318e791'
            '021b4424c1bb7d10a53ae33050179104204b3fe523ca06b2ed81d58848fe856e'
            '341e1f13f59c051f4c727d7d7372ad40adad7a1d591a19d8fe28727a00052ee1'
            '107f02abd8a019a98a8dc880c3b599c7858cbc5d749a5330847b1ac60d986c79'
            '5692833312d6da773f787e4b70c5bd47149899b7457330789781085b57e3cc30'
            '02a22cbee10484d7cc122597388dbaed10e9ed1ec2d38f12ea40e418649be094'
            '2221057d7a26e5e97abc71a71a59d0a127adff24cc60641ba7becfeafa5fa486'
            '8bb9afa628c843793cdee86688ffede2b736ea8996a120d03fcd709980f9a824'
            '7e4e3f7d46cae8fcfe4fd5e26eff96cd1f182b5e0b7e67d760ffbba9389f8c51'
            '563b473ec3f64749c27abfd479de09b0fba1f3f1e1ecb10a526dca1a221ff576'
            '1a70c15f0a11bae576b1477d196a3209b7bad9253154d7ea86d5fbd2fed31810'
            'ad45e88d6d8e7c1f161767be3a4854cfbb8065a8467fd99e2e1c9b6d41989794'
            'e21280e92fd3ded0cce162f8f4b44e9d79b72c47052b2cd756402be96cce7a07'
            '1e37855c0d2e14acb0c9f2991a5138d6c2335d75e44909664ea86c0ba8ba00c7'
            '2b12fbe9f868245ccd785eba0564bc00f66cafd97d7e66d0ddb4beb837ccc809'
            '675648f73d9e31f5fa9f83c2d1598d672ec21cf3b95ae97f71ea51373cb717d8'
            'a4a5c68d4d6db89c402b34dd736ce17e3b7b16843d3bf9bde2cd7fa56fd3bf4b'
            '49f0791da90b9419e8e026ca9ddb85629575545f4dd802f89c008ab7da31580f'
            '6b88645adb09c36c81cf122e55e690a20619e1462cebe5e5a3de0ed0cc979b2a'
            '6b74aa57b62be98d6d438ca79e3da066cc1a3d5866fc4d5ad270c4a7c759c7c0'
            '1cebaf432ed2a346a1303781d0dd41f4a7053c9f755213d04a76bab04b520c7d'
            'c1d39a8f84cfab4c001dda4123a8828acb4d72a2d0ec5c13f700c28270e763f0'
            '8a5c71412680c15c83e66d8cf12de4b9be0e6941ac7061257cc6e13cd7dfb4cc'
            '2503e4116a83fff438f942c983077b23f9e8740b91b4e11e11fe5f872173f753'
            'a48251fcde2022444439e5505944788474e2304ccadb445ded4d93bdee7b5735'
            'c0fe721440973292a1af4754ee616c1b85d4061c97ccf9007fc4f9e6d734c4e7'
            '7e4acb32e3f54f44c548021553aeb58d4c092217d667b2a3481ce914075bae6c'
            'fb8445182d46bba8b670c8321d6caa67d92cb32d485300d9b60e74ff59f70d13'
            '2c1fc34f2fd4dc204107c55e1ae3770225a144762d43e61365b8ca86579a4942'
            '8e171b146158518aa659f2cb7bddc16719cc03a8c66b8ccd5753f8f87e79f94f'
            '0b5f40ef0b636941ec3fbb23bce1d3f48d2461bbf8ddb71df63cef160ad4d0d6'
            '293db09c835a4703ff44361f1a8f5461260e91d973c34fd59451848e3022b14e'
            '2b41f60ccbcf90f8ab1bfc4bcbf4eb156972c2e9d50ed07d9c2b1392e4702554'
            'f0587036c6cd7baf01d7515e7502b3f235aaf1182a4fc1014acec786eea8e19b'
            'a2f1329b3b7d0983e8de53af12526effedd6fa4436516069c52873fb180ae322'
            '060bd4d6ff899c2ec26056b326e87bfc7db8ef2c3fbedec0884bebce2d29622e'
            'b36e5217dc0e90608abbd3b9d06bf4b66e9b660b59952e9e9e089f3aa4a0f232'
            'e9267b0e1e41fbd8f09e623db4baba0fdbd8d0f5dd68028e983a54fdb7142898'
            '4303115f760a8c3aeed02a756626f44ebf0195fcd3d8d4d57685bfa418d3916e'
            '22a975e989cf315e4a5e1ccf00975482355f0ea1d9a01175a10b4c517afe371c'
            'daeb68eade973f185a13cd56a490efdf4de50b01cac21a4c81ca507a6f0468a1'
            '7f608dfd39f57a0354d2ff129808323847240ea1c812144ccfc80bbeb2debef9'
            'bd853e3207d6a00a8b13efd6c65fcc7179fb58dd6cf7d9fea6c25a4ec66a1c63'
            '9b50f116b774cbbedc18f8842a10553c0c2ff1d4d1c377dc955a55bdf9d913db'
            'e049c06e0071e09a4c3fba2689abf2eaa0f27cdf2e2e87cd91886e33ade4493c'
            '15f413de6a2c0c3b1c1f1ff6e5a1f826c2380dec1680837bc7d7cdd66d8e8b2f'
            'efa4175539b2aaab3d7cbb6612dcffe92ad832eb6f55d7592cbed21a91b8a70a'
            '2a59e95a378839429b641572bac2da60f9c231a92387b3d6056d09edeaaa2656'
            'b67aa678f2ab263b8400de5689556d10bf1ac245f5ba09668431ff7ab7bc7275'
            'ebecb789440ab81229004250718569b4925648d755bdaf4cd3c325dcefc1630a'
            'ab0457fbb31ae51fb83fe8701a6f206ed25c1b48c9c51cca753e54dc9b602198'
            '404b3eb4a1b490de63d2eb605a4c8d21852031659aeba794e0a83cbb9947f6fb'
            '22497ac33c46f899d83d9267d4b3b78be6ad513f287afe5c7a097be5bf9f1a95'
            '0d0d21e63cf033337a49c72003dc1f9db2cbd5f9b0862cc01e3512b313fc5523'
            '669ca04b047289be486c6663fff15dffb0d68ce7024d084b1b0784e6e509f4c3'
            'cf437a540dfdb71cdffb6313e0877d46d2b753872b6c985bed15c2e8e1bab2c9'
            'b5f1581890272e4b79b1a708b96f367091834587a18fa76cd76fabfc8925b09a'
            '7fb7a91af74fa5564b9f48c5907ee8d63cb1c59d1ceb0a15e1ad2e744983e0cd'
            'fac78a18ca32a8184c309b2a43781ebae516e9d000d399f05b42c0b31cb73629'
            'e908675f6c6f7bfd786b4b1b8823a0bf9f70d7d0ea6c9b6ab4dade013a047c03'
            '13d7a478e07ee4f1707cb3a35288d4ca713d81d5b8c9d214f0e04139b015ac7b'
            'ba2be70def813b46272f5012810a874063d0ea38de17371f8ca5e4cfbc256b19'
            '9b2945be2e19f1c4c008243c169ef5fffdc00f25739bf5d785ce4cd4275bb254'
            '93ba81299d33d4b2f847d20387289d700c944fcf7e6d0661df7cca5ee5b0ebe7'
            '43327d72a9d02528ad9557fcb7d929b2195fa51aaf8e4b5a998ba7c920807cda'
            'e4309a6adf07d43f1c9f10d5470ecf054de997b7b32e45e18590af7f1e345c11'
            'd0751014d0c7d33d70d518c520d7c913686c626ad617cb522c9c4821b166ad99'
            '22e8113efe1f656777b69b1b044a1879fead5c0572be6b1c6aa42ec4f07fc3a1'
            'cc438b936f2fb926cf49036fce03a45d92d679e6176abf52ff4e9ee1fa382be3'
            'ba6798051312410d4e76afde2be5be74edd8b9b737a7786f09e7c7fb4e8a90ca'
            '6bcb38312d83f07afc9f322a803e8b1d87838c26ce1df65aefb0b7c73c7d06cc'
            'c6e5ae239c8807c6464fd140b7b9cdc975e7a8e7587102a96720c59817a74f74'
            '2ee660ee38cf01a52280f06c555e130086cecfed80f76f38bedead2acc571103'
            'a5f803cf99a69f9779993ead2ec9637ed01f00a3898303a11dd3503d295659b3'
            '0063447ae2b64db0515092f4b9e78c59a02f76fd5a5e97e1cae05a939328451b'
            '9550fbc946b080eaf67e2dc10bf0998b3e9a6c8325ed4b7115c9069d7a71c25a'
            '889b3085e874a040c3bc70c7f7777b650790f91ac18a5886f96abfc57cb68920'
            '69f5601520eb0c944cc489f6dda009a6b5c714cb22f94af3d24cdba2ea81ed6a')
